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

Use a single handler for executing a command on container / applying images/resources #6792

Closed
5 tasks
feloy opened this issue May 4, 2023 · 0 comments · Fixed by #6826
Closed
5 tasks
Assignees
Labels
area/refactoring Issues or PRs related to code refactoring kind/user-story An issue of user-story kind
Milestone

Comments

@feloy
Copy link
Contributor

feloy commented May 4, 2023

/kind user-story

User Story

Different parts of odo (odo dev build command, odo dev run/debug command, odo deploy, postStart, preStop events), are using different handlers for handling command execution.

Especially, "exec on container" commands are handled differently based on from where they call them.

It would be interesting to have the same handler, determining if the container already exists or not, and to execute the command accordingly

  • on an existing container
  • on a job

Acceptance Criteria

  • It should have only one implementation of the handler
  • libdevfile functions should be called as before, passing this common handler
  • th Execute callback should determine if the container has been already created, by calling the same logic from the devfile/library as when we create the Deployment (GetConainers?)
  • the Apply Kubernertes/Openshift callback should call the underlying platform implementation (see pkg/platform) to execute the Apply
  • Do not implement executing command on non existing container on podman

Links

  • Related Epic (mandatory):
@openshift-ci openshift-ci bot added the kind/user-story An issue of user-story kind label May 4, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label May 4, 2023
@feloy feloy changed the title Many handlers are implemented for executing commands Use a single handler for executing a command on container May 4, 2023
@feloy feloy changed the title Use a single handler for executing a command on container Use a single handler for executing a command on container / applying images/resources May 4, 2023
@valaparthvi valaparthvi removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label May 4, 2023
@rm3l rm3l added the area/refactoring Issues or PRs related to code refactoring label May 4, 2023
@feloy feloy self-assigned this May 17, 2023
@feloy feloy moved this to In Progress 🚧 in odo Project May 23, 2023
@feloy feloy moved this from In Progress 🚧 to In Review 👀 in odo Project May 24, 2023
@rm3l rm3l added this to the v3.11.0 🚀 milestone May 24, 2023
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in odo Project May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/refactoring Issues or PRs related to code refactoring kind/user-story An issue of user-story kind
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants