-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[ci] Add a legacy Android build-all test #4005
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
[ci] Add a legacy Android build-all test #4005
Conversation
.ci/legacy_project/README.md
Outdated
|
||
It was originally created with Flutter 2.0.6. In general the guidelines are: | ||
- Pieces here should be self-contained; avoid making a hybrid of old and new | ||
projects except at major cut points (e.g., platform directories). This is |
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.
Can you expound on this a bit in the review? What is a major cut point? The example of platform directories didn't help me understand how to evaluate if flutter has hit another major cut point or not.
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.
I rewrote it to hopefully be clearer. What I was describing as "cut points" was meant to be about project structure, not Flutter releases. So for instance "the android directory" is a major cut point, whereas "the Java code from the android directory" would not be, because it can be strongly coupled to resources or configs that are not within that subset.
import 'common/package_command.dart'; | ||
import 'common/process_runner.dart'; | ||
import 'common/repository_package.dart'; | ||
|
||
const String _outputDirectoryFlag = 'output-dir'; | ||
@visibleForTesting | ||
|
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.
Whitespace after visibleForTesting
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.
Fixed, I forgot the autoformatter wants it after the declaration comment.
|
||
const String _projectName = 'all_packages'; | ||
/// The name of the build-all-packages project. |
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.
Can the comment state the intended format? For example The name of the build-all-packages project to be passed into flutter create
This helps differentiate it from the name of the app or if this is really just a directory.
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.
Done.
@@ -98,80 +114,152 @@ class CreateAllPackagesAppCommand extends PackageCommand { | |||
} | |||
|
|||
Future<int> _createApp() async { | |||
final io.ProcessResult result = io.Process.runSync( | |||
return processRunner.runAndStream( |
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.
Is this modifying the current all packages test to use kotlin?
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.
Yes; this is mentioned in the PR description. I'm not sure why it wasn't already, given that it's been the default for Flutter developers for a long time.
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.
yeah I read that in the description and was looking for the place where we made the swap. Where in the cl do we test the legacy version with java?
auto label is removed for flutter/packages, pr: 4005, due to - The status or check suite downgraded_analyze has failed. Please fix the issues identified (or deflake) before re-applying this label.
|
* main: (104 commits) [various] Remove unnecessary null checks (flutter#4060) [ci] Add a legacy Android build-all test (flutter#4005) Roll Flutter from ab57304 to 3437189 (5 revisions) (flutter#4062) [go_router] Nested stateful navigation with ShellRoute (flutter#2650) [go_router] Nested stateful navigation with ShellRoute (flutter#2650) [go_router] Nested stateful navigation with ShellRoute (flutter#2650) [in_app_purchases] Fix mismatching method signature strings (flutter#4040) [go_router] Nested stateful navigation with ShellRoute (flutter#2650) [go_router] Nested stateful navigation with ShellRoute (flutter#2650) [go_router] Nested stateful navigation with ShellRoute (flutter#2650) Roll Flutter from 077d644 to ab57304 (18 revisions) (flutter#4051) Roll Flutter from 5ae6438 to 077d644 (23 revisions) (flutter#4043) [local_auth] Migrate iOS to Pigeon (flutter#3974) [go_router] fix context extension for replaceNamed (flutter#3927) [image_picker] Fix crash due to `SecurityException` (flutter#4004) Roll Flutter from d0d1feb to 5ae6438 (42 revisions) (flutter#4038) [ci] Lower iOS LUCI timeouts (flutter#4035) [ci] Increase Android sharding (flutter#4029) [flutter_plugin_android_lifecycle] Fix lints (flutter#4030) [rfw] Fix a typo in the API documentation (flutter#4023) ...
flutter/packages@83959fb...d449a17 2023-05-22 [email protected] [various] Remove unnecessary null checks (flutter/packages#4060) 2023-05-22 [email protected] [ci] Add a legacy Android build-all test (flutter/packages#4005) 2023-05-22 [email protected] Roll Flutter from ab57304 to 3437189 (5 revisions) (flutter/packages#4062) 2023-05-22 [email protected] [go_router] Nested stateful navigation with ShellRoute (flutter/packages#2650) 2023-05-22 [email protected] [go_router] Nested stateful navigation with ShellRoute (flutter/packages#2650) 2023-05-22 [email protected] [go_router] Nested stateful navigation with ShellRoute (flutter/packages#2650) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@83959fb...d449a17 2023-05-22 [email protected] [various] Remove unnecessary null checks (flutter/packages#4060) 2023-05-22 [email protected] [ci] Add a legacy Android build-all test (flutter/packages#4005) 2023-05-22 [email protected] Roll Flutter from ab57304 to 3437189 (5 revisions) (flutter/packages#4062) 2023-05-22 [email protected] [go_router] Nested stateful navigation with ShellRoute (flutter/packages#2650) 2023-05-22 [email protected] [go_router] Nested stateful navigation with ShellRoute (flutter/packages#2650) 2023-05-22 [email protected] [go_router] Nested stateful navigation with ShellRoute (flutter/packages#2650) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Adds the ability to replace portions of the
flutter create
d app with saved copies, and adds a second build-all phase for Android that uses a Flutter 2.0.6-createdandroid/
directory (AGP 4.1, Gradle 6.7) to catch issues like flutter/flutter#125621 and flutter/flutter#125482 prior to release.Includes some incidental cleanup:
flutter create
, which made each new test add several seconds to the unit test suite.This is captured somewhat in the README in the legacy project directory, but to document the approach here: originally I was going to add flags to change individual items (AGP version, Gradle version), but quickly ran into the fact that selective downgrading is extremely fragile. E.g.,:
namespace
) that the AGP version it uses supports, so arbitrary future breakage is possible.It's also less useful as a real test of what a plugin client's project likely looks like. Starting with a complete platform directory, and doing whatever the minimal changes are to keep it working, will likely reflect a common real-world scenario. On the flip side, the reason this doesn't use a complete 2.0.6 project, but instead is based on specific platform directories, is that we don't want to waste time manually maintaining, e.g., old Dart code that is irrelevant to the goal of the test. For now this only uses Android because that's where we've seen problems in practice, but we can alway add other legacy platform tests later if we find a need.
Fixes flutter/flutter#125689
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).