Skip to content

Conversation

@nickcopi
Copy link

@nickcopi nickcopi commented Jan 4, 2023

Before this change, it would always call codeql.get_latest_codeql_github_version() and only check if it should actually do anything with it afterwards based on args.check_latest_cli. This meant that it was required to hit the github API to get the latest codeql version regardless of args.check_latest_cli being set, which could lead to API ratelimiting and the setup script crashing before it could launch codeql.

This change gates the codeql.get_latest_codeql_github_version() call behind a args.check_latest_cli to prevent unnecessary reliance on being able to reach the github API if the codeql latest version isn't going to be used because the check_latest_cli argument isn't set.

…t online version if args.check_latest_cli is set.
@travisgosselin
Copy link
Contributor

I already had a fix for this in: #47 .... but had issues getting licensing approval for the commit until today. This also includes support for a GITHUB_TOKEN for an authorized check/download of the github data. Our changes look pretty much the same for the initial version check.

@scovetta scovetta merged commit dde21e8 into microsoft:main Jan 23, 2023
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