Skip to content

Conversation

Eijebong
Copy link
Contributor

This fixes a regression from 384afee where we started using the taskcluster python client instead of making requests manually.

The artifacts route is special because the API returns some JSON as part of a 303 to the artifact's content URL. The previous code followed that
303. The python client does not. So instead we're getting the body which looks like this: {"type": "s3/...", "url": "whereverthe303pointsat"}.

This fixed it by following the redirect manually to restore the previous behavior.
I also fixed the test as the previous one was basically ignoring the fact that taskcluster was returning a 303 and was mocking as if it didn't exist.

It's worth noting that while it restores the behavior of returning the artifact's content (as a ByteIO), it is still a breaking change as the previous code used to return a Response object.

Fixes #812

@Eijebong Eijebong requested a review from a team as a code owner October 10, 2025 11:13
This fixes a regression from 384afee
where we started using the taskcluster python client instead of making
requests manually.

The artifacts route is special because the API returns some JSON as part
of a 303 to the artifact's content URL. The previous code followed that
303. The python client does not. So instead we're getting the body which
looks like this: `{"type": "s3/...", "url": "whereverthe303pointsat"}`.

This fixed it by following the redirect manually to restore the previous
behavior.
I also fixed the test as the previous one was basically ignoring the
fact that taskcluster was returning a 303 and was mocking as if it
didn't exist.

It's worth noting that while it restores the behavior of returning the
artifact's content (as a ByteIO), it is still a breaking change as the
previous code used to return a Response object.

Fixes taskcluster#812
@Eijebong
Copy link
Contributor Author

This might be better if we fixed taskcluster/taskcluster#8010 instead

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.

taskgraph.util.taskcluster.get_artifact doesn't return the artifact content anymore

1 participant