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

Supply authorization parameter to toolcache.downloadTool() #1516

Merged
merged 1 commit into from Feb 3, 2023

Conversation

aibaars
Copy link
Collaborator

@aibaars aibaars commented Feb 3, 2023

Previously we supplied the authorization information via the 'headers' parameter and left the auth parameter undefined. This works fine, except in some cases when the request is retried.

We observed difference in behaviour, when using undefined for the auth parameter we got a 504 error on the first attempt and a 401 error on the second attempt. When the auth parameter was set we observed a sequences of 504 errors until the number of retries was exceeded. I'm not really sure where the Authorization header got lost, but I suspect the HTTP client drops it when following redirects and the retry-helper doesn't restore it before trying again.

In case someone else has similar problems: the underlying cause of the 504 errors were due to proxy settings. When downloading a release artifact from a GitHub Enterprise server (say github.company.com) you get redirected to media.github.company.com. The no_proxy variable did not contain the media subdomain which caused a gateway timeout. Explicitly adding the subdomain to the no_proxy variable solved the issue. Alternatively the following pull request actions/toolkit#1223 would have solved the issue too, because it updates the no_proxy handling to automatically include subdomains.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

Previously we supplied the authorization information via the 'headers'
parameter. This works fine, except in some cases when the request is
retried.
@aibaars aibaars requested a review from a team as a code owner February 3, 2023 14:09
Copy link
Contributor

@angelapwen angelapwen left a comment

Choose a reason for hiding this comment

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

Thanks, read the associated context and this makes sense. Re-ran the autobuild test that is known to time out.

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.

None yet

2 participants