Support CodeQL versions, ranges, release offsets, and nightly transitions - #4079
Draft
felickz wants to merge 10 commits into
Draft
Support CodeQL versions, ranges, release offsets, and nightly transitions#4079felickz wants to merge 10 commits into
felickz wants to merge 10 commits into
Conversation
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
…erelease docs Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
…rsion> Compares the threshold directly against the Action's known default CLI version instead of querying the release list, per feedback. Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
…cenarios Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
…v-format Support CodeQL versions, ranges, release offsets, and nightly transitions
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
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.
What this changes
The
toolsinput forgithub/codeql-action/initandgithub/codeql-action/setup-codeqlcan now select CodeQL using a version, a SemVer range, a release offset, or an automatic nightly transition.The Action resolves the requested version and downloads the correct bundle for the runner's operating system and architecture.
Select an exact version
An optional
vprefix is also accepted:This replaces the need to provide a full platform-specific bundle URL.
Select a SemVer range
The input supports npm-style SemVer ranges and selects the newest stable CodeQL release satisfying the range:
If no release satisfies the range, the error reports the available stable CodeQL version range.
Stay behind the latest release
Use
latest-Nto select a stable release by its position behind the newest stable release:If the offset is outside the available release history, the error reports how many stable releases are available.
Include prereleases
Use
latest-prereleaseto select the newest semantic CodeQL bundle while allowing GitHub releases marked as prereleases:Stable releases remain eligible, so the newest eligible version wins. Draft and date-based bundle releases are ignored. Existing
latest-Nand SemVer range inputs remain stable-only.Use nightly until a release is available
Use
nightly-until-<version>to test a feature expected in a future CodeQL release:The Action uses the latest nightly until a published CodeQL release at or above the threshold exists. GitHub prereleases are eligible. It then switches to the newest eligible published release.
Use nightly until the normal default is ready
Use
nightly-until-default-<version>when you want to return to the Action's normal default selection only after the CodeQL CLI that would actually be selected contains the required feature:The Action first resolves its normal default source and continues using
nightlywhile that selected CLI is below the threshold. Once the CLI that would actually be used is at or above the threshold, normal default selection resumes.This form does not list CodeQL releases or switch merely because a release was published.
Existing inputs remain supported
Existing
toolsvalues—including URLs, local paths,latest,nightly,linked, andtoolcache—continue to work as before.Risk assessment
Risk level: Low risk
The new behavior is opt-in through previously unsupported
toolsinput values. Existing inputs and workflows remain unchanged. The implementation has unit coverage and was exercised in a dedicated cross-platform test workflow.Which use cases does this change impact?
Workflow types:
toolsinput.github-codeql-toolssupplies one of the new values.Products:
toolsvalues.toolsvalues.toolsvalues.Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
linked,latest,nightly,toolcache, or an omittedtoolsvalue.How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist