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 dev fails after component was deployed using odo deploy #5546

Closed
kadel opened this issue Mar 11, 2022 · 4 comments · Fixed by #5594
Closed

odo dev fails after component was deployed using odo deploy #5546

kadel opened this issue Mar 11, 2022 · 4 comments · Fixed by #5594
Assignees
Labels
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

@kadel
Copy link
Member

kadel commented Mar 11, 2022

testing with https://github.com/kadel/devfile-nodejs-deploy

$ odo deploy
...
...

$ odo dev
Using devfile.yaml from the current directory.
Starting your application on cluster in developer mode
 ✗  Waiting for Kubernetes resources [4s]
 ✗  failed to update config to component deployed.: multiple Deployments exist for the selector: app.kubernetes.io/instance=devfile-nodejs-deploy,app.kubernetes.io/part-of=app. Only one must be present

@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)). v3 labels Mar 11, 2022
@feloy
Copy link
Contributor

feloy commented Mar 11, 2022

Since we are now setting the labels on both resources deployed on DEV and DEPLOY mode, I think we need to include the mode label to check for unicity, here:

  • app.kubernetes.io/instance=devfile-nodejs-deploy,app.kubernetes.io/part-of=app,odo.dev/mode=Deploy
  • app.kubernetes.io/instance=devfile-nodejs-deploy,app.kubernetes.io/part-of=app,odo.dev/mode=Dev

@feloy feloy self-assigned this Mar 11, 2022
@kadel
Copy link
Member Author

kadel commented Mar 11, 2022

I believe I've fixed this in: #5468

it is not, while testing that PR i found this.
But this was not introduced there, it is in main branch as well, this is why i created separate issue.

@kadel
Copy link
Member Author

kadel commented Mar 11, 2022

Since we are now setting the labels on both resources deployed on DEV and DEPLOY mode, I think we need to include the mode label to check for unicity, here:

  • app.kubernetes.io/instance=devfile-nodejs-deploy,app.kubernetes.io/part-of=app,odo.dev/mode=Deploy
  • app.kubernetes.io/instance=devfile-nodejs-deploy,app.kubernetes.io/part-of=app,odo.dev/mode=Dev

exactly, when odo dev is checking for resources it needs to include odo.dev/mode=dev label, and when odo deploy checking for resources it needs to include odo.dev/mode=deploy

@cdrage
Copy link
Member

cdrage commented Mar 11, 2022

Since we are now setting the labels on both resources deployed on DEV and DEPLOY mode, I think we need to include the mode label to check for unicity, here:

  • app.kubernetes.io/instance=devfile-nodejs-deploy,app.kubernetes.io/part-of=app,odo.dev/mode=Deploy
  • app.kubernetes.io/instance=devfile-nodejs-deploy,app.kubernetes.io/part-of=app,odo.dev/mode=Dev

This has been done in the odo list refactor for #5468 but I'm unsure why it's still failing. I'll look into this.

We check and validate / label select for Dev, but I believe I did not implement the Deploy check.

@kadel kadel changed the title odo dev fails component was deployed using odo deploy odo dev fails after component was deployed using odo deploy Mar 15, 2022
@kadel kadel removed the v3 label Mar 24, 2022
@rm3l rm3l added the v3 label Oct 7, 2022
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/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants