-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
[CP] Add migrator to upgrade gradle version when conflict with Android Studio bundled Java version is detected (and 3 others) #126093
[CP] Add migrator to upgrade gradle version when conflict with Android Studio bundled Java version is detected (and 3 others) #126093
Conversation
This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter. Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed. |
3e79dcb
to
b1c77b7
Compare
86100fd
to
1f378e5
Compare
- Add task to projects evaluated by flutter.gradle that will print the java version. - Add integration test for the existence of javaVersion and the expected format. - Add gradle util to get the gradlew version for a specific platform (gradlew everywhere but windows). Why does this code need to exist? Figuring out what version of java is used by flutter/gradle is done in a few different ways that are not always aligned. See this issue flutter#122609 , this issue flutter#121501 this feature request flutter#106416 As examples of why assuming the java version is dangerous. This task is code flutter can build upon and is the version gradle is using to build no matter how it is configured. - [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] All existing and new tests are passing. --------- Co-authored-by: Mitchell Goodwin <58190796+MitchellGoodwin@users.noreply.github.com> Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com> Co-authored-by: Victoria Ashworth <vashworth@google.com> Co-authored-by: Jackson Gardner <jacksongardner@google.com> Co-authored-by: Rydmike <m.rydstrom@gmail.com> Co-authored-by: keyonghan <54558023+keyonghan@users.noreply.github.com> Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com> Co-authored-by: Taha Tesser <tessertaha@gmail.com> Co-authored-by: Ben Konyi <bkonyi@google.com> Co-authored-by: engine-flutter-autoroll <engine-flutter-autoroll@skia.org> Co-authored-by: hellohuanlin <41930132+hellohuanlin@users.noreply.github.com> Co-authored-by: Danny Tuppeny <danny@tuppeny.com> Co-authored-by: Chris Bracken <chris@bracken.jp> Co-authored-by: Kate Lovett <katelovett@google.com> Co-authored-by: Michael Goderbauer <goderbauer@google.com> Co-authored-by: Elias Yishak <42216813+eliasyishak@users.noreply.github.com> Co-authored-by: Christopher Fujino <fujino@google.com>
Fixes flutter#124756 by removing the concept of `Version.unknown`. `Version` fields that needed the ability to represent an unknown version have been made nullable. Assigning `null` to them represents an unknown version.
…droid Studio bundled Java version is detected (flutter#125836) This is an attempt to reland flutter#124085. Differences from this attempt and the last: 1. Adds a check for null android studio versions and a test for this case. 2. Wraps the migrate code in a try-catch [per the suggestion here](https://github.com/flutter/flutter/pull/125728/files#r1181747899). Old PR description: This PR adds an android project migrator that checks the version of android studio and the version of gradle for conflicts, and upgrades to 7.4 if a conflict is detected. For more detail about the particular conflict, see flutter#122376. The PR also upgrades older gradle versions being used in integration testing to 7.4. Fixes/related to: flutter#122376 and flutter#123636
1f378e5
to
67c6d07
Compare
This is bigger than I hoped it would be on the last day we can make cherry pick changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I grabbed @Hixie to talk about this CP. TLDR: We should accept this CP but do so as a dot release after google IO Factors for not accepting include:
Factors for accepting:
Conclusion, let the code live on master for a longer period of time to get some more testing then accept for a patch to 3.10. |
Just a friendly ping from PR review incase we wanted to start this process now |
7a5f8e9
into
flutter:flutter-3.10-candidate.1
On post submit, we are seeing a failure in [Mac_ios flutter_gallery_ios__start_up], I am rerunning the task but it does not look like a flake based on build history. Might have to revert it from stable if it does not pass on rerun. cc @CaseyHillers |
It looks like it succeeded on retry, is that correct? This particular test was last marked as flakey around a month ago #125106, with what looks to me like a similar failure (but I am not very knowledgable about this test). cc'ing @vashworth, from what I can see you've looked into the flakiness of this test somewhat recently, so if you have any input on if this is a known flake that would be great! But also understand if you're not the right person to ask |
Both https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20flutter_gallery_ios__start_up/10769/overview and https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20flutter_gallery_ios__start_up/10841/overview appear to be dart vm timeout flakes, which is a long standing issue across multiple iOS tests being tracked here: #121231. There is no fix as of yet other than rerunning |
thanks for inspecting! yeah it passed on rerun. right I only looked at the past 50 build history and didn't know it was a flake. landed on stable. |
Great, thanks for the clarification! |
…ith Android Studio bundled Java version is detected (and 3 others) (flutter/flutter#126093)
…d Studio bundled Java version is detected (and 3 others) (flutter#126093) This is a cherry pick of the following four PRs (the first one depends on changes made in the latter three). 1. flutter#125836 2. flutter#124771 3. flutter#123034 4. flutter#123644 For the first PR, Original issue: flutter#122376 Cherry-pick issue: flutter#125693 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* - [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] 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 --------- Co-authored-by: Reid Baker <reidbaker@google.com> Co-authored-by: Mitchell Goodwin <58190796+MitchellGoodwin@users.noreply.github.com> Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com> Co-authored-by: Victoria Ashworth <vashworth@google.com> Co-authored-by: Jackson Gardner <jacksongardner@google.com> Co-authored-by: Rydmike <m.rydstrom@gmail.com> Co-authored-by: keyonghan <54558023+keyonghan@users.noreply.github.com> Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com> Co-authored-by: Taha Tesser <tessertaha@gmail.com> Co-authored-by: Ben Konyi <bkonyi@google.com> Co-authored-by: engine-flutter-autoroll <engine-flutter-autoroll@skia.org> Co-authored-by: hellohuanlin <41930132+hellohuanlin@users.noreply.github.com> Co-authored-by: Danny Tuppeny <danny@tuppeny.com> Co-authored-by: Chris Bracken <chris@bracken.jp> Co-authored-by: Kate Lovett <katelovett@google.com> Co-authored-by: Michael Goderbauer <goderbauer@google.com> Co-authored-by: Elias Yishak <42216813+eliasyishak@users.noreply.github.com> Co-authored-by: Christopher Fujino <fujino@google.com> Co-authored-by: Andrew Kolos <andrewrkolos@gmail.com>
…d Studio bundled Java version is detected (and 3 others) (flutter#126093) This is a cherry pick of the following four PRs (the first one depends on changes made in the latter three). 1. flutter#125836 2. flutter#124771 3. flutter#123034 4. flutter#123644 For the first PR, Original issue: flutter#122376 Cherry-pick issue: flutter#125693 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* - [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] 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 --------- Co-authored-by: Reid Baker <reidbaker@google.com> Co-authored-by: Mitchell Goodwin <58190796+MitchellGoodwin@users.noreply.github.com> Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com> Co-authored-by: Victoria Ashworth <vashworth@google.com> Co-authored-by: Jackson Gardner <jacksongardner@google.com> Co-authored-by: Rydmike <m.rydstrom@gmail.com> Co-authored-by: keyonghan <54558023+keyonghan@users.noreply.github.com> Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com> Co-authored-by: Taha Tesser <tessertaha@gmail.com> Co-authored-by: Ben Konyi <bkonyi@google.com> Co-authored-by: engine-flutter-autoroll <engine-flutter-autoroll@skia.org> Co-authored-by: hellohuanlin <41930132+hellohuanlin@users.noreply.github.com> Co-authored-by: Danny Tuppeny <danny@tuppeny.com> Co-authored-by: Chris Bracken <chris@bracken.jp> Co-authored-by: Kate Lovett <katelovett@google.com> Co-authored-by: Michael Goderbauer <goderbauer@google.com> Co-authored-by: Elias Yishak <42216813+eliasyishak@users.noreply.github.com> Co-authored-by: Christopher Fujino <fujino@google.com> Co-authored-by: Andrew Kolos <andrewrkolos@gmail.com>
This is a cherry pick of the following four PRs (the first one depends on changes made in the latter three).
Version.unknown
#124771For the first PR,
Original issue: #122376
Cherry-pick issue: #125693
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.