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

Migrate gallery ios tests to build+test #111164

Merged
merged 15 commits into from May 10, 2023
Merged

Conversation

keyonghan
Copy link
Contributor

Part of #103542

@flutter-dashboard flutter-dashboard bot added the team Infra upgrades, team productivity, code health, technical debt. See also team: labels. label Sep 8, 2022
@keyonghan keyonghan marked this pull request as draft September 8, 2022 03:37
dev/devicelab/lib/tasks/gallery.dart Outdated Show resolved Hide resolved
dev/devicelab/lib/tasks/gallery.dart Outdated Show resolved Hide resolved
dev/devicelab/lib/tasks/gallery.dart Outdated Show resolved Hide resolved
dev/devicelab/lib/tasks/gallery.dart Outdated Show resolved Hide resolved
.ci.yaml Outdated
@@ -3706,6 +3706,7 @@ targets:
tags: >
["devicelab", "ios", "mac"]
task_name: flutter_gallery__transition_perf_e2e_ios
artifact: gallery__transition_perf_e2e_ios
Copy link
Member

Choose a reason for hiding this comment

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

These artifacts can't be shared, flutter_gallery__transition_perf_e2e_impeller_ios it built with impeller and flutter_gallery__transition_perf_e2e_ios is not.

It seems like we should have some more generic way to do this, like hashing the example/integration_test app directory and the build flags? Also, some tests build the app multiple times with different flags (debug, profile, release).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, different tasks with different building args are not sharing these artifact.
I am planning to drop this artifact property for non-sharing ones. If two tasks do share the same artifact, we will specify the artifact explicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Latest change: removed the artifact property here. In general, if artifact is not specified, task name will be used as artifact for the task. On the other side, if specified, the task will use it, and other task will share it if same artifact is defined.

This way, we have an assumption that each task builds a single artifact. This way, tasks that follow build+test+build+test etc. will not be supported for the later artifact sharing. As talked in go/devicelab-build-test, the later build should be covered in the test step.

Please let me know if this makes sense to you.

@keyonghan keyonghan marked this pull request as ready for review March 17, 2023 20:30
.ci.yaml Outdated
]
os: Mac-12
device_type: none
xcode: 14c18 # Xcode 14.2 to support iOS 16.2 in devicelab.
Copy link
Member

Choose a reason for hiding this comment

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

How are the recipes chosen? If it's devicelab this is fine since @godofredoc has said it has hermetic Xcode caches, and it seems like the Mac_build_test tests are going to need tethered devices. However if it's not the devicelab recipe then it should be

Suggested change
xcode: 14c18 # Xcode 14.2 to support iOS 16.2 in devicelab.
xcode: 14a5294e # xcode 14.0 beta 5

because of the Xcode cache issues: #117541 (comment)

@godofredoc can you clarify if this is right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. The parent build is running on a host only bot, and should use same xcode as other host only targets. Updated to use 14a5294e and added comments to clarify

Copy link
Member

@jmagman jmagman Mar 22, 2023

Choose a reason for hiding this comment

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

They need to be 14c18 if they are run on physical devices (which all of these are) since that version supports iOS 16.2, which is what the devices are running. I guess the individual builds need to override?
By the way if it wasn't for the Xcode caching issues #117541 (comment) I would make them all 14c18 instead of having different versions for different scenarios.

Copy link
Contributor Author

@keyonghan keyonghan Mar 23, 2023

Choose a reason for hiding this comment

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

The devicelab_drone_build_test recipe currently injects the devicelab_osx_sdk version based on property xcode to run test. This will cause the test run on a devicelab bot but with an xcode version defined for the build running on the host only bot. This is clearly not expected.

Based on current logics (ci.yaml roller & cocoon scheduler) which auto generate targets' xcode (devicelab_osx_sdk or osx_sdk) based on the platform xcode, this PR as of now will not work.

With two xcode versions, we expect:

  • osx_sdk: 14a5294e for build step on the host only bot
  • devicelab_osx_sdk: 14c18 for test step on the devicelab bot.

We get:

  • same version for both.

To make this PR work, one way we can do is twist both the ci.yaml roller and cocoon scheduler to add both osx_sdk and devicelab_osx_sdk to the target. But this will add additional complexity to existing logics.

On the other hand, I do not see we will have a short-term fix on the xcode issue. To make things easier and unblock here. I am thinking to add clean cache flag to host only bots, allowing bots a couple of days to clean up old xcode's cache and prepare for the new version. This way, we will be unblocked here for all devicelab mitgration to build+test, and also make xcode version consistent across host only and devicelab targets.

With that being said, and considering ongoing frequent xcode changes, we should this to Q2.

@godofredoc before the xcode issue resolved from root (hopefully in Q2), do you have any objection for the above proposal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

.ci.yaml Show resolved Hide resolved
dev/devicelab/lib/tasks/gallery.dart Show resolved Hide resolved
dev/devicelab/lib/tasks/gallery.dart Outdated Show resolved Hide resolved
@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

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

@jmagman
Copy link
Member

jmagman commented May 1, 2023

Swapping out myself as a reviewer for @christopherfujino.

@christopherfujino
Copy link
Member

@keyonghan is this ready for review?

@keyonghan
Copy link
Contributor Author

@keyonghan is this ready for review?

Yes. Please help take a look. (sorry about the noise to restore the format)

deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createGalleryTransitionE2ETest());
await task(createGalleryTransitionE2EBuildTest(args));
Copy link
Member

Choose a reason for hiding this comment

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

do we ever use these args?

Copy link
Contributor Author

@keyonghan keyonghan May 10, 2023

Choose a reason for hiding this comment

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

We do. See GalleryTransitionBuildTest extends BuildTestTask, which parses these args. For context, this is how these args look like: https://flutter.googlesource.com/recipes/+/refs/heads/main/recipes/devicelab/devicelab_drone_build_test.py#142

Copy link
Member

Choose a reason for hiding this comment

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

I see. so we were never parsing these args (for this particular test) before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct. These args are used for build+test tasks only.

Btw: Linux gallery tasks have been running in prod for months, example: Linux_build_test flutter_gallery__transition_perf

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@keyonghan keyonghan added the autosubmit Merge PR when tree becomes green via auto submit App label May 10, 2023
@auto-submit auto-submit bot merged commit 8ab782d into flutter:master May 10, 2023
140 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
auto-submit bot pushed a commit that referenced this pull request May 11, 2023
…ets (#126482)

This is a follow up of #111164.

My local LED was based on `cpu: x86` dimension and `xcode` dependency. But these are missed in the above PR, which caused test failure: https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_build_test%20flutter_gallery__transition_perf_e2e_ios/19/overview
camsim99 pushed a commit to flutter/packages that referenced this pull request May 12, 2023
flutter/flutter@8c5a1ea...a76dbe4

2023-05-10 engine-flutter-autoroll@skia.org Manual roll Flutter Engine
from 8ca16cba8c38 to 78f41a8f2f06 (2 revisions) (flutter/flutter#126392)
2023-05-10 stuartmorgan@google.com Roll flutter/packages to 0167d83
(flutter/flutter#126427)
2023-05-10 54558023+keyonghan@users.noreply.github.com Migrate gallery
ios tests to build+test (flutter/flutter#111164)
2023-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from
824cd09b8c62 to 8ca16cba8c38 (5 revisions) (flutter/flutter#126360)
2023-05-09 kevinjchisholm@google.com Revert "Provide default constraints
for M3 dialogs" (flutter/flutter#126355)
2023-05-09 engine-flutter-autoroll@skia.org Roll Packages from
4800d65 to 1f91710 (8 revisions) (flutter/flutter#126352)
2023-05-09 chillers@google.com [github] Add labeler action
(flutter/flutter#126012)
2023-05-09 severin.hamader@yahoo.de Fix platformLocation path and search
dropping (flutter/flutter#126232)
2023-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from
8d3a8162b3ab to 824cd09b8c62 (10 revisions) (flutter/flutter#126309)
2023-05-09 leroux_bruno@yahoo.fr Update FocusNode documentation
(flutter/flutter#126331)
2023-05-09 goderbauer@google.com Remove dead code
(flutter/flutter#126266)
2023-05-09 44755140+werainkhatri@users.noreply.github.com fix AppBar's
docs for backgroundColor (flutter/flutter#126194)

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
camillesimon@google.com,rmistry@google.com,stuartmorgan@google.com 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
auto-submit bot pushed a commit that referenced this pull request May 16, 2023
#126941)

Target `Mac_build_test flutter_gallery__transition_perf_e2e_ios` was enabled in staging: #111164, and it has passed more than 50 runs: https://ci.chromium.org/p/flutter/builders/staging/Mac_build_test%20flutter_gallery__transition_perf_e2e_ios?limit=50. 

Manually enabling it in prod and removing the old `Mac_ios flutter_gallery__transition_perf_e2e_ios`.

The `Mac_build_test` one does the same thing as `Mac_ios` one, but separating build and test steps in separate targets.

Context: #103542
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
…ets (flutter#126482)

This is a follow up of flutter#111164.

My local LED was based on `cpu: x86` dimension and `xcode` dependency. But these are missed in the above PR, which caused test failure: https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_build_test%20flutter_gallery__transition_perf_e2e_ios/19/overview
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
flutter#126941)

Target `Mac_build_test flutter_gallery__transition_perf_e2e_ios` was enabled in staging: flutter#111164, and it has passed more than 50 runs: https://ci.chromium.org/p/flutter/builders/staging/Mac_build_test%20flutter_gallery__transition_perf_e2e_ios?limit=50. 

Manually enabling it in prod and removing the old `Mac_ios flutter_gallery__transition_perf_e2e_ios`.

The `Mac_build_test` one does the same thing as `Mac_ios` one, but separating build and test steps in separate targets.

Context: flutter#103542
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
…r#3958)

flutter/flutter@8c5a1ea...a76dbe4

2023-05-10 engine-flutter-autoroll@skia.org Manual roll Flutter Engine
from 8ca16cba8c38 to 78f41a8f2f06 (2 revisions) (flutter/flutter#126392)
2023-05-10 stuartmorgan@google.com Roll flutter/packages to 0167d83
(flutter/flutter#126427)
2023-05-10 54558023+keyonghan@users.noreply.github.com Migrate gallery
ios tests to build+test (flutter/flutter#111164)
2023-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from
824cd09b8c62 to 8ca16cba8c38 (5 revisions) (flutter/flutter#126360)
2023-05-09 kevinjchisholm@google.com Revert "Provide default constraints
for M3 dialogs" (flutter/flutter#126355)
2023-05-09 engine-flutter-autoroll@skia.org Roll Packages from
4800d65 to 1f91710 (8 revisions) (flutter/flutter#126352)
2023-05-09 chillers@google.com [github] Add labeler action
(flutter/flutter#126012)
2023-05-09 severin.hamader@yahoo.de Fix platformLocation path and search
dropping (flutter/flutter#126232)
2023-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from
8d3a8162b3ab to 824cd09b8c62 (10 revisions) (flutter/flutter#126309)
2023-05-09 leroux_bruno@yahoo.fr Update FocusNode documentation
(flutter/flutter#126331)
2023-05-09 goderbauer@google.com Remove dead code
(flutter/flutter#126266)
2023-05-09 44755140+werainkhatri@users.noreply.github.com fix AppBar's
docs for backgroundColor (flutter/flutter#126194)

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
camillesimon@google.com,rmistry@google.com,stuartmorgan@google.com 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 team Infra upgrades, team productivity, code health, technical debt. See also team: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants