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

odo push passing even after removing the files from source #2422

Closed
amitkrout opened this issue Dec 2, 2019 · 6 comments
Closed

odo push passing even after removing the files from source #2422

amitkrout opened this issue Dec 2, 2019 · 6 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/Medium Nice to have issue. Getting it done before priority changes would be great. triage/duplicate Indicates an issue or PR that is a duplicate of other open issue or PR. triage/not-reproducible Indicates an issue can not be reproduced as described.

Comments

@amitkrout
Copy link
Contributor

amitkrout commented Dec 2, 2019

/kind bug

What versions of software are you using?

Operating System:
Supported
Output of odo version:
master

How did you run odo exactly?

$ odo create java --context
 /Users/amit/go/src/github.com/openshift/odo/tests/examples/source/openjdk 
--project test123
$ odo push
 --context /Users/amit/go/src/github.com/openshift/odo/tests/examples/source/openjdk
$ odo url create java --port 8080 --context 
/Users/amit/go/src/github.com/openshift/odo/tests/examples/source/openjdk
$ odo push --config --context 
/Users/amit/go/src/github.com/openshift/odo/tests/examples/source/openjdk
// Then access the route URL
// Then delete the source file (For example: MessageProducer.java)
$ odo push 
--context /Users/amit/go/src/github.com/openshift/odo/tests/examples/source/openjdk
Validation
 ✓  Checking component [841ms]
[...]
 ✓  Syncing files to the component [9s]
 ✓  Building component [18s]
 ✓  Changes successfully pushed to component  <------ Ideally it should report failure

//Then access the same route URL <------ Unable to access the page (Which looks good)

Check #2248 for more details

Actual behavior

second push succeeded

Expected behavior

Second push should fail

Any logs, error output, etc?

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 2, 2019
@amitkrout
Copy link
Contributor Author

ping @girishramnani

@amitkrout
Copy link
Contributor Author

/priority medium

@openshift-ci-robot openshift-ci-robot added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Dec 2, 2019
@girishramnani
Copy link
Contributor

some information on this issue is provided in this comment
#2248 (comment)

@kadel
Copy link
Member

kadel commented Dec 5, 2019

/triage duplicate
#2248
/close

@openshift-ci-robot
Copy link
Collaborator

@kadel: Closing this issue.

In response to this:

/triage duplicate
#2248
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the triage/duplicate Indicates an issue or PR that is a duplicate of other open issue or PR. label Dec 5, 2019
@kadel
Copy link
Member

kadel commented Dec 6, 2019

I'm not able to reproduce this.

When using the example that we have in tests/examples/source/openjdk odo push correctly fails after deleting src/main/java/MessageProducer.java

▶ odo push
Validation
 ✓  Checking component [361ms]

Configuration changes
 ✓  Initializing component
 ✓  Creating component [1s]

Applying URL changes
 ✓  URL java-openjdk-zazu-8080: http://java-openjdk-zazu-8080-app-tkmyproject.apps.ocp311.odo created

Pushing to component java-openjdk-zazu of type local
 ✓  Checking files for pushing [5ms]
 ✓  Waiting for component to start [5s]
 ✓  Syncing files to the component [3s]
 ✓  Building component [19s]
 ✓  Changes successfully pushed to component

▶ rm src/main/java/MessageProducer.java

▶ odo push
Validation
 ✓  Checking component [360ms]

Configuration changes
 ✓  Retrieving component data [483ms]
 ✓  Applying configuration [477ms]

Applying URL changes
 ✓  URL java-openjdk-zazu-8080 already exists

Pushing to component java-openjdk-zazu of type local
 ✓  Checking file changes for pushing [4ms]
 ✓  Waiting for component to start [120ms]
 ✓  Syncing files to the component [2s]
 ◑  Building component ✗  Unable to build files
+ set -eo pipefail
+ export ODO_UTILS_DIR=/opt/odo
+ ODO_UTILS_DIR=/opt/odo
+ export ODO_IMAGE_MAPPINGS_FILE=/opt/odo/language-scripts/image-mappings.json
+ ODO_IMAGE_MAPPINGS_FILE=/opt/odo/language-scripts/image-mappings.json
++ /opt/odo/bin/getlanguage
+ IMAGE_LANG=java
+ '[' '!' -z /home/jboss ']'
+ '[' /tmp '!=' /home/jboss ']'
+ '[' -n /opt/app-root/src-backup ']'
+ '[' '!' -d /opt/app-root/src-backup ']'
+ rsync -rlO /tmp/src/. /opt/app-root/src-backup/src/
+ b_IFS='
'
+ b_OFS=
+ OIFS='
'
+ IFS='
'
++ ls -A /tmp/src/
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.classpath
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.dummy
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.gitignore
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.odo
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.project
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.settings
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/pom.xml
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/src
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/target
+ OIFS=
+ IFS='
'
+ '[' -n redhat-openjdk-18/openjdk18-openshift ']'
+ '[' redhat-openjdk-18/openjdk18-openshift == redhat-openjdk-18/openjdk18-openshift ']'
+ rm -fr /tmp/src/target
+ '[' -f /tmp/src/.s2i/bin/assemble ']'
+ '[' -n java ']'
+ /opt/odo/language-scripts/java/dev-assemble
+ exec /usr/local/s2i/assemble
INFO Performing Maven build in /tmp/src
INFO Using MAVEN_OPTS -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
INFO Using Apache Maven 3.5.0 (Red Hat 3.5.0-4.3)
Maven home: /opt/rh/rh-maven35/root/usr/share/maven
Java version: 1.8.0_222, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.el7_7.x86_64/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.10.0-1062.1.1.el7.x86_64", arch: "amd64", family: "unix"
INFO Running 'mvn -e -Popenshift -DskipTests -Dcom.redhat.xpaas.repo.redhatga -Dfabric8.skip=true --batch-mode -Djava.net.preferIPv4Stack=true -s /tmp/artifacts/configuration/settings.xml -Dmaven.repo.local=/tmp/artifacts/m2  package'
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building javalin-hello-world 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ javalin-hello-world ---
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /tmp/src/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ javalin-hello-world ---
[WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /tmp/src/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /tmp/src/src/main/java/Application.java:[7,35] error: cannot find symbol
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.192 s
[INFO] Finished at: 2019-12-06T12:04:25Z
[INFO] Final Memory: 13M/162M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "openshift" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project javalin-hello-world: Compilation failure
[ERROR] /tmp/src/src/main/java/Application.java:[7,35] error: cannot find symbol
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project javalin-hello-world: Compilation failure
/tmp/src/src/main/java/Application.java:[7,35] error: cannot find symbol

	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
	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.apache.maven.plugin.CompilationFailureException: Compilation failure
/tmp/src/src/main/java/Application.java:[7,35] error: cannot find symbol

	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	... 20 more
[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/MojoFailureException

 ✗  Building component [4s]
 ✗  command terminated with exit code 1

▶

@openshift-ci-robot openshift-ci-robot added the triage/not-reproducible Indicates an issue can not be reproduced as described. label Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/Medium Nice to have issue. Getting it done before priority changes would be great. triage/duplicate Indicates an issue or PR that is a duplicate of other open issue or PR. triage/not-reproducible Indicates an issue can not be reproduced as described.
Projects
None yet
Development

No branches or pull requests

4 participants