Skip to content

[connector/servicegraph] Broken test: TestConnectorConsume/incomplete_traces_with_virtual_server_span #34792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pjanotti opened this issue Aug 21, 2024 · 5 comments · Fixed by #34798

Comments

@pjanotti
Copy link
Contributor

Component(s)

connector/servicegraph

Describe the issue you're reporting

https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10493207856/job/29066610265?pr=34791#step:6:377

=== FAIL: . TestConnectorConsume/incomplete_traces_with_virtual_server_span (0.00s)
    logger.go:146: 2024-08-21T16:00:30.028Z	INFO	Started servicegraphconnector

=== FAIL: . TestConnectorConsume (0.02s)
panic: runtime error: index out of range [0] with length 0 [recovered]
	panic: runtime error: index out of range [0] with length 0

goroutine 20 [running]:
testing.tRunner.func1.2({0x14143aa00, 0xc0002542a0})
	C:/hostedtoolcache/windows/go/1.22.6/x64/src/testing/testing.go:1631 +0x3f7
testing.tRunner.func1()
	C:/hostedtoolcache/windows/go/1.22.6/x64/src/testing/testing.go:1634 +0x6b6
panic({0x14143aa00?, 0xc0002542a0?})
	C:/hostedtoolcache/windows/go/1.22.6/x64/src/runtime/panic.go:770 +0x132
go.opentelemetry.io/collector/pdata/pmetric.MetricSlice.At(...)
	C:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector/[email protected]/pmetric/generated_metricslice.go:56
github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector.TestConnectorConsume.func2(0xc000154340, {0xc000009050?, 0xc00016a15c?})
	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/connector/servicegraphconnector/connector_test.go:120 +0x2a7
github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector.TestConnectorConsume.func5(0xc000154340)
	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/connector/servicegraphconnector/connector_test.go:189 +0x482
testing.tRunner(0xc000154340, 0xc000124dc0)
	C:/hostedtoolcache/windows/go/1.22.6/x64/src/testing/testing.go:1689 +0x21f
created by testing.(*T).Run in goroutine 14
	C:/hostedtoolcache/windows/go/1.22.6/x64/src/testing/testing.go:1742 +0x826

DONE 13 tests, 2 failures in 27.027s
@pjanotti pjanotti added the needs triage New item requiring triage label Aug 21, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@pjanotti
Copy link
Contributor Author

/label os:windows

@crobert-1
Copy link
Member

/label os:windows

I've filed #34796 to fix the bug that caused no label to be added here.

@pjanotti pjanotti changed the title Flaky test: TestConnectorConsume/incomplete_traces_with_virtual_server_span [connector/servicegraph] Broken test: TestConnectorConsume/incomplete_traces_with_virtual_server_span Aug 21, 2024
@pjanotti
Copy link
Contributor Author

Although it is another timing issue when running on Windows it fails consistently on my box, changed the title to reflect that. I will see if I can get a fix quickly.

MovieStoreGuy pushed a commit that referenced this issue Aug 22, 2024
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
[Example
failure](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10494185404/job/29069879053),
because of [this
comment](#34792 (comment)).
The failure is happening because the match fails when the label has a
trailing newline.

Local test without fix:
```
$ export LABEL="os:windows
"
$ if [[ -v COMMON_LABELS["${LABEL}"] ]]; then echo "Hello"; fi
$ 
```

Local test with fix:
```
$ export LABEL="os:windows
"
$ LABEL=$(echo "${LABEL}" | tr -d '\n')
$ if [[ -v COMMON_LABELS["${LABEL}"] ]]; then echo "Hello"; fi
Hello
```
dmitryax pushed a commit that referenced this issue Aug 22, 2024
…r_span failures on Windows (#34798)

**Description:**
The failure is due to similar case as explained at
#32715 (comment)

This is a quick fix that just adds a delay to ensure that the test is
passing on Windows.

**Link to tracking Issue:**
Fixes #34792

**Testing:**
Local Windows test run.

**Documentation:**
N/A
f7o pushed a commit to f7o/opentelemetry-collector-contrib that referenced this issue Sep 12, 2024
…etry#34796)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
[Example
failure](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10494185404/job/29069879053),
because of [this
comment](open-telemetry#34792 (comment)).
The failure is happening because the match fails when the label has a
trailing newline.

Local test without fix:
```
$ export LABEL="os:windows
"
$ if [[ -v COMMON_LABELS["${LABEL}"] ]]; then echo "Hello"; fi
$ 
```

Local test with fix:
```
$ export LABEL="os:windows
"
$ LABEL=$(echo "${LABEL}" | tr -d '\n')
$ if [[ -v COMMON_LABELS["${LABEL}"] ]]; then echo "Hello"; fi
Hello
```
f7o pushed a commit to f7o/opentelemetry-collector-contrib that referenced this issue Sep 12, 2024
…r_span failures on Windows (open-telemetry#34798)

**Description:**
The failure is due to similar case as explained at
open-telemetry#32715 (comment)

This is a quick fix that just adds a delay to ensure that the test is
passing on Windows.

**Link to tracking Issue:**
Fixes open-telemetry#34792

**Testing:**
Local Windows test run.

**Documentation:**
N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants