Skip to content

Conversation

@gmackall
Copy link
Member

@gmackall gmackall commented Jun 27, 2023

Upgrades tests under dev/integration_tests to use the latest values in the templates. Most of this PR was auto-generated, by running find dev/integration_tests/ -type d -name 'android' | dart dev/tools/bin/generate_gradle_lockfiles.dart from the root of the flutter directory.

The pieces that were not are:

  1. Upgrading the Gradle versions used in integration tests to be >=7.4, in places where it was currently lower.
  2. Upgrading the mac, windows, and linux build_tests .ci.yaml configuration to use jdk 17 on all shards. It currently was using a mix of 17 and 11. This isn't desirable, because some of the tests require 17, and the distribution is random across shards (so they were only passing because they were getting randomly placed on shards using jdk 17).
  3. Adding a dependency on jdk 11 for the tests based on the firebaselab/firebaselab recipe. Previously they had no java dependency, and were therefore defaulting to java 1.8. The newer AGP versions necessitated an upgrade to 11 to run.

Note that it also ended up downgrading the AGP version in two places (in the hybrid_android_views and platform_interaction tests), because those had been manually edited to a newer version than the template.

Related to: #123636, #123910

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Jun 27, 2023
@gmackall
Copy link
Member Author

gmackall commented Jun 27, 2023

This may also unblock #122779 (see this comment), though the changes are worth landing independently.

@gmackall gmackall added the platform-android Android applications specifically label Jun 27, 2023
@gmackall gmackall marked this pull request as ready for review June 27, 2023 19:42
Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

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

LGTM! Can you note in the description where AGP was downgraded? I assume it's not a problem but may be good to remember.

@gmackall
Copy link
Member Author

LGTM! Can you note in the description where AGP was downgraded? I assume it's not a problem but may be good to remember.

Updated the description to link to the two places

@gmackall
Copy link
Member Author

As a follow up it might be good to make the shards these tests use for a specific platform (e.g. Mac build_tests_1_4,...,Mac build_tests_4_4) share a common configuration, or at least have a comment noting changes should be made to all shards.

Otherwise the test behavior is implicitly relying on the current distribution of tests across the shards, which makes it easy to introduce issues like this where failures only manifest on later, unrelated PRs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible and should we try and use named constants for these version numbers (here and elsewhere)?

Copy link
Member Author

@gmackall gmackall Jun 28, 2023

Choose a reason for hiding this comment

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

We could definitely make the templates use the values of some constants when generating the new build.gradle that we use to overwrite the existing (and link it to the versions we use to generate the build.gradle in new projects, if we wanted).

I'm actually not sure how lockfile generation would work if we made the values in the generated build.gradles be constants, though. My guess is that it would generate lockfiles based on the value of the constant, which would mean that whenever we updated the constant we would still need to re-run lockfile generation, essentially "replacing" the value anyways (with itself again). I can try it out though

Copy link
Member Author

@gmackall gmackall Jun 28, 2023

Choose a reason for hiding this comment

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

From testing it looks like constants in the build.gradle get resolved to their values in the lockfiles, so if we did use a constant in the generated build.gradle, it would still resolve to a specific value in the lockfile that wouldn't change in line with updates to the constant. So we would still need to re-run the script, which replaces the value in the generated build.gradle anyways.

I do think it could make sense to have the values in the generate_gradle_lockfiles.dart templates be constants, especially if we did want them to be the same as the values in templates we use to make a new project. I'll file an issue where we can make the decision (#129747).

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM.

@gmackall
Copy link
Member Author

gmackall commented Jun 28, 2023

It looks like previous versions of similar PRs have had a tendency to break in postsubmit (see d155bc1, 1e69683, 7165339).

cc'ing @christopherfujino as I see you've reviewed some of these past PRs - I tried running the devicelab tests that looked relevant to the tests I changed as outlined here, and I didn't run into any issues. Is there anything else you would recommend trying before merging? There still isn't a good way to run postsubmits before submitting, is there?

@christopherfujino
Copy link
Contributor

It looks like previous versions of similar PRs have had a tendency to break in postsubmit (see d155bc1, 1e69683, 7165339).

cc'ing @christopherfujino as I see you've reviewed some of these past PRs - I tried running the devicelab tests that looked relevant to the tests I changed as outlined here, and I didn't run into any issues. Is there anything else you would recommend trying before merging? There still isn't a good way to run postsubmits before submitting, is there?

You can test devicelab targets by temporarily changing presubmit: false to true in https://github.com/flutter/flutter/blob/master/.ci.yaml#L1593. Just remember to revert the changes before submitting :)

@gmackall
Copy link
Member Author

It looks like previous versions of similar PRs have had a tendency to break in postsubmit (see d155bc1, 1e69683, 7165339).
cc'ing @christopherfujino as I see you've reviewed some of these past PRs - I tried running the devicelab tests that looked relevant to the tests I changed as outlined here, and I didn't run into any issues. Is there anything else you would recommend trying before merging? There still isn't a good way to run postsubmits before submitting, is there?

You can test devicelab targets by temporarily changing presubmit: false to true in https://github.com/flutter/flutter/blob/master/.ci.yaml#L1593. Just remember to revert the changes before submitting :)

Awesome, thanks I'll try that!

@github-actions github-actions bot added c: contributor-productivity Team-specific productivity, code health, technical debt. and removed c: contributor-productivity Team-specific productivity, code health, technical debt. labels Jun 29, 2023
@gmackall
Copy link
Member Author

There were some failures in enabling the post-submits, but I checked the logs for each one and they all seemed infra-related (they never started for some reason).

Most passed though, and nothing indicated a problem with this change, so I'm going to go ahead and add autosubmit.

@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 30, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 30, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 30, 2023

auto label is removed for flutter/flutter, pr: 129642, due to - The status or check suite Mac customer_testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@christopherfujino
Copy link
Contributor

auto label is removed for flutter/flutter, pr: 129642, due to - The status or check suite Mac customer_testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

I'm working on fixing this upstream. You will have to rebase (not merge) upstream once the tree is fixed to fix the tests on your branch.

@gmackall gmackall force-pushed the integration_AGP_upgrade branch from aecb663 to e78f6fb Compare June 30, 2023 18:45
@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 30, 2023
@auto-submit auto-submit bot merged commit d1eb1f0 into flutter:master Jun 30, 2023
@gmackall
Copy link
Member Author

It looks like this caused two runs of the Mac build_tests_2_4 to fail for earlier PRs, because they ended up starting after (first, second) the changes landed, and I assume are pulling the latest .ci.yaml when the test gets started? That must be what is happening, because the dependencies section shows them using jdk 17, which is a change from this PR. Surprising, I would expect the .ci.yaml changes to only start taking effect in the builds for the current commit, not earlier.

Either way it shouldn't cause problems for future commits, though it may affect some presubmits until people merge or rebase.

@christopherfujino
Copy link
Contributor

It looks like this caused two runs of the Mac build_tests_2_4 to fail for earlier PRs, because they ended up starting after (first, second) the changes landed, and I assume are pulling the latest .ci.yaml when the test gets started? That must be what is happening, because the dependencies section shows them using jdk 17, which is a change from this PR. Surprising, I would expect the .ci.yaml changes to only start taking effect in the builds for the current commit, not earlier.

Either way it shouldn't cause problems for future commits, though it may affect some presubmits until people merge or rebase.

It's actually that these configurations are generated by a post-submit job, so there's always some lag between when the PR lands and when they take effect: https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20ci_yaml%20flutter%20roller/9809/overview

@christopherfujino
Copy link
Contributor

christopherfujino commented Jun 30, 2023

Oh, and it looks like these ran out of order https://ci.chromium.org/ui/p/flutter/builders/luci.flutter.prod/Linux%20ci_yaml%20flutter%20roller

This is already being tracked in #127063

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 1, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jul 1, 2023
flutter/flutter@ff838bc...aa5f4a2

2023-07-01 [email protected] Enable no_wildcard_variable_uses lint (flutter/flutter#129858)
2023-06-30 [email protected] mark packages-autoroller bringup again (flutter/flutter#129859)
2023-06-30 [email protected] Update `SwitchTheme` tests for M2/M3 (flutter/flutter#129811)
2023-06-30 [email protected] Change pub roller bot to push to flutter-pub-roller-bot/flutter.git (flutter/flutter#129844)
2023-06-30 [email protected] Fix NetworkImage causing spurious warning in tests (flutter/flutter#129537)
2023-06-30 [email protected] Roll Flutter Engine from 54b573e9c4e5 to e6b8292705a8 (4 revisions) (flutter/flutter#129852)
2023-06-30 [email protected] Upgrade integration tests to use AGP 7.3/Gradle 7.4 (flutter/flutter#129642)
2023-06-30 [email protected] Roll Packages from d4752c4 to 53ed5a0 (5 revisions) (flutter/flutter#129837)
2023-06-30 [email protected] Updated correct tasks for test ownership fix (flutter/flutter#129812)
2023-06-30 [email protected] Updated some golden image tests for M2/M3 (flutter/flutter#129794)
2023-06-30 [email protected] Remove an unnecessary assert (flutter/flutter#129796)
2023-06-30 [email protected] Update `Radio` tests for M2/M3 (flutter/flutter#129814)
2023-06-30 [email protected] Update `Switch` tests for M2/M3 (flutter/flutter#129810)
2023-06-30 [email protected] Roll Flutter Engine from 099a70ebbc60 to 54b573e9c4e5 (1 revision) (flutter/flutter#129821)
2023-06-30 [email protected] Update `SwitchListTile` tests for M2/M3 (flutter/flutter#129809)
2023-06-30 [email protected] Fix `NavigationDrawer` selected item has wrong icon color (flutter/flutter#129625)
2023-06-30 [email protected] Update basic_test.dart for M3 compliance (flutter/flutter#129714)
2023-06-30 [email protected] Roll Flutter Engine from d33343430f18 to 099a70ebbc60 (7 revisions) (flutter/flutter#129818)
2023-06-30 [email protected] Roll Flutter Engine from 68cc1a7971d5 to d33343430f18 (2 revisions) (flutter/flutter#129801)
2023-06-30 [email protected] Revert no-response to fork. (flutter/flutter#129775)
2023-06-30 [email protected] Make `DropdownMenu` be able to scroll to the highlighted item when searching. (flutter/flutter#129740)
2023-06-29 [email protected] Roll Flutter Engine from cd9ce66db14a to 68cc1a7971d5 (10 revisions) (flutter/flutter#129799)
2023-06-29 49699333+dependabot[bot]@users.noreply.github.com Bump actions/labeler from 4.1.0 to 4.2.0 (flutter/flutter#129797)
2023-06-29 [email protected] Roll Flutter Engine from eabb22900b44 to cd9ce66db14a (1 revision) (flutter/flutter#129756)
2023-06-29 [email protected] Remove `@NonNull` to avoid warning (flutter/flutter#129472)
2023-06-29 [email protected] Remove use of any (flutter/flutter#129793)
2023-06-29 [email protected] Prepare for utf8.encode() to return more precise Uint8List type (flutter/flutter#129769)
2023-06-29 [email protected] Deletes files that should be ignored (flutter/flutter#127984)
2023-06-29 [email protected] Fix flutter_plugins by rolling revision (flutter/flutter#129781)

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
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt. platform-android Android applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants