Skip to content

Code freeze does not prevent merging of PRs that previously passed CI #17770

@rak-phillip

Description

@rak-phillip

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

  1. Raise a PR against a release branch, ensure that it passes all CI gates
  2. Update branches-metadata.json so that "codeFreeze": true is set for that branch
  3. 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

  • When codeFreeze: true is set for a branch in branches-metadata.json, any open PR targeting that branch cannot be merged, regardless of whether its CI checks previously passed

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions