Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Imported extension fails when building integration #5097

Closed
mmuzikar opened this issue Apr 1, 2019 · 17 comments
Closed

Imported extension fails when building integration #5097

mmuzikar opened this issue Apr 1, 2019 · 17 comments
Assignees
Labels
cat/bug A bug which needs fixing closed/verified Used by QE to indicate that verified the issue prio/p1 The priority of a bug. p1 means high source/qe Raised by QE
Milestone

Comments

@mmuzikar
Copy link
Contributor

mmuzikar commented Apr 1, 2019

This is a...


[ ] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Documentation issue or request

Description

relates to #4981
If you import an exported integration which used extension then that extension is imported as well, but for some reason the imported integration can't be built if you use the imported extension.

I tried to build the same integration with importing everything manually (not from the integration zip) and the integration builds and works.

Attaching log from the build phase

Using docker.io/syndesis/syndesis-s2i@sha256:e35869ed9172c40493993684585dfcafdb289a1950be1cf683c91869389e3b96 as the s2i builder image
Preparing to build temp.builder.openshift.io/syndesis/i-todo-test-1:b003d79d
Copying sources from "/tmp/build/inputs" to "/tmp/upload/src"
Clean build will be performed
Running "assemble" in "temp.builder.openshift.io/syndesis/i-todo-test-1:b003d79d"
tar: scripts: time stamp 2019-04-01 07:23:10 is 0.072104575 s in the future
tar: src/pom.xml: time stamp 2019-04-01 07:23:10 is 0.071196303 s in the future
tar: src/src/main/java/io/syndesis/example/Application.java: time stamp 2019-04-01 07:23:10 is 0.07098253 s in the future
tar: src/src/main/java/io/syndesis/example: time stamp 2019-04-01 07:23:10 is 0.070946878 s in the future
tar: src/src/main/java/io/syndesis: time stamp 2019-04-01 07:23:10 is 0.07091485 s in the future
tar: src/src/main/java/io: time stamp 2019-04-01 07:23:10 is 0.070892865 s in the future
tar: src/src/main/java: time stamp 2019-04-01 07:23:10 is 0.070872002 s in the future
tar: src/src/main/resources/application.properties: time stamp 2019-04-01 07:23:10 is 0.070798193 s in the future
tar: src/src/main/resources/loader.properties: time stamp 2019-04-01 07:23:10 is 0.070739909 s in the future
tar: src/src/main/resources/syndesis/integration/integration.json: time stamp 2019-04-01 07:23:10 is 0.070615818 s in the future
tar: src/src/main/resources/syndesis/integration: time stamp 2019-04-01 07:23:10 is 0.070577298 s in the future
tar: src/src/main/resources/syndesis: time stamp 2019-04-01 07:23:10 is 0.070548766 s in the future
tar: src/src/main/resources: time stamp 2019-04-01 07:23:10 is 0.070521214 s in the future
tar: src/src/main: time stamp 2019-04-01 07:23:10 is 0.070492891 s in the future
tar: src/src: time stamp 2019-04-01 07:23:10 is 0.070469384 s in the future
tar: src: time stamp 2019-04-01 07:23:10 is 0.070445621 s in the future
==================================================================
Starting S2I Java Build .....
S2I source build for Maven detected
Using MAVEN_OPTS '-XX:+UseG1GC -XX:+UseStringDeduplication -Xmx310m'
Found pom.xml ...
Running 'mvn -Dmaven.repo.local=/tmp/artifacts/m2 package -DskipTests -Dmaven.javadoc.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Djacoco.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true -Dpmd.skip=true -Dfabric8.skip=true -e -B '
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Maven home: /opt/maven
Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.10.0-957.5.1.el7.x86_64", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Downloading from 01_maven_central: https://repo1.maven.org/maven2/org/apache/camel/camel-spring-boot-dependencies/2.21.0.fuse-730054/camel-spring-boot-dependencies-2.21.0.fuse-730054.pom 
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.apache.camel:camel-spring-boot-dependencies:pom:2.21.0.fuse-730054 in 01_maven_central (https://repo1.maven.org/maven2 ) @ line 52, column 19
@
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.apache.camel:camel-spring-boot-dependencies:pom:2.21.0.fuse-730054 in 01_maven_central (https://repo1.maven.org/maven2 ) @ line 52, column 19
at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:383)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects (DefaultGraphBuilder.java:414)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor (DefaultGraphBuilder.java:405)
at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:82)
at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:507)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR]   The project io.syndesis.integrations:project:0.1-SNAPSHOT (/tmp/src/pom.xml) has 1 error
[ERROR]     Non-resolvable import POM: Could not find artifact org.apache.camel:camel-spring-boot-dependencies:pom:2.21.0.fuse-730054 in 01_maven_central (https://repo1.maven.org/maven2 ) @ line 52, column 19 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact org.apache.camel:camel-spring-boot-dependencies:pom:2.21.0.fuse-730054 in 01_maven_central (https://repo1.maven.org/maven2 )
at org.apache.maven.project.ProjectModelResolver.resolveModel (ProjectModelResolver.java:197)
at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement (DefaultModelBuilder.java:1247)
at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:458)
at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:424)
at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:583)
at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:373)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects (DefaultGraphBuilder.java:414)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor (DefaultGraphBuilder.java:405)
at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:82)
at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:507)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.apache.camel:camel-spring-boot-dependencies:pom:2.21.0.fuse-730054 in 01_maven_central (https://repo1.maven.org/maven2 )
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:422)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:224)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:201)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:260)
at org.apache.maven.project.ProjectModelResolver.resolveModel (ProjectModelResolver.java:193)
at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement (DefaultModelBuilder.java:1247)
at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:458)
at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:424)
at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:583)
at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:373)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects (DefaultGraphBuilder.java:414)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor (DefaultGraphBuilder.java:405)
at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:82)
at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:507)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.apache.camel:camel-spring-boot-dependencies:pom:2.21.0.fuse-730054 in 01_maven_central (https://repo1.maven.org/maven2 )
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed (ArtifactTransportListener.java:48)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:365)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute (BasicRepositoryConnector.java:583)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:259)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:498)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:399)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:224)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:201)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:260)
at org.apache.maven.project.ProjectModelResolver.resolveModel (ProjectModelResolver.java:193)
at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement (DefaultModelBuilder.java:1247)
at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:458)
at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:424)
at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:583)
at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:373)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects (DefaultGraphBuilder.java:414)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor (DefaultGraphBuilder.java:405)
at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:82)
at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:507)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException 
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException 
Aborting due to error code 1 for Maven build
error: build error: non-zero (13) exit code from docker.io/syndesis/syndesis-s2i@sha256:e35869ed9172c40493993684585dfcafdb289a1950be1cf683c91869389e3b96

And also the exported integration todo-test-export.zip

@mmuzikar mmuzikar added cat/bug A bug which needs fixing prio/p0 The priority of a bug. p0 means blocking source/qe Raised by QE labels Apr 1, 2019
@pure-bot pure-bot bot added the notif/triage The issue needs triage. Applied automatically to all new issues. label Apr 1, 2019
@heiko-braun heiko-braun removed the notif/triage The issue needs triage. Applied automatically to all new issues. label Apr 1, 2019
@heiko-braun heiko-braun added this to the Sprint 44 milestone Apr 1, 2019
@heiko-braun
Copy link
Collaborator

heiko-braun commented Apr 1, 2019

@mmuzikar This looks to me as if the spme of the prod artefacts cannot resolved from central, which is expected I think:

Non-resolvable import POM: Could not find artifact org.apache.camel:camel-spring-boot-dependencies:pom:2.21.0.fuse-730054 in 01_maven_central

@heiko-braun
Copy link
Collaborator

Or is 2.21.0.fuse-730054 a dev build?

@mmuzikar
Copy link
Contributor Author

mmuzikar commented Apr 1, 2019

I am on the 1.6.X branch if that helps, but I think this was also happening on master on Friday

@heiko-braun
Copy link
Collaborator

@dhirajsb Can you try to reproduce it on 1.6.x?

@dhirajsb
Copy link
Contributor

dhirajsb commented Apr 1, 2019

I will take a look at this today.

@zregvart
Copy link
Member

zregvart commented Apr 1, 2019

The 2.21.0.fuse-730054 version needs to be present in the S2I image of the environment running the imported integration. Could it be that it was exported with this version and then run with a different version in the S2I image?

@dhirajsb
Copy link
Contributor

dhirajsb commented Apr 1, 2019

@zregvart yeah, that seems like a likely possibility.

@dhirajsb
Copy link
Contributor

dhirajsb commented Apr 2, 2019

@heiko-braun i have found a potential bug in the way extensions are being imported when part of an integration. I am working on a fix that I will finish tomorrow.

@heiko-braun
Copy link
Collaborator

@mmuzikar Can you redo the test? We suspect that between exporting and importing the dev build artefacts have been purged (they have a short lifespan)

@heiko-braun
Copy link
Collaborator

Thanks @dhirajsb , so we don't need to redo the test for now?

@heiko-braun heiko-braun added prio/p1 The priority of a bug. p1 means high and removed prio/p0 The priority of a bug. p0 means blocking labels Apr 2, 2019
@heiko-braun
Copy link
Collaborator

Changing to p1 after chatting to @gaughan

@mmuzikar
Copy link
Contributor Author

mmuzikar commented Apr 3, 2019

I tested importing the integrations again. The same error happens when I use the exported integration I provided (which is from an older instance of Syndesis) but exporting and then importing in the same version works correctly.

zregvart added a commit that referenced this issue Apr 3, 2019
Fixes #5097, fixed extension import to write files with correct id, which was causing project generation to fail
@pure-bot pure-bot bot locked as resolved and limited conversation to collaborators Apr 3, 2019
@pure-bot pure-bot bot reopened this Apr 3, 2019
@pure-bot pure-bot bot unlocked this conversation Apr 3, 2019
@zregvart
Copy link
Member

zregvart commented Apr 3, 2019

With #5126 merged to master should we backport to 1.6.x (even if it's p1). The fix looks straightforward. For added confidence we can test this on master...

@heiko-braun
Copy link
Collaborator

I think Dhiraj created a separate PR to backport this

@heiko-braun
Copy link
Collaborator

Its here #5127

@dhirajsb
Copy link
Contributor

dhirajsb commented Apr 3, 2019

@mmuzikar I tested the zip you provided in a 1.7.x instance and it worked with no issues. I did not see the same issue in 1.6.x either. But I was having some other trouble late last night with missing 1.6-SNAPSHOT artifacts in S2I build for some reason, which should be in the 1.6.x S2I image already. I am planning on testing it again today on a fresh build.

Also, the issue I fixed would actually show up if you exported and imported into a brand new instance. Or you could reinstall and try importing the same zip again. I discovered it while I was messing around with the DB and I deleted the old extension records.

We apparently need to test more import use cases.

@mmuzikar
Copy link
Contributor Author

Verifying this took a little longer because of #2436 and #5163
So apart from those two issues importing an integration using extensions is working fine.

@mmuzikar mmuzikar added the closed/verified Used by QE to indicate that verified the issue label Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cat/bug A bug which needs fixing closed/verified Used by QE to indicate that verified the issue prio/p1 The priority of a bug. p1 means high source/qe Raised by QE
Projects
None yet
Development

No branches or pull requests

4 participants