-
Notifications
You must be signed in to change notification settings - Fork 116
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
[Maven Extension] Maven daemon build fails on second run #164
Comments
|
@cyrille-leclerc the traces look unusual, but i'm quite new to this. Did you check them? There are spans for some module plugin executions appearing as their own root spans in Jaeger |
@delanym can you please attach a screenshot and indicate how I can reproduce locally? Did you use https://github.com/apache/maven as a test? what was your command line? |
Build with diff --git a/maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java b/maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java
index 77b1af127..b70eb2312 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java
@@ -56,7 +56,7 @@ public VersionNotFoundException( String projectId, Dependency dependency, File p
private static String formatLocationInPom( Dependency dependency )
{
- return "Dependency: " + ArtifactUtils.versionlessKey( dependency.getGroupId(), dependency.getArtifactId() );
+ return "dependency: " + ArtifactUtils.versionlessKey( dependency.getGroupId(), dependency.getArtifactId() );
}
public Dependency getDependency() |
@delanym while the build is not finished, it's a known limitation that the root span is missing. Once the build is finished, the root span should be visible. The reason of this missing root span while the build is not finished is that spans are exported by the OpenTelemetry SDK after they are finished and the root span finishes at the end of the build. Here is the view I get in Jaeger of "mvnd validate" on https//github.com/apache/maven after the build has completed. This view looks correct to me. |
Yes that was the case. It looks good then. |
@cyrille-leclerc it seems on v1.10.0-alpha its no longer sending a trace |
@delanym strange, it works on my environment with 1.1.10-alpha as you can see the Could you have forgotten to |
I had to restart the daemon: mvnd --stop. I shouldn't have to do that though. Gnodet says here about persisting data across invocations. Does the extension do that? Or maybe the issue is with mvnd itself not updating properly from .mvn/extensions.xml |
Do you have a problem of failure or a problem of configuration of the second build being ignored? |
Problem of configuration. Mvnd doesn't pick up the new version of the extension. |
@delanym Could you try with a |
@cyrille-leclerc mvnd is correctly starting another daemon when the extension changes. I do notice that the first time it does this the extension gives a warning: I'll look at #220 in the morning |
Thanks @delanym for verifying. I suspect |
Reproduce as in #160 but use mvnd instead of mvn
https://github.com/apache/maven-mvnd/releases/tag/0.7.1
mvnd validate -Dotel.traces.exporter=otlp -Dotel.exporter.otlp.endpoint=http://10.1.1.1:4317 -Dmaven.ext.class.path=/tmp/opentelemetry-maven-extension-1.10.0-SNAPSHOT.jar -T3
The first run is successful, but the second fails with:
Kill the daemon with
mvnd --stop
and try again and it works.The text was updated successfully, but these errors were encountered: