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 update fails if I use source as git first and then local #439

Closed
surajnarwade opened this issue May 8, 2018 · 8 comments
Closed

odo update fails if I use source as git first and then local #439

surajnarwade opened this issue May 8, 2018 · 8 comments
Labels
estimated-size/XL (40-60) Rough sizing for Epics. About 3 sprints of work for a person 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)).

Comments

@surajnarwade
Copy link
Contributor

$ odo create nodejs --git=https://github.com/kadel/nodejs-ex
Component 'nodejs' was created.
Triggering build from https://github.com/kadel/nodejs-ex.

Cloning "https://github.com/kadel/nodejs-ex" ...
	Commit:	371a6d09a052b126016858563bc5c71ba56deec8 (save counter to file if db is not available)
	Author:	Tomas Kral <tkral@redhat.com>
	Date:	Mon Feb 12 12:25:30 2018 +0100
---> Installing application source ...
---> Installing all dependencies
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm notice created a lockfile as package-lock.json. You should commit this file.
added 119 packages in 5.456s
---> Building in production mode
---> Pruning the development dependencies
up to date in 0.505s
/opt/app-root/src/.npm is not a mountpoint
---> Cleaning the npm cache /opt/app-root/src/.npm
/tmp is not a mountpoint
---> Cleaning the /tmp/npm-*

Pushing image 172.30.1.1:5000/myproject/nodejs:latest ...
Pushed 5/10 layers, 50% complete
Pushed 6/10 layers, 60% complete
Pushed 7/10 layers, 70% complete
Pushed 8/10 layers, 80% complete
Pushed 9/10 layers, 90% complete
Pushed 10/10 layers, 100% complete
Push successful

Component 'nodejs' is now set as active component.
✔ ~/odo-example/nodejs-ex [master|✚ 1⚑ 5] 
17:37 $ odo update nodejs --local=.
The component nodejs was updated successfully
✔ ~/odo-example/nodejs-ex [master|✚ 1⚑ 5] 
17:37 $ odo push
Pushing changes to component: nodejs
sending incremental file list
.gitignore
README.md
package.json
server.js
helm/nodejs/Chart.yaml
helm/nodejs/values.yaml
helm/nodejs/templates/NOTES.txt
helm/nodejs/templates/buildconfig.yaml
helm/nodejs/templates/deploymentconfig.yaml
helm/nodejs/templates/imagestream.yaml
helm/nodejs/templates/route.yaml
helm/nodejs/templates/service.yaml
openshift/pipeline/Jenkinsfile
openshift/pipeline/README.md
openshift/templates/nodejs-mongodb-persistent.json
openshift/templates/nodejs-mongodb.json
openshift/templates/nodejs.json
tests/app_test.js
views/index.html

sent 3,476 bytes  received 1,394 bytes  9,740.00 bytes/sec
total size is 103,880  speedup is 21.33
Please wait, building component....
rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: container_linux.go:247: starting container process caused \"exec: \\\"/opt/app-root/bin/assemble-and-restart.sh\\\": stat /opt/app-root/bin/assemble-and-restart.sh: no such file or directory\"\n"
@kadel kadel added 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)). labels May 9, 2018
@kadel
Copy link
Member

kadel commented May 9, 2018

When switching from git to local we have to modify and trigger buildConfig to inject Supervisor into the builder image.

I suspect that the other direction might be also broken :-(

This is how it should probably work:

from local to git

odo create nodejs
odo update --git https://example.com/myrepo
  • update odo annotations and labels (we should be already doing that)
  • update BuildConfig source to have git repository https://example.com/myrepo as a source.
  • delete initContainer from DC
  • trigger build (wait for it to finish?)

from git to local

odo create nodejs --git https://example.com/myrepo
odo update --local ./myproject
  • update odo annotations and labels (we should be already doing that)
  • update BuildConfig source to have s2i supervisor bootstrap repository as a source https://github.com/kadel/bootstrap-supervisored-s2i
  • add initContainer
  • trigger build (wait for it to finish)
  • instruct user to run odo push to push local code to a component

Binary component is similar to local, it has just different annotations and labels, but the principle is the same.

@ashetty1
Copy link
Contributor

PR #437 covers this case.

@kadel
Copy link
Member

kadel commented May 10, 2018

PR #437 covers this case.

how is it that the test in that PR is passing?

@ashetty1
Copy link
Contributor

@kadel think supervisor PR went in after this PR was sent.

@kadel
Copy link
Member

kadel commented May 10, 2018

@kadel think supervisor PR went in after this PR was sent.

yep, I just realized. I've restarted test on that PR.

@kadel
Copy link
Member

kadel commented May 22, 2018

@cdrage have you get chance to look at this?
I can take this if you are busy with other stuff.

@mik-dass
Copy link
Contributor

@kadel Can we close this?

@kadel kadel closed this as completed Jul 25, 2018
@mik-dass
Copy link
Contributor

Merged PR : #518

@rm3l rm3l added the estimated-size/XL (40-60) Rough sizing for Epics. About 3 sprints of work for a person label Jun 19, 2023
@rm3l rm3l added this to odo Project Jun 19, 2023
@rm3l rm3l moved this to Done ✅ in odo Project Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimated-size/XL (40-60) Rough sizing for Epics. About 3 sprints of work for a person 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
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants