Skip to content

cmd/update*: more fixes to allow migration from master to main. #20099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

MikeMcQuaid
Copy link
Member

We're not migrating Homebrew/brew to main yet but this will allow us to ensure we have a brew update ready in future when we're ready to do this.

Tested by adjusting default branch on MikeMcQuaid/brew to main.

Again @homebrew/maintainers would really appreciate a very thorough review here.

May also take an approach like in Homebrew/actions#702 in Homebrew/brew to be extra conservative here for a wee while.

Copy link
Member

@Bo98 Bo98 left a comment

Choose a reason for hiding this comment

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

Seems all fine

@Bo98
Copy link
Member

Bo98 commented Jun 13, 2025

May also take an approach like in Homebrew/actions#702 in Homebrew/brew to be extra conservative here for a wee while

Something we've seen many times before is there's external CI providers that do "frozen" base images. This is especially common on those that need to use older macOS images. So there are users that will still be today doing brew update from e.g. 3.0.x to 4.5.6.

Ideally we'd want to keep that update path working. Syncing would probably work best but if we're against that (or have a desire to drop syncing at some point) then a locked branch allowing a two-stage update is a possible alternative.

brew update-test should cover most cases I think though - assuming it has sufficient coverage of updating master/main rather than just tags.

@MikeMcQuaid
Copy link
Member Author

Ideally we'd want to keep that update path working.

We should keep it working for a while (e.g. 1 year max). We should not aim to keep it working in perpetuity.

@MikeMcQuaid MikeMcQuaid force-pushed the more_update_main_changes branch from 337b821 to 4462504 Compare June 13, 2025 16:13
We're not migrating Homebrew/brew to `main` yet but this will allow us
to ensure we have a `brew update` ready in future when we're ready to do
this.
@MikeMcQuaid MikeMcQuaid force-pushed the more_update_main_changes branch from 4462504 to 08eae94 Compare June 13, 2025 16:13
@MikeMcQuaid MikeMcQuaid enabled auto-merge June 13, 2025 16:17
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jun 13, 2025
Comment on lines -80 to +82
git fetch --force origin refs/heads/master:refs/remotes/origin/master
git config fetch.prune true
git fetch --force origin
Copy link
Member

Choose a reason for hiding this comment

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

This will fetch PR branch refs too, right? Is that something we want to avoid?

Copy link
Member Author

Choose a reason for hiding this comment

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

It will but doesn't seem like a big problem either way. I can't seem to find a way to fetch only main and/or master, no other refs and not error if one is missing.

Merged via the queue into master with commit 6fb115d Jun 13, 2025
33 checks passed
@MikeMcQuaid MikeMcQuaid deleted the more_update_main_changes branch June 13, 2025 16:39
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.

3 participants