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

Optimize the dirty dependency graph walk #27633

Merged

Conversation

aloubyansky
Copy link
Member

The current implementation may appear to be hanging processing (very) dirty dependency graphs. This change checks whether a dependency node has been already processed before walking its dependencies.

Fix #27589

@quarkus-bot quarkus-bot bot added the area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins label Aug 31, 2022
@aloubyansky aloubyansky added triage/backport-2.11? and removed area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins labels Aug 31, 2022
@@ -282,28 +283,23 @@ private DependencyNode resolveRuntimeDeps(CollectRequest request) throws AppMode
@Override
public DependencyNode transformGraph(DependencyNode node, DependencyGraphTransformationContext context)
throws RepositoryException {
final Set<ArtifactKey> visited = new HashSet<>();
final Map<DependencyNode, DependencyNode> visited = new IdentityHashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Using the Collections.newSetFromMap() utility is sometimes also nice :-)

final Set<ArtifactKey> visited = Collections.newSetFromMap(new IdentityHashMap<>());

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 31, 2022

Failing Jobs - Building 067e888

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
✔️ JVM Tests - JDK 17
✔️ JVM Tests - JDK 18

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/opentelemetry/opentelemetry/deployment 
! Skipped: extensions/opentelemetry/opentelemetry-exporter-jaeger/deployment extensions/opentelemetry/opentelemetry-exporter-otlp/deployment integration-tests/micrometer-prometheus and 6 more

📦 extensions/opentelemetry/opentelemetry/deployment

io.quarkus.opentelemetry.deployment.RestClientOpenTelemetryTest.urlWithoutAuthentication line 111 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: expected: <CLIENT> but was: <SERVER>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)

@gsmet
Copy link
Member

gsmet commented Aug 31, 2022

@aloubyansky I think the failure is unrelated. @radcortez it might be related to the same issue with CONSUMER timing we had elsewhere?

@aloubyansky I don't know if you want to change the Set/Map thing so I let you merge when you want.

@aloubyansky aloubyansky merged commit 9f8bd88 into quarkusio:main Aug 31, 2022
@quarkus-bot quarkus-bot bot added this to the 2.13 - main milestone Aug 31, 2022
@radcortez
Copy link
Member

@radcortez it might be related to the same issue with CONSUMER timing we had elsewhere?

Maybe. I did some digging here #27368.

And the puzzling part is that when the test fails, some spans have the same startTime, which messes with the expected order. That startTime is set by the OTel library, so we don't control that. I had a look and I didn't see anything out of the ordinary. I'm wondering if the server updates the SO time in the middle of the test and then it messes the spans, but it does seem a little far-fetched.

@gsmet gsmet modified the milestones: 2.13 - main, 2.12.1.Final Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quarkus startup hangs after upgrade to version 2.11.x.Final
4 participants