[flutter_tools] auto-migrate dev users to beta#97028
[flutter_tools] auto-migrate dev users to beta#97028fluttergithubbot merged 7 commits intoflutter:masterfrom
Conversation
| if (kObsoleteBranches.containsKey(channel)) { | ||
| final String alternative = kObsoleteBranches[channel]!; | ||
| globals.printStatus("Transitioning from '$channel' to '$alternative'..."); | ||
| return _checkout(alternative); |
There was a problem hiding this comment.
Question: should we prompt the user first before migrating them to beta?
| /// For example, in 2021 we deprecated the "dev" channel and transitioned "dev" | ||
| /// users to the "beta" channel. | ||
| const Map<String, String> kObsoleteBranches = <String, String>{ | ||
| 'dev': 'beta', |
There was a problem hiding this comment.
might as well add alpha here too (also going to beta), for completeness...
There was a problem hiding this comment.
i guess maybe not, we'd also have to add hackathon and codelab and at some point there's a question of how much we care to have all these on master, since they only matter on the actual branch going away. In fact, if anything, this can literally just be a single hard-coded pair (and ditch the map), since there will never be a case where this needs to be more than one thing.
|
Is the idea here that we would push one last commit to |
Good point. So right now, all beta releases get duplicated to dev, so we can stop doing that once this code gets published to beta/dev. |
|
Sorry this comment is coming in a bit late, but I think users on dev would have been just as well served with a message explaining how to move themselves to a good channel rather than doing an auto-migration. While the auto-migration is certainly very convenient for users, polish might have been better applied in other places. |
This change affects Flutter users who are currently on the
devchannel (which was recently deprecated #94962). When they issueflutter upgrade, they will first be migrated to thebetabranch, then the regular upgrade flow will continue.This PR is based on restoring the functionality that was removed in 0b88269#diff-5b253435730ab79efc0fca2a9d48fa84a24c298c2435784d77b31b82c3bb7ed4
Fixes #94967
Tested locally by:
dev:git push origin deprecate-dev:devgit commit --allow-empty -m 'empty commit'beta:git push origin deprecate-dev:betagit checkout -b dev && git branch -D deprecate-devgit fetch --tags -fgit branch --set-upstream-to origin/devFLUTTER_GIT_URLenv var:FLUTTER_GIT_URL="[email protected]:<username>/flutter.git" bin/flutter upgrade