This report is based of a recent instance where a PR was able to merge into a target branch that was actively under code freeze - #17403. The repro steps and actual behavior have not been verified and are based off discussions while discussing the code freeze behavior.
Steps to reproduce
- Raise a PR against a release branch, ensure that it passes all CI gates
- Update
branches-metadata.json so that "codeFreeze": true is set for that branch
- Attempt to merge the PR in the release branch
Actual behavior
All gates pass in this PR even though code freeze is in effect for the target branch.
The merge button is active, clicking the button merges the PR.
Expected behavior
Code freeze is in effect for the target branch and merging should be disabled for the PR in question.
Acceptance criteria
Additional details
I think that there might be a gap between when a PR is raised and code freeze enforced that can allow a PR to be in a mergable state, even when code freeze is in place. It's almost as if we need the ability to run some checks when the merge button is clicked in github to assert that the code freeze is not in place before actually merging. Alternatively, the branch protection repo setting might be able to be programmatically enabled when making modifications to branches-metadata.json
This report is based of a recent instance where a PR was able to merge into a target branch that was actively under code freeze - #17403. The repro steps and actual behavior have not been verified and are based off discussions while discussing the code freeze behavior.
Steps to reproduce
branches-metadata.jsonso that"codeFreeze": trueis set for that branchActual behavior
All gates pass in this PR even though code freeze is in effect for the target branch.
The merge button is active, clicking the button merges the PR.
Expected behavior
Code freeze is in effect for the target branch and merging should be disabled for the PR in question.
Acceptance criteria
codeFreeze: trueis set for a branch inbranches-metadata.json, any open PR targeting that branch cannot be merged, regardless of whether its CI checks previously passedAdditional details
I think that there might be a gap between when a PR is raised and code freeze enforced that can allow a PR to be in a mergable state, even when code freeze is in place. It's almost as if we need the ability to run some checks when the merge button is clicked in github to assert that the code freeze is not in place before actually merging. Alternatively, the branch protection repo setting might be able to be programmatically enabled when making modifications to
branches-metadata.json