Skip to content
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

Migrate the flutter/flutter repository to use main as the primary development branch/channel #121564

Open
10 of 18 tasks
godofredoc opened this issue Feb 27, 2023 · 21 comments
Open
10 of 18 tasks
Assignees
Labels
team-infra Owned by Infrastructure team

Comments

@godofredoc
Copy link
Contributor

godofredoc commented Feb 27, 2023

This is a non comprehensive list of what is required to deprecate master branch:

@godofredoc
Copy link
Contributor Author

@christopherfujino can you please help us confirm if there are more changes required in the tool to fully support main as a channel?

@godofredoc godofredoc added the team-infra Owned by Infrastructure team label Feb 27, 2023
@godofredoc
Copy link
Contributor Author

\cc @mit-mit @timsneath @Hixie

@godofredoc godofredoc self-assigned this Feb 27, 2023
@christopherfujino
Copy link
Member

christopherfujino commented Feb 27, 2023

@christopherfujino can you please help us confirm if there are more changes required in the tool to fully support main as a channel?

added "migrate existing SDK users on the master channel/branch to main", filed a tracking issue and assigned to myself

@godofredoc
Copy link
Contributor Author

@jayoung-lee that can you please help us confirm the "main" alias is in place for the flutter analytics?

@godofredoc
Copy link
Contributor Author

@ricardoamador @drewroengoogle can you please help with create main-docs-flutter-dev gcp project and update all the workflows to publish docs there master-docs-flutter-dev

@godofredoc
Copy link
Contributor Author

@CaseyHillers are there any references in frob that need to be updated to main?

@CaseyHillers
Copy link
Contributor

Google Testing (FRoB) has a few references, but they're non-blocking. It queries commits on master, which as long as we leave the mirror up, will be fine.

@ricardoamador
Copy link
Contributor

ricardoamador commented Mar 2, 2023 via email

@jayoung-lee
Copy link
Contributor

The analytics will record whatever channel name it sees, but the dashboard is already showing master as main. Would that be sufficient?

@godofredoc
Copy link
Contributor Author

The analytics will record whatever channel name it sees, but the dashboard is already showing master as main. Would that be sufficient?

Yes, accounting for main channel in analytics should be enough, thanks!

@godofredoc
Copy link
Contributor Author

ey're non-blocking. It queries commits on master, which as long as we leave the mirror up, will be fine.

For now the mirror will be kept but the end goal is to completely remove the master branch.

@timsneath
Copy link
Contributor

It's worth noting that main is not fully working as a mirror of master yet, for anyone who might be tempted to try this early.

$ flutter channel
Flutter channels:
* master
  main
  beta
  stable
$ flutter channel main
Switching to flutter channel 'main'...
git: fatal: 'origin/main' is not a commit and a branch 'main' cannot be created from it
Switching channels failed with error code 128.
$ flutter channel master
Switching to flutter channel 'master'...
git: Already on 'master'
git: Your branch is up to date with 'upstream/master'.
Successfully switched to flutter channel 'master'.
To ensure that you're on the latest build from this channel, run 'flutter upgrade'

@godofredoc
Copy link
Contributor Author

It's worth noting that main is not fully working as a mirror of master yet, for anyone who might be tempted to try this early.

$ flutter channel
Flutter channels:
* master
  main
  beta
  stable
$ flutter channel main
Switching to flutter channel 'main'...
git: fatal: 'origin/main' is not a commit and a branch 'main' cannot be created from it
Switching channels failed with error code 128.
$ flutter channel master
Switching to flutter channel 'master'...
git: Already on 'master'
git: Your branch is up to date with 'upstream/master'.
Successfully switched to flutter channel 'master'.
To ensure that you're on the latest build from this channel, run 'flutter upgrade'

This is strange, is your original checkout from more than 10 months ago? the main branch has been mirroring master from ~1 year.

Does a git checkout master && git fetch upstream && git merge upstream/master fixes the problem?

@christopherfujino
Copy link
Member

git: fatal: 'origin/main' is not a commit and a branch 'main' cannot be created from it

I think this is actually a problem with your setup, it looks like the default fetch remote is origin (which I'm guessing is your fork), while the official channel "master" is set up to fetch from upstream (which I'm guessing is flutter/flutter).

@christopherfujino
Copy link
Member

Actually, the problem is we hard-code the remote name to be "origin": https://github.com/flutter/flutter/blob/main/packages/flutter_tools/lib/src/commands/channel.dart#L174

However, for non-contributors, the case should be that "origin" will be flutter/flutter.

@timsneath
Copy link
Contributor

Is this "you're a really weird and eccentric outlier, and we can ignore your specific machine configuration", or is this "you did git clone over a year ago", in which case this is a scenario we need to manage?

@christopherfujino
Copy link
Member

Is this "you're a really weird and eccentric outlier, and we can ignore your specific machine configuration", or is this "you did git clone over a year ago", in which case this is a scenario we need to manage?

The former. @timsneath Since I know you like to reproduce the average developer workflow, one thing you could do to get the out of the box flutter SDK experience is:

$ git clone git@github.com:flutter/flutter.git /path/to/flutter # clone the upstream remote as "origin"
$ cd /path/to/flutter
$ git checkout stable && git checkout beta # ensure the "stable" and "beta" branches are present locally, tracking "origin"
$ git remote add downstream git@github.com:timsneath/flutter # name your fork downstream

Now, you can open PRs by pushing your local branches to the downstream remote, but the official release channels will fetch from "origin", and any situations where the git tool implicitly assumes "origin" will work as they do for users who download the prebuilt archive from the website.

@timsneath
Copy link
Contributor

Ah, OK.

Yes, I see that I cloned my fork and set an upstream, as you surmised:

$ git remote -v
origin	git@github.com:timsneath/flutter.git (fetch)
origin	git@github.com:timsneath/flutter.git (push)
upstream	git@github.com:flutter/flutter.git (fetch)
upstream	git@github.com:flutter/flutter.git (push)

But that's what the wiki suggests, rather than your guide above: https://github.com/flutter/flutter/wiki/Setting-up-the-Framework-development-environment#set-up-your-environment

Should we change the wiki?

@christopherfujino
Copy link
Member

christopherfujino commented Mar 22, 2023

Ah, OK.

Yes, I see that I cloned my fork and set an upstream, as you surmised:

$ git remote -v
origin	git@github.com:timsneath/flutter.git (fetch)
origin	git@github.com:timsneath/flutter.git (push)
upstream	git@github.com:flutter/flutter.git (fetch)
upstream	git@github.com:flutter/flutter.git (push)

But that's what the wiki suggests, rather than your guide above: https://github.com/flutter/flutter/wiki/Setting-up-the-Framework-development-environment#set-up-your-environment

Should we change the wiki?

I've thought about it, although I wasn't sure of the cost of making countless other documentation I have that assumes origin is the devs fork suddenly obsolete. I can file a tracking issue for discussion: #123250

@sgehrman

This comment was marked as abuse.

@Hixie
Copy link
Contributor

Hixie commented Apr 2, 2023

Regardless of the quite valid reasons to want our project to be welcoming to all reasonable people, including and especially those who have been disenfranchised and oppressed, there are pragmatic reasons to want to maintain consistency across all our repositories and consistency with the default branch name across GitHub.

auto-submit bot pushed a commit to flutter/engine that referenced this issue Nov 2, 2023
Master branch is about to be archived and there is no need to keep mirroring main branch to master.

Bug: flutter/flutter#121564

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
@guidezpl guidezpl changed the title Identify requirements to migrate flutter/flutter from master to main Migrate the flutter/flutter repository to use main as the primary development branch/channel Apr 10, 2024
@guidezpl guidezpl changed the title Migrate the flutter/flutter repository to use main as the primary development branch/channel Migrate the flutter/flutter repository to use main as the primary development branch/channel Apr 10, 2024
guidezpl added a commit that referenced this issue Apr 17, 2024
- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links

Tested links manually and fixes a few broken or deprecated links

Added a test that validates that `master` isn't used, except for
specified repos.

Part of #121564

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
guidezpl added a commit to guidezpl/flutter that referenced this issue Apr 17, 2024
- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links

Tested links manually and fixes a few broken or deprecated links

Added a test that validates that `master` isn't used, except for
specified repos.

Part of flutter#121564

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
auto-submit bot pushed a commit that referenced this issue Apr 17, 2024
Reland #146558, reverted in #146880 due to an outdated test result

## Original description

- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links

Tested links manually and fixes a few broken or deprecated links

Added a test that validates that `master` isn't used, except for specified repos.

Part of #121564
guidezpl added a commit that referenced this issue Apr 19, 2024
I generalized the analysis to match all `googlesource.com` repos. I also
added a test and fixed more cases.

Part of #121564

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
guidezpl added a commit to flutter/platform_tests that referenced this issue Apr 19, 2024
gilnobrega pushed a commit to gilnobrega/flutter that referenced this issue Apr 22, 2024
- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links

Tested links manually and fixes a few broken or deprecated links

Added a test that validates that `master` isn't used, except for
specified repos.

Part of flutter#121564

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
gilnobrega pushed a commit to gilnobrega/flutter that referenced this issue Apr 22, 2024
Reland flutter#146558, reverted in flutter#146880 due to an outdated test result

## Original description

- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links

Tested links manually and fixes a few broken or deprecated links

Added a test that validates that `master` isn't used, except for specified repos.

Part of flutter#121564
gilnobrega pushed a commit to gilnobrega/flutter that referenced this issue Apr 22, 2024
I generalized the analysis to match all `googlesource.com` repos. I also
added a test and fixed more cases.

Part of flutter#121564

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-infra Owned by Infrastructure team
Projects
None yet
Development

No branches or pull requests

8 participants