-
Notifications
You must be signed in to change notification settings - Fork 335
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
Fix assumption that all CodeQL bundle URLs contain the tag name of the bundle #1517
Fix assumption that all CodeQL bundle URLs contain the tag name of the bundle #1517
Conversation
I tried to download an untagged dev CLI instance: https://github.com/dsp-testing/aeisenberg-sarif-upload/actions/runs/4106366120/jobs/7084499130 The job failed. Here is the commit sha I am working with (private repository). https://github.com/dsp-testing/aeisenberg-sarif-upload/commit/0576bc5134025ab810bb47a6c6c67ebe1209d707 Note that the failure reason is a 404 during download, which is strange since the URL https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/untagged-9b0f002edc6e08260e8f/codeql-bundle-linux64.tar.gz works for me when I access it from the browser. |
OK, So I tried again, but this time with a publicly available CLI version that has a non-standard tag. The download worked, but it looks like the tool wasn't cached in the toolcache. I don't think that's a problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I've convinced myself that this fix will correctly download codeqls from arbitrary github releases.
👍, to summarize:
|
While implementing controlled switchover, we inadvertently introduced an assumption that all CodeQL bundle URLs contain the tag name of the bundle, for example
codeql-bundle-2020230120
. This is in fact not the case on GHES, where the bundle URL may be https://example.githubenterprise.com/api/v3/repos/github/codeql-action/releases/assets/1 when the CodeQL sync tool has been used to sync the CodeQL bundle to the GHES instance.This PR adds a regression test and fixes that assumption.
Merge / deployment checklist