Fix assumption that all CodeQL bundle URLs contain the tag name of the bundle by henrymercer · Pull Request #1517 · github/codeql-action · GitHub
Skip to content

Fix assumption that all CodeQL bundle URLs contain the tag name of the bundle - #1517

Merged
henrymercer merged 5 commits into
mainfrom
henrymercer/fix/not-all-bundle-urls-contain-tag
Feb 6, 2023
Merged

henrymercer merged 5 commits into
mainfrom
henrymercer/fix/not-all-bundle-urls-contain-tag

Conversation

@henrymercer

Copy link
Copy Markdown
Contributor

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

  • 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.

@henrymercer
henrymercer requested a review from a team as a code owner February 3, 2023 19:16
Comment thread src/setup-codeql.ts Outdated
Comment thread src/setup-codeql.ts Outdated
Comment thread src/setup-codeql.ts
@aeisenberg

aeisenberg commented Feb 6, 2023 •

Copy link
Copy Markdown
Contributor

@aeisenberg

Copy link
Copy Markdown
Contributor

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.

@aeisenberg aeisenberg left a comment

Copy link
Copy Markdown
Contributor

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.

@henrymercer

Copy link
Copy Markdown
Contributor Author

@henrymercer
henrymercer merged commit d396227 into main Feb 6, 2023
@henrymercer
henrymercer deleted the henrymercer/fix/not-all-bundle-urls-contain-tag branch February 6, 2023 18:20
@github-actions github-actions Bot mentioned this pull request Feb 6, 2023
4 of 6 tasks
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.

3 participants