Skip to content

Conversation

@cy-yun
Copy link
Contributor

@cy-yun cy-yun commented Nov 11, 2025

b/459567217

@cy-yun cy-yun requested review from a team as code owners November 11, 2025 00:36
@cy-yun cy-yun changed the title chore: Add warning to unexpected-major-version-check failure chore: make major version releases safer Nov 11, 2025
@cy-yun cy-yun changed the title chore: make major version releases safer chore(workflow): make major version releases safer Nov 11, 2025
exit 1
else
echo "Success: Approval requirement of $REQUIRED_APPROVALS met."
fi No newline at end of file
Copy link
Contributor

@bshaffer bshaffer Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to combine this check with the existing Major Version check in our existing "Release Checks" workflow file, instead of creating a new workflow

Copy link
Contributor Author

@cy-yun cy-yun Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was my original plan. However, I needed to add a new trigger for this workflow "on pull-request-review: submit" so it would run whenever there is a new approval on the PR. There isn't a way to add a trigger per job. I can only add it per workflow. I didn't want to add a new trigger to existing jobs that don't need it.

Copy link
Contributor

@bshaffer bshaffer Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I think we can rely on the existing check to be sufficient

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me some guidance on how I would combine the check for 2 yoshi-php approvers with the existing unexpected-major-version-check? Also, there are other jobs in the existing Release Checks workflow that do not need the "on pull-request-review: submit" trigger. So even if I combined the 2 approver check workflow into the existing unexpected-major-version-check, I would need to separate it out into a new workflow OR add unnecessary trigger to other existing jobs.

Also, I thought we talked about implementing the 2 approvers minimum workflow for major version releases. I want to understand what you mean by existing check being sufficient.

Copy link
Contributor

@bshaffer bshaffer Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just mean that the 2 approvers minimum isn't strictly necessary, and would rather omit it in favor of relying on the existing check, than introduce this additional workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 2 approvers minimum check would only be required for major version releases. It would prevent issues like last week’s release. Considering how much impact accidental major version releases can have on our clients, a single dev alone should not be able to execute it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think since we already have a release check for it below, which forces devs to confirm that they indeed want to release a major version, and because this PR improves the error check to output a very clear warning, that's sufficient to prevent this from happening. IMO two approvals for the release PR is overkill (as is the additional workflow)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants