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

Support exec command for deploy #5701

Closed
1 task done
kadel opened this issue Apr 28, 2022 · 6 comments · Fixed by #6579
Closed
1 task done

Support exec command for deploy #5701

kadel opened this issue Apr 28, 2022 · 6 comments · Fixed by #6579
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). sprint demo Indicates an issue for which a demo should be recorded and presented at the end of the sprint.
Milestone

Comments

@kadel
Copy link
Member

kadel commented Apr 28, 2022

User Story

  • As an odo user
  • I want to be able to use exec command as a deploy command (or as part of the composite command that is defined as deploy command as it is allowed by devfile spec
  • So that I can use for example helm or kustomize commands in my deploy flow (see example)

Acceptance Criteria

/kind user-story

 ✗  Exec command is not implemented for Deploy

Example

devfile example with exec command in deploy

https://github.com/kadel/demo-odo-springboot/blob/d5956f5a8af41ae28dc4d97e0d9c03c9250c1e27/devfile.yaml#L114

/area devfile-spec

@openshift-ci openshift-ci bot added the area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. label Apr 28, 2022
@kadel kadel added this to the v3.0.0-beta2 milestone May 6, 2022
@kadel kadel added the priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). label Jun 2, 2022
@kadel kadel self-assigned this Jun 2, 2022
@kadel kadel added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jun 2, 2022
@kadel kadel removed this from the v3.0.0-beta2 milestone Jun 22, 2022
@kadel kadel removed their assignment Jun 24, 2022
@rm3l rm3l removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Jun 27, 2022
@dharmit
Copy link
Member

dharmit commented Jul 21, 2022

Try to have similar reusable code for exec command for various group kinds like deploy, build, etc. instead of having separate implementation of exec all over odo code.

@dharmit dharmit moved this to In Progress in odo v3-beta2 Aug 2, 2022
@dharmit
Copy link
Member

dharmit commented Aug 11, 2022

devfile example with exec command in deploy

https://github.com/kadel/demo-odo-springboot/blob/d5956f5a8af41ae28dc4d97e0d9c03c9250c1e27/devfile.yaml#L114

The example devfile uses a container component to execute the exec command. In odo, we spin up such a container in the inner loop only. So for an odo deploy with an exec command for deploy would succeed only if the component is already running in inner loop.

How do we want to handle this situation? @kadel

@kadel
Copy link
Member Author

kadel commented Aug 11, 2022

The example devfile uses a container component to execute the exec command. In odo, we spin up such a container in the inner loop only. So for an odo deploy with an exec command for deploy would succeed only if the component is already running in inner loop.

How do we want to handle this situation? @kadel

Good questions.
I would say that the container should be automatically created, and then when the command is finished, it should be deleted.
But this is interesting discussion that we should probably bring on the Devfile level.

@dharmit
Copy link
Member

dharmit commented Aug 11, 2022

I would say that the container should be automatically created, and then when the command is finished, it should be deleted.

That would mean creating a k8s job with the spec of the specified container. Sounds doable at first glance. But certain attributes of a Devfile container component like endpoints, sourceMapping, dedicatedPod would be unnecessary/useless in this context. Of course, we could just ignore them and focus on the required attributes.

But this is interesting discussion that we should probably bring on the Devfile level.

OK.

@rm3l rm3l added this to odo v3.0.0 Aug 29, 2022
@kadel kadel added priority/Medium Nice to have issue. Getting it done before priority changes would be great. and removed priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). labels Aug 31, 2022
@rm3l rm3l added this to after v3.0.0 Sep 1, 2022
@rm3l rm3l removed this from odo v3.0.0 Sep 1, 2022
@rm3l rm3l added this to odo Project Oct 3, 2022
@kadel kadel added priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). and removed priority/Medium Nice to have issue. Getting it done before priority changes would be great. labels Jan 6, 2023
@valaparthvi valaparthvi self-assigned this Jan 25, 2023
@rm3l rm3l added this to the v3.7.0 🚀 milestone Jan 30, 2023
@valaparthvi
Copy link
Contributor

Should the container continue to run even after the task is done? If we use k8s jobs to run exec command, the pod running the job will terminate as soon as the task is done?

@valaparthvi
Copy link
Contributor

@rm3l rm3l added the pair programming Issue that is a good candidate for pair programming label Feb 6, 2023
@valaparthvi valaparthvi moved this to In Progress 🚧 in odo Project Feb 7, 2023
@rm3l rm3l added sprint demo Indicates an issue for which a demo should be recorded and presented at the end of the sprint. and removed linked-to-epic labels Feb 8, 2023
@valaparthvi valaparthvi mentioned this issue Feb 8, 2023
3 tasks
@rm3l rm3l modified the milestones: v3.7.0 🚀, v3.8.0 🚀 Feb 15, 2023
@feloy feloy removed the pair programming Issue that is a good candidate for pair programming label Feb 20, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in odo v3-beta2 Mar 3, 2023
@github-project-automation github-project-automation bot moved this from In Progress 🚧 to Done ✅ in odo Project Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). sprint demo Indicates an issue for which a demo should be recorded and presented at the end of the sprint.
Projects
Archived in project
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants