Skip to content

Improve cherry-pick warning message for better clarity#18756

Merged
harupy merged 2 commits intomlflow:masterfrom
harupy:improve-cherry-pick-warning-message
Nov 10, 2025
Merged

Improve cherry-pick warning message for better clarity#18756
harupy merged 2 commits intomlflow:masterfrom
harupy:improve-cherry-pick-warning-message

Conversation

@harupy
Copy link
Member

@harupy harupy commented Nov 10, 2025

🛠 DevTools 🛠

Open in GitHub Codespaces

Install mlflow from this PR

# mlflow
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/18756/merge
# mlflow-skinny
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/18756/merge#subdirectory=libs/skinny

For Databricks, use the following command:

%sh curl -LsSf https://raw.githubusercontent.com/mlflow/mlflow/HEAD/dev/install-skinny.sh | sh -s pull/18756/merge

Related Issues/PRs

N/A

What changes are proposed in this pull request?

This PR improves the warning message shown on cherry-pick PRs to release branches. The new message is clearer, better structured, and provides more context about why "Squash and merge" should be avoided.

Key improvements:

  • Changed to H1 heading for better visibility
  • Restructured with clearer language and formatting
  • Added specific examples of workflows/scripts affected
  • Replaced technical jargon with simpler terms

How is this PR tested?

  • Manual tests

The workflow will trigger on PRs targeting release branches (branch-X.Y pattern) and post the improved warning message.

Does this PR require documentation update?

  • No. You can skip the rest of this section.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section

Should this PR be included in the next patch release?

  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

🤖 Generated with Claude Code

- Changed title to H1 for better visibility
- Restructured content with clearer language and formatting
- Added specific examples of workflows/scripts that are affected
- Made bullet points more explicit by adding 'It' as subject
- Replaced technical jargon with clearer terms

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@github-actions github-actions bot added the rn/none List under Small Changes in Changelogs. label Nov 10, 2025
owner: context.repo.owner,
repo: context.repo.repo,
body: '### 🚨 Important Reminder:\nAre you cherry-picking commits to a release branch? If so, please ensure you use the `Rebase and merge` option when merging this pull request. Do not use the `Squash and merge` option, as it makes reverting individual commits impossible. If the `Rebase and merge` option is disabled (it usually is), follow [Configuring commit rebasing for pull requests](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests) to temporarily enable it, and disable it once the PR is merged.'
body: `# ⚠️ Important: Cherry-Pick Merge Instructions
Copy link
Member Author

Choose a reason for hiding this comment

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

I believe this message is still valuable when Squash and merge is somehow enabled.

Copy link
Collaborator

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

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

LGTM!

- It disrupts the [\`update-release-labels.yml\`](.github/workflows/update-release-labels.yml) workflow
- It disrupts the [\`update_changelog.py\`](dev/update_changelog.py) script

If "Rebase and merge" is disabled, follow [Configuring commit rebasing for pull requests](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests) to enable it.`
Copy link
Member Author

Choose a reason for hiding this comment

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

I've enabled Rebase and merge but note that anyone with admin role can turn it on/off.


**If you are cherry-picking commits to a release branch, "Rebase and merge" must be used when merging this PR, NOT "Squash and merge".**

### Why "Squash and merge" causes problems:
Copy link
Member Author

Choose a reason for hiding this comment

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

We can complicate the instruction by adding "Use Squash and merge if ..." but I didn't want to do that. A few Ci fixes should be acceptable and you don't push 10 CI fix commits on a cherry-pick PR.

- Replace 'disrupts' with 'causes incorrect results in' for clarity
- Use nested list to show affected workflow and scripts
- Add check_patch_prs.py to the list of affected scripts
- Remove redundant 'workflow/script' labels

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy enabled auto-merge November 10, 2025 04:33
@harupy harupy disabled auto-merge November 10, 2025 04:33
@harupy harupy enabled auto-merge November 10, 2025 05:05
@harupy harupy added this pull request to the merge queue Nov 10, 2025
Merged via the queue into mlflow:master with commit 4140725 Nov 10, 2025
42 checks passed
@harupy harupy deleted the improve-cherry-pick-warning-message branch November 10, 2025 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rn/none List under Small Changes in Changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants