Skip to content

Conversation

@flutter-pub-roller-bot
Copy link
Contributor

This PR was generated by flutter update-packages --force-upgrade.

@flutter-pub-roller-bot flutter-pub-roller-bot added tool Affects the "flutter" command-line tool. See also t: labels. autosubmit Merge PR when tree becomes green via auto submit App labels Oct 22, 2024
@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. a: internationalization Supporting other languages or locales. (aka i18n) d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos platform-web Web applications specifically f: integration_test The flutter/packages/integration_test plugin labels Oct 22, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 22, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 22, 2024

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

@christopherfujino
Copy link
Contributor

integration test failure:

18:58 +91 -1: test/integration.shard/isolated/native_assets_test.dart: flutter build apk with native assets release [E]
  Expected: a process with exit code 0
    Actual: <Instance of 'ProcessResult'>
     Which: Actual exitCode was 1
            Actual stdout:
            Resolving dependencies...
            
            Actual stderr:
            Because package_with_native_assets depends on link_hook from path which depends on logging 1.3.0, logging 1.3.0 is required.
            So, because package_with_native_assets depends on logging 1.2.0, version solving failed.
            
            
            You can try the following suggestion to make the pubspec resolve:
            * Try upgrading your constraint on logging: flutter pub add logging:^1.3.0
            Failed to update packages.

@christopherfujino
Copy link
Contributor

integration test failure:

18:58 +91 -1: test/integration.shard/isolated/native_assets_test.dart: flutter build apk with native assets release [E]
  Expected: a process with exit code 0
    Actual: <Instance of 'ProcessResult'>
     Which: Actual exitCode was 1
            Actual stdout:
            Resolving dependencies...
            
            Actual stderr:
            Because package_with_native_assets depends on link_hook from path which depends on logging 1.3.0, logging 1.3.0 is required.
            So, because package_with_native_assets depends on logging 1.2.0, version solving failed.
            
            
            You can try the following suggestion to make the pubspec resolve:
            * Try upgrading your constraint on logging: flutter pub add logging:^1.3.0
            Failed to update packages.

Given this, it looks like this integration test is using special test deps not from one of our pubspec.yamls in the tree, and thus the autoroller isn't rolling it.

@christopherfujino
Copy link
Contributor

integration test failure:

18:58 +91 -1: test/integration.shard/isolated/native_assets_test.dart: flutter build apk with native assets release [E]
  Expected: a process with exit code 0
    Actual: <Instance of 'ProcessResult'>
     Which: Actual exitCode was 1
            Actual stdout:
            Resolving dependencies...
            
            Actual stderr:
            Because package_with_native_assets depends on link_hook from path which depends on logging 1.3.0, logging 1.3.0 is required.
            So, because package_with_native_assets depends on logging 1.2.0, version solving failed.
            
            
            You can try the following suggestion to make the pubspec resolve:
            * Try upgrading your constraint on logging: flutter pub add logging:^1.3.0
            Failed to update packages.

Given this, it looks like this integration test is using special test deps not from one of our pubspec.yamls in the tree, and thus the autoroller isn't rolling it.

Ahh, ok, it's because we're "pinning" these deps (by essentially deleting the carets): https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/integration.shard/isolated/native_assets_test_utils.dart#L40

@dcharkes this will essentially block any pub autoroll that changes one of the transitive deps of this test app. I'm guessing we started pinning this because otherwise newly published packages would sometimes break these tests? I think we need to either:

a. figure out a way for the pub autoroller to also roll the lower constraints of the template pubspecs; or
b. stop testing the output of flutter create --template=*, and instead just check in the output of that command, so that the autoroller can still roll the deps.

@dcharkes
Copy link
Contributor

dcharkes commented Nov 4, 2024

@dcharkes this will essentially block any pub autoroll that changes one of the transitive deps of this test app. I'm guessing we started pinning this because otherwise newly published packages would sometimes break these tests?

Correct, I broke the test once by pushing a new version.

I think we need to either:

a. figure out a way for the pub autoroller to also roll the lower constraints of the template pubspecs; or b. stop testing the output of flutter create --template=*, and instead just check in the output of that command, so that the autoroller can still roll the deps.
b. stop testing the output of flutter create --template=*, and instead just check in the output of that command, so that the autoroller can still roll the deps.

No very strong opinions here. But I'd like to run at least one integration test for flutter create to make sure it's doing the right thing. I guess we could go for option B if we add a test that flutter create outputs what all the other tests are using verbatim.

Option a might not work if the roll actually change the syntax of what is in hook/build.dart, which I believe 0.8.0 to 0.9.0 might do.

(I'm OOO for two more weeks, please refer to @mkustermann in the meantime.)

@matanlurey
Copy link
Contributor

I don't understand much how auto-rolling works, but if native_assets_cli was also bumped:

+ native_assets_cli: 0.8.0
- native_assets_cli: 0.9.0

then we could rewrite the test (and the package template) to re-use the pinned value.

@mkustermann
Copy link
Member

So from my understanding this isn't related to package:native_assets_cli at all.

The situation seems to be as follows and only problematic due to package:logging dependencies:

  • flutter update-packages will update dev/integration_tests/link_hook/pubspec.yaml with package:logging to 1.3.0 (as it does with all other pubspec.yaml files in the flutter repository)
  • flutter create --template=package_ffi will generate a template with package:logging ^1.2.0
  • The test in question
    • making the template depend on dev/integration_tests/link_hook
    • changing the logging dependency from the template from ^1.2.0 to 1.2.0

So from my view

  • flutter update-packages is doing what it's supposed to
  • flutter create --template=package_ffi can generate templates with versions it determines (maybe there are use cases where we want to generate templates with older versions)

The problematic part is the test: It makes the ladder depend on the former and on top of that it makes dependencies pinned to an incompatible version.

=> So what I suggest we do is to make the test package (created via template) use the pinned package versions from dev/integration_tests/link_hook (for dependencies that are common among the two). All other dependencies that the template has on top of dev/integration_tests/link_hook it can pin as it does currently.
=> This will give us deterministic CI behavior (as we use flutter pined packages and remaining deps being pinned via template)
=> It avoids changing the flutter update-packages and flutter create --template=package_ffi (as their behavior seems reasonable)

@mkustermann
Copy link
Member

mkustermann commented Nov 5, 2024

I've landed 31c1292 which should make the native asset test more robust and not cause this version constraint conflict despite still using pinned deps for it's test.

@christopherfujino @matanlurey how to make the flutter-pub-roller make another roll attempt with updated pub deps?

I don't understand much how auto-rolling works, but if native_assets_cli was also bumped:

I'm working on a PR to bump to the new package:native_assets_cli, package:native_assets_builder and package:native_toolchain_c. It's not trivial to do, but shouldn't' take too long either.

@mkustermann
Copy link
Member

I've now both, landed 31c1292 which should avoid this issue in the future for this native asset test as well as rolled the native asset packages.

As I don't know how the auto roller for pub packages works, I've made a manual PR to update pub packages. Let's see if it goes green: #158268

@christopherfujino
Copy link
Contributor

I've now both, landed 31c1292 which should avoid this issue in the future for this native asset test as well as rolled the native asset packages.

As I don't know how the auto roller for pub packages works, I've made a manual PR to update pub packages. Let's see if it goes green: #158268

Thanks! Sorry, I've been distracted this week, but I appreciate you landing the fix and opening the new manual roll PR.

@christopherfujino
Copy link
Contributor

I'm gonna close this PR so that the bot will open a new one, including the regenerating gradle lockfiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: internationalization Supporting other languages or locales. (aka i18n) a: tests "flutter test", flutter_test, or one of our tests d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: integration_test The flutter/packages/integration_test plugin framework flutter/packages/flutter repository. See also f: labels. platform-web Web applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants