-
Notifications
You must be signed in to change notification settings - Fork 59
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
Most fields in /v2/org/agents are nil #28
Comments
I experienced this last week, too. It took me at least an hour to figure out that the API was Firstly, I think that's very bad-practise from an API standpoint. That said, I propose that at least go-buildkite/buildkite/buildkite.go Line 29 in 9d3e347
Workaround is to change go-buildkite/buildkite/buildkite.go Line 46 in 9d3e347
UserAgent ) to something specific to you.
@smarthall Your description above is actually two issues; One regarding |
Sorry we never commented here about the change in returned data! Unfortunately the agent metrics tool, which uses this library, was causing a disruptive amount of load. It also didn’t set a custom user agent. In order to stop service problems, we had to selectively return JSON fields for the existing agent metrics daemons based on a generic user agent pattern used here. It won’t happen for future versions, and setting a different user agent is the workaround for now. Sorry for missing this issue, and the problems it might have caused you! |
Apologies folks! We totally agree that user-agent specific behaviour is terrible and would avoid it at almost any cost. 😢 We should have done a better job of documenting this nuance in this library. |
Have you set a custom user-agent on all new agents installed now? |
Yep, that was done in buildkite/buildkite-agent-metrics#34 |
Could you guys cut a new release for 9d8a7ff Would prefer to not have to use master. |
We've cut a new release for v2.2.0. I'm going to close this as it shouldn't happen with more recent user agents! |
So suddenly this morning the go-buildkite library randomly stopped working. The issue appears as most fields in the agent list appearing as
nil
.curl -s -H 'Authorization: Bearer <token>' "https://api.buildkite.com/v2/organizations/org/agents"
- workedcurl -s -H 'Authorization: Bearer <token>' --user-agent 'go-buildkite/2.0.0' "https://api.buildkite.com/v2/organizations/org/agents"
- was missing informationIt looks like the server is sending a different response when the user agent is
go-buildkite/2.0.0
, not sure why that would be, but I assume you have your reasons.That said I thought I was using v2.1.0 of the library!
Then I found this: https://github.com/buildkite/go-buildkite/blob/v2.1.0/buildkite/version.go
It looks like the version number wasn't updated in the latest release.
So, can we please get a new release of go-buildkite with a working user agent? The one in master seems fine ...
The text was updated successfully, but these errors were encountered: