-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[chore] migrate receiver/* to use errors.Join #8225
[chore] migrate receiver/* to use errors.Join #8225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to override how errors.Join
outputs the errors? Looking at https://github.com/open-telemetry/opentelemetry-collector/actions/runs/5852149629/job/15867545790?pr=8225#step:6:243, it looks like the output will be changed:
--- FAIL: TestScrapeErrorsCombine (0.00s)
scrapeerror_test.go:95:
Error Trace: /home/runner/work/opentelemetry-collector/opentelemetry-collector/receiver/scrapererror/scrapeerror_test.go:95
Error: Error message not equal:
expected: "bad scrapes; err: bad scrape"
actual : "bad scrapes\nerr: bad scrape"
Test: TestScrapeErrorsCombine
scrapeerror_test.go:95:
Error Trace: /home/runner/work/opentelemetry-collector/opentelemetry-collector/receiver/scrapererror/scrapeerror_test.go:95
Error: Error message not equal:
expected: "bad regular; err: bad reg"
actual : "bad regular\nerr: bad reg"
Test: TestScrapeErrorsCombine
scrapeerror_test.go:95:
Error Trace: /home/runner/work/opentelemetry-collector/opentelemetry-collector/receiver/scrapererror/scrapeerror_test.go:95
Error: Error message not equal:
expected: "bad two scrapes; 10 scrapes failed: bad things happened; bad event; event: something happened"
actual : "bad two scrapes\n10 scrapes failed: bad things happened\nbad event\nevent: something happened"
Test: TestScrapeErrorsCombine
FAIL
|
bc66e43
to
e481279
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like you need to update some tests since errors are now separated by \n
instead of ;
and we can't control the output format
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Part of: #8210