You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the root key in JSON output for TeamCity artifacts has changed in v9.X; it used to be "files", now it is "file". This causes teamcity-ruby-client to always return nil from Builds#build_artifacts when using the v9.X API.
I suppose this is a bug in TeamCity's API as the XML output stays the same from v8.X to v9.X. Still, this makes teamcity-ruby-client fail to fetch artifacts when using the default non-versioned API endpoint. Took me some time to figure it out.
Maybe falling back like this would be a reasonable workaround?
def build_artifacts(build_id)
response = get("builds/#{build_id}/artifacts")
response['files'] || response['file']
end
I have not noticed other issues with teamcity-ruby-client using the v9.X API apart from that.
The text was updated successfully, but these errors were encountered:
It seems like the root key in JSON output for TeamCity artifacts has changed in v9.X; it used to be "files", now it is "file". This causes teamcity-ruby-client to always return nil from
Builds#build_artifacts
when using the v9.X API.https://gist.github.com/fortinmike/ac80adfbade2b2d5e0c7
I suppose this is a bug in TeamCity's API as the XML output stays the same from v8.X to v9.X. Still, this makes teamcity-ruby-client fail to fetch artifacts when using the default non-versioned API endpoint. Took me some time to figure it out.
Maybe falling back like this would be a reasonable workaround?
I have not noticed other issues with teamcity-ruby-client using the v9.X API apart from that.
The text was updated successfully, but these errors were encountered: