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

[camera] Manual roll and skip failing tests #7891

Merged
merged 9 commits into from
Oct 24, 2024

Conversation

bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Oct 18, 2024

See flutter/flutter#157181

Also updates the build_all_packages test to handle android/app/build.gradle(.kts) filename.

Pre-launch Checklist

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

@bparrishMines bparrishMines changed the title man roll and test skip [camera] Manual roll and skip failing tests Oct 18, 2024
@stuartmorgan
Copy link
Contributor

What's the status of this? Are we planning on landing this (or something like it), or getting the roll started again blocked on the failing tests?

@bparrishMines
Copy link
Contributor Author

@stuartmorgan I reran this multiple times, but it looks like the video_player tests began failing and I wasn't able to finish investigating why.

@bparrishMines
Copy link
Contributor Author

I updated to the lasts flutter/flutter version. Will try and skip additional tests if this doesn't work.

@bparrishMines
Copy link
Contributor Author

bparrishMines commented Oct 24, 2024

@stuartmorgan
@flutter/android-reviewers FYI

The build all packages test was failing because it looks like android/app/build.gradle moved to .../build.gradle.kts.

Changed 52 dependencies!
12 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Unhandled exception:
PathNotFoundException: Cannot open file, path = './all_packages/android/app/build.gradle' (OS Error: No such file or directory, errno = 2)
#0      _File.throwIfError (dart:io/file_impl.dart:675:7)
#1      _File.openSync (dart:io/file_impl.dart:490:5)
#2      _File.readAsBytesSync (dart:io/file_impl.dart:574:18)
#3      _File.readAsStringSync (dart:io/file_impl.dart:624:18)
#4      ForwardingFile.readAsStringSync (package:file/src/forwarding/forwarding_file.dart:99:16)
#5      CreateAllPackagesAppCommand._updateAppGradle (package:flutter_plugin_tools/src/create_all_packages_app_command.dart:224:39)
#6      CreateAllPackagesAppCommand.run (package:flutter_plugin_tools/src/create_all_packages_app_command.dart:109:7)
<asynchronous suspension>
#7      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#8      main.<anonymous closure> (package:flutter_plugin_tools/src/main.dart:105:12)
<asynchronous suspension>

Edit
Whoops, now new errors are popping up. Fixing the script now.

* Where:
Build file '/b/s/w/ir/x/w/packages/all_packages/android/app/build.gradle.kts' line: 10

* What went wrong:
Script compilation errors:

  Line 10: compileSdk 34
                      ^ Unexpected tokens (use ';' to separate expressions on the same line)

  Line 23:         multiDexEnabled true
                                  ^ Unexpected tokens (use ';' to separate expressions on the same line)

  Line 28: minSdkVersion 21
                         ^ Unexpected tokens (use ';' to separate expressions on the same line)

  Line 28: minSdkVersion 21
           ^ Function invocation 'minSdkVersion(...)' expected

  Line 28: minSdkVersion 21
           ^ None of the following functions can be called with the arguments supplied: 
               public abstract fun minSdkVersion(minSdkVersion: Int): Unit defined in com.android.build.api.dsl.ApplicationDefaultConfig
               public abstract fun minSdkVersion(minSdkVersion: String?): Unit defined in com.android.build.api.dsl.ApplicationDefaultConfig

  Line 48:     implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0-rc01'
                              ^ Unexpected tokens (use ';' to separate expressions on the same line)

  Line 48:     implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0-rc01'
               ^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
                   public val NamedDomainObjectContainer<Configuration>.implementation: NamedDomainObjectProvider<Configuration> defined in org.gradle.kotlin.dsl

@bparrishMines bparrishMines requested review from stuartmorgan and a team October 24, 2024 03:44
@bparrishMines bparrishMines marked this pull request as ready for review October 24, 2024 03:44
Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

I thought create all packages ran as part of presubmit and would have been caught before we merged the kts migration.

// minSdkVersion 21 is required by camera_android.
'minSdkVersion': <String>['minSdkVersion 21'],
'compileSdkVersion': <String>['compileSdk 34'],
if (gradleFileIsKotlin)
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting nit can you include {} around this case?

Copy link
Contributor

Choose a reason for hiding this comment

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

Collection conditionals can't use braces, unfortunately.

'minSdkVersion': <String>['minSdkVersion 21'],
'compileSdkVersion': <String>['compileSdk 34'],
if (gradleFileIsKotlin)
'compileSdk': <String>['compileSdk = 34']
Copy link
Contributor

Choose a reason for hiding this comment

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

Not part of this pr but this should probably be 35.

@stuartmorgan
Copy link
Contributor

I thought create all packages ran as part of presubmit and would have been caught before we merged the kts migration.

I assume that was a flutter/flutter change? The only flutter/packages test we run in flutter/flutter is Dart analysis.

@reidbaker
Copy link
Contributor

I thought create all packages ran as part of presubmit and would have been caught before we merged the kts migration.

I assume that was a flutter/flutter change? The only flutter/packages test we run in flutter/flutter is Dart analysis.

Ah you are right, I reviewed that framework pr from bartek then worked with jesswrd on a packages pr and my brain mixed them up. Also her pr has not landed. Either way sorry for the breakage as we migrate to kotlin code in more places.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM; thanks for getting this over the line and the roller unblocked!

' multiDexEnabled = true'
else
' multiDexEnabled true'
],
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can remove this due to the minSdkVersion being 21, but I'll look into that as a follow-up.

@stuartmorgan
Copy link
Contributor

Either way sorry for the breakage as we migrate to kotlin code in more places.

The surgery we do to the project in create-all-packages is inherently fragile; it's totally expected that it would break from time to time and we'd need to fix it in rolls.

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 24, 2024
@auto-submit auto-submit bot merged commit a556f0f into flutter:main Oct 24, 2024
76 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 24, 2024
@bparrishMines bparrishMines deleted the man_roll branch October 24, 2024 16:13
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 24, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 24, 2024
flutter/packages@5e03bb1...a556f0f

2024-10-24 [email protected] [camera] Manual roll and skip failing tests (flutter/packages#7891)
2024-10-23 49699333+dependabot[bot]@users.noreply.github.com [image_picker]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/image_picker/image_picker_android/android (flutter/packages#7898)
2024-10-23 49699333+dependabot[bot]@users.noreply.github.com [url_launcher]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/url_launcher/url_launcher_android/android (flutter/packages#7906)
2024-10-23 [email protected] [pigeon] Allows swift generator to skip error class generation (flutter/packages#7849)
2024-10-23 49699333+dependabot[bot]@users.noreply.github.com [in_app_pur]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/in_app_purchase/in_app_purchase_android/android (flutter/packages#7903)
2024-10-23 49699333+dependabot[bot]@users.noreply.github.com [file_selector]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/file_selector/file_selector_android/android (flutter/packages#7900)
2024-10-23 [email protected] [video_player_android] Give `can pause` integration test range to test for (flutter/packages#7913)

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] 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 p: camera
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants