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

Scenario "should push only the modified files" fails on 4.4 cluster because of No such file or directory in "/tmp/src/" #2639

Closed
amitkrout opened this issue Feb 26, 2020 · 2 comments · Fixed by #2729 or #2772
Assignees
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects

Comments

@amitkrout
Copy link
Contributor

/kind bug

What versions of software are you using?

Operating System:
All supported
Output of odo version:
master

How did you run odo exactly?

make test-cmd-push

Actual behavior

Fails

Expected behavior

Should pass

Any logs, error output, etc?

------------------------------
odo push command tests Test push outside of the current working direcory 
  should push only the modified files
  /Users/amit/go/src/github.com/openshift/odo/tests/integration/cmd_push_test.go:270

Creating a new project: wldapjazfv
Running odo with args [odo project create wldapjazfv -w -v4]
[odo]  •  Waiting for project to come up  ...
[odo] I0226 17:22:41.209372    3218 occlient.go:538] Project wldapjazfv now exists
[odo]  ✓  Waiting for project to come up [2s]
[odo]  ✓  Project 'wldapjazfv' is ready for use
[odo]  ✓  New project created and now using project: wldapjazfv
Created dir: /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467
Current working dir: /Users/amit/go/src/github.com/openshift/odo/tests/integration
Current working dir: /Users/amit/go/src/github.com/openshift/odo/tests/integration
Setting current dir to: /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467
Running git with args [git clone https://github.com/openshift/nodejs-ex /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467/nodejs-ex]
[git] Cloning into '/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467/nodejs-ex'...
Running odo with args [odo component create nodejs:latest nodejs --project wldapjazfv --context /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467/nodejs-ex --app app]
[odo] Warning: nodejs:latest is not fully supported by odo, and it is not guaranteed to work
[odo]  •  Validating component  ...
[odo]  ✓  Validating component [568ms]
[odo] 
[odo] Please use `odo push` command to create the component with source deployed
Running odo with args [odo url create --port 8080 --context /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467/nodejs-ex]
[odo]  ✓  URL nodejs-8080 created for component: nodejs
[odo] 
[odo] To create URL on the OpenShift Cluster, please use `odo push`
Running odo with args [odo push --context /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467/nodejs-ex]
[odo] Validation
[odo]  •  Checking component  ...
[odo]  ✓  Checking component [737ms]
[odo] 
[odo] Configuration changes
[odo]  ✓  Initializing component
[odo]  •  Creating component  ...
[odo]  ✓  Creating component [2s]
[odo] 
[odo] Applying URL changes
[odo]  ✓  URL nodejs-8080: http://nodejs-8080-app-wldapjazfv.apps.gamore44ci2602.devcluster.openshift.com created
[odo] 
[odo] Pushing to component nodejs of type local
[odo]  •  Checking files for pushing  ...
[odo]  ✓  Checking files for pushing [3ms]
[odo]  •  Waiting for component to start  ...
[odo]  ✓  Waiting for component to start [30s]
[odo]  •  Syncing files to the component  ...
[odo]  ✓  Syncing files to the component [6s]
[odo]  •  Building component  ...
[odo]  ✓  Building component [12s]
[odo]  ✓  Changes successfully pushed to component
Running oc with args [oc get route -n wldapjazfv -l app.kubernetes.io/instance=nodejs -l app.kubernetes.io/part-of=app -o jsonpath={.items[0].spec.host}]
[oc] nodejs-8080-app-wldapjazfv.apps.gamore44ci2602.devcluster.openshift.comChecking http://nodejs-8080-app-wldapjazfv.apps.gamore44ci2602.devcluster.openshift.com, for Welcome to your Node.js
try 0 of 30
Running oc with args [oc get pods --namespace wldapjazfv --selector=deploymentconfig=nodejs-app -o jsonpath='{.items[0].metadata.name}']
[oc] 'nodejs-app-1-qhf7h'Running oc with args [oc exec nodejs-app-1-qhf7h --namespace wldapjazfv -c nodejs-app -- stat /tmp/src/server.js]
[oc] stat: cannot stat '/tmp/src/server.js': No such file or directory
[oc] command terminated with exit code 1
Running oc with args [oc get pods --namespace wldapjazfv --selector=deploymentconfig=nodejs-app -o jsonpath='{.items[0].metadata.name}']
[oc] 'nodejs-app-1-qhf7h'Running oc with args [oc exec nodejs-app-1-qhf7h --namespace wldapjazfv -c nodejs-app -- stat /tmp/src/views/index.html]
[oc] stat: cannot stat '/tmp/src/views/index.html': No such file or directory
[oc] command terminated with exit code 1
Replacing "Welcome to your Node.js application on OpenShift" with "UPDATED!" in /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467/nodejs-ex/views/index.html
Running odo with args [odo push --context /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467/nodejs-ex]
[odo] Validation
[odo]  •  Checking component  ...
[odo]  ✓  Checking component [751ms]
[odo] 
[odo] Configuration changes
[odo]  •  Retrieving component data  ...
[odo]  ✓  Retrieving component data [1s]
[odo]  •  Applying configuration  ...
[odo]  ✓  Applying configuration [1s]
[odo] 
[odo] Applying URL changes
[odo]  ✓  URL nodejs-8080 already exists
[odo] 
[odo] Pushing to component nodejs of type local
[odo]  •  Checking file changes for pushing  ...
[odo]  ✓  Checking file changes for pushing [2ms]
[odo]  •  Waiting for component to start  ...
[odo]  ✓  Waiting for component to start [254ms]
[odo]  •  Syncing files to the component  ...
[odo]  ✓  Syncing files to the component [3s]
[odo]  •  Building component  ...
[odo]  ✓  Building component [8s]
[odo]  ✓  Changes successfully pushed to component
Checking http://nodejs-8080-app-wldapjazfv.apps.gamore44ci2602.devcluster.openshift.com, for UPDATED!
try 0 of 30
Running oc with args [oc get pods --namespace wldapjazfv --selector=deploymentconfig=nodejs-app -o jsonpath='{.items[0].metadata.name}']
[oc] 'nodejs-app-1-qhf7h'Running oc with args [oc exec nodejs-app-1-qhf7h --namespace wldapjazfv -c nodejs-app -- stat /tmp/src/views/index.html]
[oc] stat: cannot stat '/tmp/src/views/index.html': No such file or directory
[oc] command terminated with exit code 1
Running oc with args [oc get pods --namespace wldapjazfv --selector=deploymentconfig=nodejs-app -o jsonpath='{.items[0].metadata.name}']
[oc] 'nodejs-app-1-qhf7h'Running oc with args [oc exec nodejs-app-1-qhf7h --namespace wldapjazfv -c nodejs-app -- stat /tmp/src/server.js]
[oc] stat: cannot stat '/tmp/src/server.js': No such file or directory
[oc] command terminated with exit code 1
Setting current dir to: /Users/amit/go/src/github.com/openshift/odo/tests/integration
Deleting project: wldapjazfv
Running odo with args [odo project delete wldapjazfv -f]
[odo] This project contains the following applications, which will be deleted
[odo] Application app
[odo] This application has following components that will be deleted
[odo] component named nodejs
[odo] This component has following urls that will be deleted with component
[odo] URL named nodejs-8080 with host nodejs-8080-app-wldapjazfv.apps.gamore44ci2602.devcluster.openshift.com having protocol http at port 8080
[odo] No services / could not get services
[odo]  •  Deleting project wldapjazfv  ...
[odo]  ✓  Deleting project wldapjazfv [13s]
[odo]  ✓  Deleted project : wldapjazfv
Deleting dir: /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/617678467
Setting current dir to: /Users/amit/go/src/github.com/openshift/odo/tests/integration


• Failure [117.375 seconds]
odo push command tests
/Users/amit/go/src/github.com/openshift/odo/tests/integration/cmd_push_test.go:14
  Test push outside of the current working direcory
  /Users/amit/go/src/github.com/openshift/odo/tests/integration/cmd_push_test.go:74
    should push only the modified files [It]
    /Users/amit/go/src/github.com/openshift/odo/tests/integration/cmd_push_test.go:270

    Expected
        <string>: 
    not to equal
        <string>: 

    /Users/amit/go/src/github.com/openshift/odo/tests/integration/cmd_push_test.go:333
------------------------------
@amitkrout amitkrout added kind/bug Categorizes issue or PR as related to a bug. area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering labels Feb 26, 2020
@amitkrout
Copy link
Contributor Author

For now i am considering this as a test blocker on 4.4, will investigate it further.

@girishramnani girishramnani added this to For consideration in Sprint 181 via automation Mar 9, 2020
@mik-dass
Copy link
Contributor

Due to #2663 (comment), the /tmp/src folder is empty. Thus the test scenario fails because we are using hard coded values in the test script https://github.com/openshift/odo/blob/1edac87c8524ff83e49ba3c2bf4f04fcdc0b5968/tests/integration/cmd_push_test.go#L288 We need to change them and replace them with env vars.

@girishramnani girishramnani added next-oc-version priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). labels Mar 11, 2020
@girishramnani girishramnani moved this from For consideration to To do in Sprint 181 Mar 11, 2020
@mik-dass mik-dass moved this from To do to In progress in Sprint 181 Mar 27, 2020
@mik-dass mik-dass moved this from In progress to For review in Sprint 181 Mar 27, 2020
@mik-dass mik-dass moved this from For review to In progress in Sprint 181 Mar 27, 2020
@mik-dass mik-dass moved this from In progress to For review in Sprint 181 Mar 30, 2020
@girishramnani girishramnani added this to For consideration in Sprint 182 via automation Mar 30, 2020
@girishramnani girishramnani removed this from For review in Sprint 181 Mar 30, 2020
@girishramnani girishramnani moved this from For consideration to For review in Sprint 182 Mar 30, 2020
Sprint 182 automation moved this from For review to Done Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
No open projects
Sprint 182
  
Done
3 participants