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

DownloadGitHubRelease broken due to incorrect host #14309

Closed
JakubWojtowicz-TomTom opened this issue Jan 29, 2021 · 5 comments
Closed

DownloadGitHubRelease broken due to incorrect host #14309

JakubWojtowicz-TomTom opened this issue Jan 29, 2021 · 5 comments

Comments

@JakubWojtowicz-TomTom
Copy link

Question, Bug, or Feature?
Type: Bug

https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/DownloadGitHubReleaseV0

Environment

  • Server - Azure Pipelines
  • Agent - Hosted: ubuntu-latest

Issue Description

[Include task name(s), screenshots and any other relevant details]

Task logs

Retrying download of reference-architecture.zip, retry count: 4
##vso[task.debug]Nothing to process currently, respawing worker 2 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 3 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 4 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 2 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 3 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 4 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 2 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 3 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 4 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 2 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 3 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 4 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 2 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 3 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 4 after 1 sec.
##vso[task.debug]patternRoot: 'null'
##vso[task.debug]matchOptions.debug: 'false'
##vso[task.debug]matchOptions.nobrace: 'true'
##vso[task.debug]matchOptions.noglobstar: 'false'
##vso[task.debug]matchOptions.dot: 'true'
##vso[task.debug]matchOptions.noext: 'false'
##vso[task.debug]matchOptions.nocase: 'false'
##vso[task.debug]matchOptions.nonull: 'false'
##vso[task.debug]matchOptions.matchBase: 'false'
##vso[task.debug]matchOptions.nocomment: 'false'
##vso[task.debug]matchOptions.nonegate: 'false'
##vso[task.debug]matchOptions.flipNegate: 'false'
##vso[task.debug]pattern: '**'
##vso[task.debug]applying include pattern against original list
##vso[task.debug]1 matches
##vso[task.debug]1 final results
##vso[task.debug]Processing reference-architecture.zip
##vso[task.debug]Nothing to process currently, respawing worker 2 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 3 after 1 sec.
##vso[task.debug]Nothing to process currently, respawing worker 4 after 1 sec.
##vso[task.debug]Error getting file reference-architecture.zip: Error: Failed request: (statusCode) 400
##vso[task.debug]Agent.Version=undefined
##vso[task.logissue type=error;code=error;agentVersion=undefined;taskId=artifact-engine-0.1.26;]{"stack":"Error: Failed request: (statusCode) 400\n    at WebClient.<anonymous> (/mnt/f/workspace/other/git-download-task/node_modules/artifact-engine/Providers/webClient.js:41:23)\n    at Generator.next (<anonymous>)\n    at /mnt/f/workspace/other/git-download-task/node_modules/artifact-engine/Providers/webClient.js:7:65\n    at new Promise (<anonymous>)\n    at __awaiter (/mnt/f/workspace/other/git-download-task/node_modules/artifact-engine/Providers/webClient.js:3:12)\n    at WebClient.processResponse (/mnt/f/workspace/other/git-download-task/node_modules/artifact-engine/Providers/webClient.js:35:16)\n    at /mnt/f/workspace/other/git-download-task/node_modules/artifact-engine/Providers/webClient.js:20:22\n    at processTicksAndRejections (node:internal/process/task_queues:93:5)","message":"Failed request: (statusCode) 400","statusCode":400,"result":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>InvalidArgument</Code><Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified</Message><ArgumentName>Authorization</ArgumentName><ArgumentValue>Bearer 728516f08e622e33ca511ec19150ee6436031fac</ArgumentValue><RequestId>F0AC121E095AEC0D</RequestId><HostId>LMJzb/KFP0Em5bwpRm0PCRS1xvduJ7Q04UvfoJzBp2fPQR4Io9k2ChTxsj/BIR5t2m4RXXMN2HM=</HostId></Error>"}
##vso[task.debug]task result: Failed
##vso[task.issue type=error;]Error: Failed request: (statusCode) 400
##vso[task.complete result=Failed;]Error: Failed request: (statusCode) 400
##vso[task.debug]Aborting respawning worker, as download failed for some file(s).
##vso[task.debug]Aborting respawning worker, as download failed for some file(s).
##vso[task.debug]Aborting respawning worker, as download failed for some file(s).

Troubleshooting

Use the task and see how it crashes.

@ED220Webfactory
Copy link

ED220Webfactory commented Jan 29, 2021

Having the same issue. By digging through the task code a bit i could properly get the reqeusted release and fetch the asset list via api, but then failed to download them via ArtifactEngine and/or webProvider.

This Issue started yesterday around 16:25 MEZ btw, since i had pipelines prior going throug and one at that time failing

@JakubWojtowicz-TomTom
Copy link
Author

I've already prepared a PR fixing this issue: #14310

@ED220Webfactory
Copy link

ED220Webfactory commented Jan 29, 2021

@JakubWojtowicz-TomTom did you test whether that fixes the issue?
Because i think its strange that the calls up to, including the one getting the list of assets via https://api.github.com/repos/OWNER/REPO/releases/RELEASE_ID/assets succeed and only the download itself seems to fail. and those requests seem to be limited to api.github.com and github.com for the download? (by using the download link given by manually querying the assets api call)
And all those requests (including the succeeding api ones) use the same handler.
Granted: the change here would still add the auth header to the api ones, so these should still work. does the ArtifactEngine download the assets from github-releases.githubusercontent?

@JakubWojtowicz-TomTom
Copy link
Author

JakubWojtowicz-TomTom commented Jan 29, 2021

I did test it.
The thing is that once you try to download the file you get redirected (302 Found) from github.com to github-releases.githubusercontent.com.
My understanding is that previously it was redirecting to AWS S3 native URL directly.
S3 headers are still present though.

@ED220Webfactory
Copy link

Ah, thanks for that info! That PR was blazing fast too :)

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

1 participant