FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix toolcache behavior when downloading bundle from another repo by henrymercer · Pull Request #1523 · github/codeql-action · GitHub

Fix toolcache behavior when downloading bundle from another repo - #1523

Merged
henrymercer merged 3 commits into
mainfrom
henrymercer/fix/cli-version-for-different-bundles
Feb 6, 2023
Merged

henrymercer merged 3 commits into
mainfrom
henrymercer/fix/cli-version-for-different-bundles

Conversation

Copy link
Copy Markdown
Contributor

Suppose a user requests a specific version of CodeQL by passing a tools: https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz input to the init Action.

Previously the Action did not take note of the fact the bundle came from dsp-testing/codeql-cli-nightlies, not github/codeql-action. Most of the time, this would mean it wouldn't find a release with the requested tag, and the bundle would be correctly cached as 0.0.0-<bundleVersion> so as to avoid a clash with a stable CodeQL release. However if a release with the same tag existed on the CodeQL Action repository, then the Action would incorrectly associate the CLI version number from that stable bundle with the other bundle, and go on to cache the bundle as <cliVersion>-<bundleVersion>. This led to bundles being cached with the wrong CLI version, for example https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-20230203/codeql-bundle.tar.gz was cached as 2.12.2, since it matched this release on the github/codeql-action repo.

To resolve this, before we try to look up the CLI version number associated with a particular bundle tag, we check that that bundle originates from github/codeql-action, either the original repository on Dotcom or a synced repository on Enterprise Server.

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 requested a review from a team as a code owner February 6, 2023 16:25

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think this makes sense, but I did want to have a chat with you about URLs and verifying them.

angelapwen left a comment
edited
Loading

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you 👍 looks good to me and regression test makes the change quite clear!

(Didn't notice Andrew had already just approved 😅)

Base automatically changed from henrymercer/fix/not-all-bundle-urls-contain-tag to main February 6, 2023 18:20
henrymercer enabled auto-merge February 6, 2023 18:24
henrymercer merged commit 927de48 into main Feb 6, 2023
henrymercer deleted the henrymercer/fix/cli-version-for-different-bundles branch February 6, 2023 19:05
github-actions Bot mentioned this pull request Feb 6, 2023
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL