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

fix(collector): exit on 401 when queues specified #211

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

NotArpit
Copy link
Contributor

@NotArpit NotArpit commented Oct 7, 2023

Context

In #203 in //collector/collector.go we used error wrapping to exit with code 4 on a 401 response from the agent metrics API. However this was only done in the conditional branch when no queues are specified (i.e. ingest metrics for all queues). Hence when specifying a queue via -queue CLI flag, we do not get the exit on status code 401.

Intent

Exit on 401 response in the conditional branch where len(c.Queues) != 0 for parity with len(c.Queues) == 0.

Reviewers

@triarius @DrJosh9000 PTAL.

Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@DrJosh9000 DrJosh9000 merged commit 1f4f398 into buildkite:master Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants