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

switching channel prompts to run flutter upgrade #49511

Merged

Conversation

mannprerak2
Copy link
Contributor

Description

Added print statements to prompt user to run flutter upgrade after running flutter channel foo

Related Issues

resolves #16030

Tests

None... simply added print statements

Here's an output from my system:

Switching to flutter channel 'beta'...
git: Switched to branch 'beta'
git: Your branch is up-to-date with 'origin/beta'.
Successfully switched to flutter channel 'beta'.
Now run "flutter upgrade" to ensure that you're on the latest build from this channel.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.

@fluttergithubbot
Copy link
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 26, 2020
@mannprerak2
Copy link
Contributor Author

Can this also close #14979 ?

@zanderso
Copy link
Member

@jonahwilliams is this consistent with your plans for flutter upgrade ?

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

I would adjust the phrasing slightly. Maybe "To ensure you're on the lastest build for this channel, run flutter upgrade"

@jonahwilliams
Copy link
Member

There are some existing tests in https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart

that check if stdout contains the right strings, this addition should have a basic smoke test there

@mannprerak2
Copy link
Contributor Author

https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart

@jonahwilliams but the changes are related to running flutter channel, where should I add those tests?

@jonahwilliams
Copy link
Member

Oh, sorry I wasn't thinking. It would go in the channel_test.dart file

@mannprerak2
Copy link
Contributor Author

@jonahwilliams added a test

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM with nit

@mannprerak2 mannprerak2 removed the request for review from zanderso January 29, 2020 17:07
@mannprerak2
Copy link
Contributor Author

@jonahwilliams I added the complete line Successfully switched to flutter channel 'beta'.
Also, If this seems fine, can you add the label for automated merging

@jonahwilliams
Copy link
Member

Thanks for the contribution!

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Cirrus CI has failed. Please fix the issues identified (or deflake) before re-applying this label.

@jonahwilliams
Copy link
Member

Looks like this change broke another test:

00:25 +880 ~5 -1: test/general.shard/channel_test.dart: channel removes version stamp file when switching channels [E]                                                                                 
  Expected: <1>
    Actual: <2>

@mannprerak2 can you take a look?

@mannprerak2
Copy link
Contributor Author

Fixed.. I didn't know calls to verify were neccesary

verify(mockProcessManager.start(
        <String>['git', 'fetch'],
        workingDirectory: anyNamed('workingDirectory'),
        environment: anyNamed('environment'),
      )).called(1);

@mannprerak2
Copy link
Contributor Author

@jonahwilliams can you look into why tool_tests-commands-macos test is failing?
If it's some other network or device error shouldn't this be set to automatic re-run?

@mannprerak2 mannprerak2 force-pushed the prompt-upgrade-after-switching-channel branch from a6fd06b to c5c047c Compare January 30, 2020 17:52
@dnfield dnfield merged commit 688948b into flutter:master Jan 31, 2020
@mannprerak2 mannprerak2 deleted the prompt-upgrade-after-switching-channel branch February 1, 2020 08:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switching channels should prompt to run flutter upgrade
7 participants