[FIX] Prevent rate limiting by changing setup.py to only reach out to the GitHub api to get the latest codeql cli version if args.check_latest_cli is set #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 onargs.check_latest_cli. This meant that it was required to hit the github API to get the latest codeql version regardless ofargs.check_latest_clibeing 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 aargs.check_latest_clito prevent unnecessary reliance on being able to reach the github API if the codeql latest version isn't going to be used because thecheck_latest_cliargument isn't set.