Re: [onos-dev] Building trellis-t3 app

41 views
Skip to first unread message

Pier Luigi Ventre

unread,
Nov 18, 2020, 7:24:29 AM11/18/20
to Chris Ward, trellis-dev
Moving on to trellis-dev.

Hi Chris,
we have never built with that docker tag so far - we have been using 3.6.3-openjdk-11-slim. If you need to build the apps - please use that.
Also I tried to replicate your failure but I have not found that tag on the official repository of maven. Is that a latest ? Or did you manually build ?

Thanks
Pier  

On Nov 18, 2020, at 1:01 PM, Chris Ward <tjc...@gmail.com> wrote:

I'm trying to build the trellis-t3 and trellis-control apps. Attempting to build each of these with the specified
docker run -it --rm -v $HOME/.m2:/root/.m2 -v $PWD:/root/trellis-t3 -w /root/trellis-t3 maven:3.6.4-openjdk-11 mvn clean install
command results in an error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project t3-app: Compilation failure
[ERROR] /root/trellis-t3/app/src/main/java/org/onosproject/t3/api/NetworkConfigNib.java:[93,39] An unhandled exception was thrown by the Error Prone static analysis plugin.
[ERROR]      Please report this at https://github.com/google/error-prone/issues/new and include the following:
[ERROR]  
[ERROR]      error-prone version: 2.3.3
I reported this to github as requested, and was told that this bug is already fixed in error-prone 2.3.4 . So the question is, how to build with this version of error-prone instead of 2.3.3 . Asking on the Maven 'users' mailing list suggests that I need to change the pom in onosproject to achieve this, but I'm not sure how to do this. Can anyone help ?

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/f3267396-80f8-4892-938a-3cfb1af074edn%40onosproject.org.

Chris Ward

unread,
Nov 19, 2020, 5:31:33 AM11/19/20
to Trellis Developers, pi...@opennetworking.org, trellis-dev, Chris Ward
I tried building using the command in trellis-control README.md ,
docker run -it --rm -v $HOME/.m2:/root/.m2 -v $PWD:/root/trellis-control -w /root/trellis-control maven:3.6.3-openjdk-11 mvn clean install
This failed with the error (I got the same failure when trying with 3.6.3-openjdk-11-slim), but it is possible to override the version of error-prone on the command line, and
docker run -it --rm -v $HOME/.m2:/root/.m2 -v $PWD:/root/trellis-control -w /root/trellis-control maven:3.6.3-openjdk-11 mvn clean install -Derrorprone.version=2.3.4
worked.

It looks like the following patch is needed to ONOS :
$ git diff
diff --git a/tools/package/dependencies/template.pom b/tools/package/dependencies/template.pom
index 8a67b3bbd7..a5aac3a116 100644
--- a/tools/package/dependencies/template.pom
+++ b/tools/package/dependencies/template.pom
@@ -37,7 +37,7 @@
         <maven.version.min>3.3.9</maven.version.min>
         <java.version.min><!-- JAVA_VERSION --></java.version.min>
         <onos.version><!-- ONOS_VERSION --></onos.version>
-        <errorprone.version>2.3.3</errorprone.version>
+        <errorprone.version>2.3.4</errorprone.version>
     </properties>
 
     <dependencyManagement>
I'm building from tags on Maven Central; I don't have any local override files.

Pier Luigi Ventre

unread,
Nov 19, 2020, 7:10:06 AM11/19/20
to Chris Ward, Trellis Developers
I am looking into this but I cannot replicate and I do not see the failure on the CI jobs.
I see warnings related to errorprone but not exceptions.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.errorprone.util.FindIdentifiers (file:/root/.m2/repository/com/google/errorprone/error_prone_check_api/2.3.3/error_prone_check_api-2.3.3.jar) to method com.sun.tools.javac.comp.Resolve.findIdent(com.sun.tools.javac.comp.Env,com.sun.tools.javac.util.Name,com.sun.tools.javac.code.Kinds$KindSelector)
WARNING: Please consider reporting this to the maintainers of com.google.errorprone.util.FindIdentifiers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[WARNING] /root/trellis-control/impl/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java:[864,51] unchecked call to HashSet(java.util.Collection<? extends E>) as a member of the raw type java.util.HashSet
[WARNING] /root/trellis-control/impl/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java:[864,51] unchecked conversion
  required: java.util.Set<org.onosproject.segmentrouting.pwaas.L2TunnelDescription>
  found:    java.util.HashSet

In the meanwhile, if you have any hint to replicate the issue (any extra step you may have done) please let me know.

Thanks
Pier

Eric Tang

unread,
Nov 19, 2020, 8:19:47 AM11/19/20
to Trellis Developers, pi...@opennetworking.org, Trellis Developers, tjc...@gmail.com
Hi Pier,

This is how the problem can be replicated:
 (presumably master branch).
2. Run the docker command to build as mentioned in README.md. In my environment an extra parameter “—network host” was added.

Regards,
Eric

Pier Luigi Ventre

unread,
Nov 19, 2020, 8:37:26 AM11/19/20
to Eric Tang, Trellis Developers, tjc...@gmail.com
Hi Eric,
I tried the same but no luck.

I uploaded a patch to upgrade error prone here:

Nothing has changed for me, still see the same warnings but no exceptions.

Thanks
Pier

Eric Tang

unread,
Nov 19, 2020, 8:49:36 AM11/19/20
to Pier Luigi Ventre, Trellis Developers, tjc...@gmail.com
Hi Pier,

Let’s wait until Maven repository is updated to retry:
Regards,
Eric

Pier Luigi Ventre

unread,
Nov 19, 2020, 9:03:55 AM11/19/20
to Eric Tang, Trellis Developers, tjc...@gmail.com
Hi Eric,
we need to merge the patch and release at least a beta tag.

If you want to try in your environment (like I did), you can build the patch and publish the artifacts on your local .m2 repo.

bazel build onos && onos-publish -l

(before the command above, you may need to fix the permissions of your .m2 - docker run may change the owner of some folders) 

Then, you need to modify the apps to point 2.2.7-SNAPSHOT.

Thanks
Pier

Eric Tang

unread,
Nov 19, 2020, 9:12:22 AM11/19/20
to Pier Luigi Ventre, Trellis Developers, tjc...@gmail.com
Hi Pier,

I hacked error-prone version in file below and build ok:
~/.m2/repository/org/onosproject/onos-dependencies/2.2.7-b2/onos-dependencies-2.2.7-b2.pom

I leave others to check if necessary.

Regards,
Eric

You received this message because you are subscribed to the Google Groups "Trellis Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trellis-dev...@opennetworking.org.
To view this discussion on the web visit https://groups.google.com/a/opennetworking.org/d/msgid/trellis-dev/F3EC97EB-30E6-43EC-8256-A381C8E12F65%40opennetworking.org.
Reply all
Reply to author
Forward
0 new messages