Skip to content

Conversation

@christopherfujino
Copy link
Contributor

@christopherfujino christopherfujino commented Apr 1, 2020

Description

Before this PR, the downgrade_upgrade_integration_test.dart was failing during fast forward, however the test swallowed the tool exit. The fast forward would fail because the upgrade command's resetChanges() method, intended to roll back from a hotfix commit back to the last published dev tag (e.g. from v1.9.1+hotfix.6 -> v1.9.1), however, in this test it was actually jumping forward from the temp repo's hotfix tag (e.g. v1.9.1+hotfix.6) to the source repo's last dev tag (e.g. v1.6.4), and then trying to fast forward resulted in a merge conflict, causing the git pull -ff to fail.

This PR gets rid of the merge conflict by starting from the dev branch, so that the reset is to a tag that is on the current branch, making a fast forward valid. It also checks the exit code of each step, to protect against regression.

Related Issues

Part of #53688.

Tests

This improves an existing test.

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.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@fluttergithubbot fluttergithubbot added tool Affects the "flutter" command-line tool. See also t: labels. work in progress; do not review labels Apr 1, 2020
@christopherfujino christopherfujino changed the title check exit code of downgrade_upgrade exit code Improve downgrade-upgrade integration test Apr 1, 2020
@christopherfujino christopherfujino marked this pull request as ready for review April 1, 2020 20:45
], workingDirectory: parentDirectory.path, trace: true);
expect(exitCode, 0);

// Step 2. Switch to the dev branch.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These comments refer to dev branch anyway :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh ... yes

Copy link
Contributor

@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

@christopherfujino christopherfujino merged commit 1a685e0 into flutter:master Apr 2, 2020
@christopherfujino christopherfujino deleted the minimal-upgrade-fix branch April 2, 2020 17:35
pcsosinski pushed a commit to pcsosinski/flutter that referenced this pull request Apr 6, 2020
pcsosinski pushed a commit that referenced this pull request Apr 6, 2020
* Support old and new git release tag formats (#53715)

* Improve downgrade-upgrade integration test (#53775)

* Fix diagnostics crash in profile mode (#53878)

* Prevent diagnostics crash in profile mode

* Prevent diagnostics crash in profile mode

Co-authored-by: Christopher Fujino <[email protected]>
Co-authored-by: Ferhat <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 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.

6 participants