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

Container initiailization support #2936

Closed
2 of 6 tasks
elsony opened this issue Apr 20, 2020 · 12 comments
Closed
2 of 6 tasks

Container initiailization support #2936

elsony opened this issue Apr 20, 2020 · 12 comments
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/user-story An issue of user-story kind triage/needs-information Indicates an issue needs more information in order to work on it. v2 Issue or PR that applies to the v2 of odo

Comments

@elsony
Copy link

elsony commented Apr 20, 2020

/kind user-story

User Story

As a stack creator, I want to initialize my the container that I defined in the devfile 2.0.
Devfile 2.0 providers ability to execute commands based on lifecycle events.

Acceptance Criteria

Links

/kind user-story
/area devfile

@openshift-ci-robot openshift-ci-robot added kind/user-story An issue of user-story kind area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. labels Apr 20, 2020
@kadel
Copy link
Member

kadel commented Apr 22, 2020

/status blocked
#2918 we need devfile v2 parser first

@kadel kadel added the status/blocked Denotes an issue or PR that is blocked on something (e.g., issue/PR in different repo) label Apr 22, 2020
@upLukeWeston
Copy link
Contributor

After discussing potential solutions (with @johnmcollier, @elsony, @EnriqueL8) we came to an agreement for the time being on how each of the lifecycle bindings could be used and what would trigger them.

Proposed event timeline:

  • Pre Start (in initContainer) e.g:
    • Component Starts (Pod)
    • Containers Creating
  • devinit becomes PostStart E.g Parent Pom/maven install
  • Build and Run commands
  • Odo delete component triggers these both events:
    • PreStop before killing the component
    • PostStop after the pod/component killed: e.g Cleanup work

There are still some unanswered questions regarding differentiating commands between multiple projects within the same devfile, and the applicability of lifecycle bindings because of their intended functionalities being Workspace specific in Che.
Ongoing discussions and more details can be found on this google doc.

@upLukeWeston
Copy link
Contributor

/assign

@kadel
Copy link
Member

kadel commented Jun 3, 2020

I'm afraid that it might be too early to start implementing this.
I can still see a lot of unanswered questions.

Like is preStart going to be implemented as an InitContainer?
Are the rest of the commands be just executed similarly to how the "build" is done?
What will happen when some of the commands fail?
When will the preStop and postStop commands execute? How will odo know when they need to be executed?

@neeraj-laad
Copy link
Contributor

I thought this issue was only for migrating the container initialisation step (devInit) with devfile v2. How we leverage other events can be discussed independently?

We should still have clarity on how we handle failures though.

@elsony
Copy link
Author

elsony commented Jun 3, 2020

+1 for having the complete design before implementing. We can stage in the implementation but the complete design should be before staging in the implementation.

@gorkem
Copy link
Contributor

gorkem commented Jun 18, 2020

Is this really blocked? It has the blocked label.

@upLukeWeston
Copy link
Contributor

No, I believe it was initially blocked by the Devfile v2 Parser.

@elsony
Copy link
Author

elsony commented Jun 19, 2020

Removing the block since we have the v2 parser already.

@elsony elsony removed the status/blocked Denotes an issue or PR that is blocked on something (e.g., issue/PR in different repo) label Jun 19, 2020
@maysunfaisal
Copy link
Contributor

FYI there is a dup issue here for the remaining #3569

@kadel
Copy link
Member

kadel commented Jul 21, 2020

postStart was implemented and merged in #3533

Separate user story was opened for the rest of the events (preStart, preStop andpostStop) #3569

/close

@openshift-ci-robot
Copy link
Collaborator

@kadel: Closing this issue.

In response to this:

postStart was implemented and merged in #3533

Separate user story was opened for the rest of the events (preStart, preStop andpostStop) #3569

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rm3l rm3l added the v2 Issue or PR that applies to the v2 of odo label Jun 18, 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. kind/user-story An issue of user-story kind triage/needs-information Indicates an issue needs more information in order to work on it. v2 Issue or PR that applies to the v2 of odo
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

9 participants