Skip to content
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

[test] TestSupervisor_setupOwnMetrics is broken on Windows CI #35812

Closed
pjanotti opened this issue Oct 15, 2024 · 2 comments · Fixed by #35818
Closed

[test] TestSupervisor_setupOwnMetrics is broken on Windows CI #35812

pjanotti opened this issue Oct 15, 2024 · 2 comments · Fixed by #35818

Comments

@pjanotti
Copy link
Contributor

Component(s)

cmd/opampsupervisor

Describe the issue you're reporting

https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/11351508374/job/31572243634#step:8:96

The test is not taking into account that the file on Windows uses \r\n on each line end instead of \n like the other systems.

=== FAIL: supervisor TestSupervisor_setupOwnMetrics/DestinationEndpoint_set_-_enable_own_metrics (0.01s)
    supervisor_test.go:1161: 
        	Error Trace:	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor/supervisor_test.go:1161
        	Error:      	Not equal: 
        	            	expected: "receivers:\n  # Collect own metrics\n  prometheus/own_metrics:\n    config:\n      scrape_configs:\n        - job_name: 'otel-collector'\n          scrape_interval: 10s\n          static_configs:\n            - targets: ['0.0.0.0:55555']  \nexporters:\n  otlphttp/own_metrics:\n    metrics_endpoint: \"localhost\"\n\nservice:\n  telemetry:\n    metrics:\n      address: \":55555\"\n  pipelines:\n    metrics/own_metrics:\n      receivers: [prometheus/own_metrics]\n      exporters: [otlphttp/own_metrics]\n"
        	            	actual  : "receivers:\r\n  # Collect own metrics\r\n  prometheus/own_metrics:\r\n    config:\r\n      scrape_configs:\r\n        - job_name: 'otel-collector'\r\n          scrape_interval: 10s\r\n          static_configs:\r\n            - targets: ['0.0.0.0:55555']  \r\nexporters:\r\n  otlphttp/own_metrics:\r\n    metrics_endpoint: \"localhost\"\r\n\r\nservice:\r\n  telemetry:\r\n    metrics:\r\n      address: \":55555\"\r\n  pipelines:\r\n    metrics/own_metrics:\r\n      receivers: [prometheus/own_metrics]\r\n      exporters: [otlphttp/own_metrics]\r\n"
make[2]: *** [../../Makefile.Common:131: test] Error 1
Copy link
Contributor

Pinging code owners:

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

@evan-bradley evan-bradley removed the needs triage New item requiring triage label Oct 15, 2024
@evan-bradley
Copy link
Contributor

Thanks for catching this, I'll take care of it.

sbylica-splunk pushed a commit to sbylica-splunk/opentelemetry-collector-contrib that referenced this issue Dec 17, 2024
#### Description

This fixes a few tests on Windows that were failing due to a mismatch
between newline character sequences between Windows and non-Windows
operating systems.

#### Link to tracking issue
Fixes
open-telemetry#35812
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants