Skip to content

Conversation

@DanTup
Copy link
Contributor

@DanTup DanTup commented Mar 30, 2023

The bot rolling packages is failing here:

#123350 (comment).

Exhausted heap space, trying to allocate 34359738384 bytes.
Unhandled exception:
Out of Memory

It appears that there's a circular dependency between test_api and matcher which this script gets stuck following until it runs out of memory.

This change preferences adding packages that have already been added, and prevents the crash in my local machine.

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Mar 30, 2023
@DanTup DanTup mentioned this pull request Mar 30, 2023
@goderbauer
Copy link
Member

goderbauer commented Mar 30, 2023

It appears that there's a circular dependency between test_api and matcher which this script gets stuck following until it runs out of memory.

Will that circular dependency cause any other trouble? It seems like a smell, but I don't know what (negative) effects it could have.

If circular dependencies like that are undesirable, the script should probably fail gracefully instead of OOMing or just ignoring this.

@natebosch
Copy link
Contributor

Will that circular dependency cause any other trouble? It seems like a smell, but I don't know what (negative) effects it could have.

Mostly it causes pain while publishing those packages. There are potential impacts on modular builds, but we are sure with these packages that we never introduce module cycles.

@goderbauer
Copy link
Member

@natebosch said on the other issue:

It is expected temporarily. We will break the cycle in the next breaking version of test_api, but I'll first have to clean up a bunch of places in flutter/flutter where test_api was imported against the deprecation warning.

@natebosch Do you have an issue for breaking that cycle that we can link here to remove this workaround and instead fail the check gracefully if a cycle is detected?

@natebosch
Copy link
Contributor

Do you have an issue for breaking that cycle

I can file, one... dart-lang/test#1979

and instead fail the check gracefully if a cycle is detected?

It's not clear to me why we'd specifically want to fail. Package cycles are not intended to cause pain for anyone outside of the publisher.

final List<String> currentDependencies = (currentPackage['dependencies']! as List<Object?>).cast<String>();
for (final String dependency in currentDependencies) {
workset.add(dependencyTree[dependency]!);
// Don't add dependencies we've already seen or we will get stuck
Copy link
Member

Choose a reason for hiding this comment

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

Can you link to dart-lang/test#1979 with a TODO to re-evaluate this once that issue is closed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

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

auto-submit bot commented Mar 30, 2023

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

  • The status or check suite docs-linux has failed. Please fix the issues identified (or deflake) before re-applying this label.

@DanTup DanTup added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 30, 2023
@auto-submit auto-submit bot merged commit d163620 into flutter:master Mar 30, 2023
@DanTup DanTup deleted the fix-loop branch March 30, 2023 21:01
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2023
exaby73 pushed a commit to NevercodeHQ/flutter that referenced this pull request Apr 17, 2023
…123802)

Prevent bots/analyze.dart crashing on circular dependencies
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
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants