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 group in devfile commands (application lifecycle) #2938

Closed
4 tasks
elsony opened this issue Apr 20, 2020 · 8 comments · Fixed by #3291
Closed
4 tasks

Support group in devfile commands (application lifecycle) #2938

elsony opened this issue Apr 20, 2020 · 8 comments · Fixed by #3291
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.

Comments

@elsony
Copy link

elsony commented Apr 20, 2020

/kind user-story

User Story

As a stack creator, I want to define the group that a given command in a devfile belongs to so that odo know what default command to when it build, run, test and debug.

Acceptance Criteria

  • It should follow the corresponding settings specified in the devfile 2.0 specification: Command group (application lifecycle) devfile/api#27
  • It should support setting default for each group (see spec above)
  • It should replace the existing devBuild and devRun commands on the push logic
  • It should modify the existing odo catalog list components logic acceptance criteria to use the group info instead of the odo specific devBuild and devRun commands

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

this is blocked on #2918, the parser needs to be implemented first

/stats blocked

@kadel
Copy link
Member

kadel commented Apr 22, 2020

  • It should replace the existing devBuild and devRun commands on the push logic

@elsony What about devfile v1 support. Are we not going to support it anymore?

@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
@girishramnani girishramnani added devfileV2 triage/needs-information Indicates an issue needs more information in order to work on it. labels May 11, 2020
@maysunfaisal
Copy link
Contributor

Some observations for this work to be completed:

  • If there are multiple group commands without a default, it should err out
  • there needs to be one run group command defined, otherwise it should err out
  • build group command optional like devfile v1

@elsony
Copy link
Author

elsony commented Jun 1, 2020

Some observations for this work to be completed:

* If there are multiple group commands without a default, it should err out

* there needs to be one run group command defined, otherwise it should err out

* build group command optional like devfile v1

I would suggest to modify slightly to clarify:

  1. If there are multiple group commands without a default, it should err out. This check is only done for the groups that odo consumes and the check is done when doing the corresponding execution, e.g. check on debug group only if running odo push with --debug
  2. there needs to be at least one run group command defined, otherwise it should err out during odo push. Rule for multiple run command in point Use oc binary instead client-go for initial implementation #1 still applies.
  3. build group command optional like devfile v1

@maysunfaisal
Copy link
Contributor

@elsony what do you think about this issue here regarding command groups #3216 (comment)

@girishramnani girishramnani removed the status/blocked Denotes an issue or PR that is blocked on something (e.g., issue/PR in different repo) label Jun 4, 2020
@kadel
Copy link
Member

kadel commented Jun 4, 2020

  • It should modify the existing odo catalog list components logic acceptance criteria to use the group info instead of the odo specific devBuild and devRun commands

I think that we should list all devfiles in the registry regardless of what command groups are there.
Users can still use --run-command and --build-command to select the right commands if they are not specified in the devfile.

@maysunfaisal
Copy link
Contributor

@kadel that is true. But odo push would fail if there are no build and run groups at this point. Is it a good UX to enable this by default registry? 🤔

@kadel
Copy link
Member

kadel commented Jun 8, 2020

@kadel that is true. But odo push would fail if there are no build and run groups at this point. Is it a good UX to enable this by default registry? 🤔

The default registry is under our control, so we can make sure that all devfiles in the default registry have proper groups.

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants