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

Improve error handling for HTTP 401 Unauthorized responses from Buildkite #58

Open
keithduncan opened this issue Nov 9, 2021 · 2 comments

Comments

@keithduncan
Copy link
Contributor

keithduncan commented Nov 9, 2021

These are logged but don’t provide much detail, ideally the error message would include a title, description, and a recovery suggestion.

The title should cover what the Lambda was attempting to do that failed e.g. "Couldn’t retrieve Buildkite metrics for the queue queue"

The description should provide more detail on what went wrong when trying to "do" the title e.g. "The Buildkite Agent token retrieved from (ENV VAR / SSM Parameter) was rejected" replacing where the token was retrieved from with the actual place the token was retrieved from based on runtime configuration.

The recovery suggestion should describe what action the user can take to fix the error e.g. "Retrieve or generate a new Buildkite Agent token from https://buildkite.com/organizations/-/agents and update the (ENV VAR / SSM Parameter) with the value".

@surajthakur
Copy link

Hi Team,

I am also receiving the same error.
I am using the buildkite agent token path using AWS secretsmanager.
This is error I get.

Scaling error: GET https://agent.buildkite.com/v3/metrics: 401 Unauthorized

in the config.json I have used the parameter

{
        "ParameterKey": "BuildkiteAgentTokenParameterStorePath",
        "ParameterValue": "/aws/reference/secretsmanager/BuildkiteAgentToken"
}

The secret is created as a key value pair in aws secretsmanager and the key name is BuildkiteAgentToken

Any ideas what could be the issue?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants