Skip to content

[macOS] Always use the latest major version of CodeQL Action #11946

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

angelapwen
Copy link
Contributor

@angelapwen angelapwen commented Apr 4, 2025

Instead of hardcoding the CodeQL Action major version, we now always use the latest major version of CodeQL Action.

Related issue: Supersedes #11928.

Check list

  • Related issue / work item is attached
  • [N/A] Tests are written (if applicable)
  • [N/A] Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

@@ -6,9 +6,24 @@

source ~/utils/utils.sh

# Retrieve the latest major version of the CodeQL Action to use in the base URL for downloading the bundle.
releases=$(curl -s "https://api.github.com/repos/github/codeql-action/releases")
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to use a PAT like we do here or image generation could be throttled and fail

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Previously we already used curl on Ubuntu or download_with_retry on macOS for another URL without the PAT (see line 25 in this file). Does download_with_retry help prevent the throttling?

Also, is this specific to macOS or do you recommend I use the PAT in the corresponding Ubuntu & Windows PRs?

Copy link
Contributor

Choose a reason for hiding this comment

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

MacOS image generation has a higher risk of throttling so we have to use PATs. It is less of a problem for Windows/Linux images. You may build Url with this code

resolve_github_release_asset_url() {

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.

2 participants