This PR implements a new release process to maintain both v2 and v1 releases of the CodeQL Action, both of which receive updates to the analysis and other features from main.
The new release process is discussed in the updated CONTRIBUTING.md document. We perform the v2 release via a main -> v2 merge, and mergeback v2 -> main as we did before with the v1 branch. However what's new is that we also perform a v2 -> v1 merge to ensure that the v1 branch stays up to date with the latest changes while we need to continue supporting this release.
Please read the backlinked internal issue for information on how this was tested, a link to the design doc, and followup work. Commit-by-commit review recommended.
Handling the v2 -> v1 merge
The most difficult part of this process, and one that is liable to change in the future, is how we handle conflicts between the v2 and v1 branch during the v2 -> v1 merge. For instance, take the state just before the v2 -> v1 merge while we're backporting a new 2.1.7 release to v1:
v2: commits from 2.1.6 --- mergeback patch version bump to 2.1.7 --- new changes to be released in 2.1.7
v1: commits from 2.1.6 --- change version number to 1.1.6
We need to address the conflict between mergeback patch version bump to 2.1.7 and change version number to 1.1.6. However, this is complicated, as the version number appears in three places (package.json, package-lock.json, and node_modules/.package-lock.json) and these files could conflict in other ways (e.g. different package versions between v1 and v2).
Our approach is to create a release prep branch from v1 and revert the "change version number to 1.1.6" commit:
v1-release-prep: commits from 2.1.6 --- change version number to 1.1.6 --- revert "change version number to 1.1.6"
By reverting this commit, the release prep branch will have the 2.1.6 version, which means the "mergeback patch version bump to 2.1.7" commit from v2 can be merged in unproblematically. Once this merge is done, we then update the version number to 1.1.7:
v1-release-prep: commits from 2.1.6 --- change version number to 1.1.6 --- revert "change version number to 1.1.6" --- merge v2 into v1-release-prep --- change version number to 1.1.7
Merge / deployment checklist
Confirm this change is backwards compatible with existing workflows.
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
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.
This PR implements a new release process to maintain both v2 and v1 releases of the CodeQL Action, both of which receive updates to the analysis and other features from main.
The new release process is discussed in the updated CONTRIBUTING.md document. We perform the v2 release via a main -> v2 merge, and mergeback v2 -> main as we did before with the v1 branch. However what's new is that we also perform a v2 -> v1 merge to ensure that the v1 branch stays up to date with the latest changes while we need to continue supporting this release.
Please read the backlinked internal issue for information on how this was tested, a link to the design doc, and followup work. Commit-by-commit review recommended.
Handling the v2 -> v1 merge
The most difficult part of this process, and one that is liable to change in the future, is how we handle conflicts between the v2 and v1 branch during the v2 -> v1 merge. For instance, take the state just before the v2 -> v1 merge while we're backporting a new 2.1.7 release to v1:
We need to address the conflict between mergeback patch version bump to 2.1.7 and change version number to 1.1.6. However, this is complicated, as the version number appears in three places (package.json, package-lock.json, and node_modules/.package-lock.json) and these files could conflict in other ways (e.g. different package versions between v1 and v2).
Our approach is to create a release prep branch from v1 and revert the "change version number to 1.1.6" commit:
By reverting this commit, the release prep branch will have the 2.1.6 version, which means the "mergeback patch version bump to 2.1.7" commit from v2 can be merged in unproblematically. Once this merge is done, we then update the version number to 1.1.7:
Merge / deployment checklist