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

Display list of commands from the local devfile in odo describe component output #6892

Closed
12 tasks done
rm3l opened this issue Jun 14, 2023 · 0 comments · Fixed by #6944
Closed
12 tasks done

Display list of commands from the local devfile in odo describe component output #6892

rm3l opened this issue Jun 14, 2023 · 0 comments · Fixed by #6944
Assignees
Labels
kind/user-story An issue of user-story kind 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

@rm3l
Copy link
Member

rm3l commented Jun 14, 2023

/kind user-story

User Story

As an odo user, I want to see the list of commands that are defined in my local devfile, So that I can know which command I can execute with odo run, without having to read the full Devfile.
It will also help IDE extensions adopt the odo run workflow by allowing users to select the command they want to manually execute with odo run.

Acceptance Criteria

  • odo describe component should include the list of commands that are defined in the current Devfile
    • Human-readable output
    • JSON output
  • For each command, it should display information like:
    • command name (ID)
    • command line if exec
    • component (container if exec)
    • command type, e.g: exec, apply
    • command group if any
    • image name for image components
    • [ ] whether the command is hot-reload capable (?)
    • [ ] For exec and apply commands, the component name
    • [ ] For exec commands, the working dir (?)
    • [ ] whether the command is bound to a lifecycle event (?)
  • If the Devfile does not have any commands (e.g. with the UDI stack), there should be no commands section in the human-readable or JSON outputs
  • odo describe component --name (i.e., without local devfile) should not display such information

*(?) => to discuss

Examples:

odo describe component
$ odo describe component             

--- TRUNCATED ---

Kubernetes components:
 •  outerloop-deploy
 •  outerloop-deploy-ocp

Commands:
 •  00-install
   Type: exec
   Group: build
    Component: runtime
   Component Type: container
    Command-line: yarn
 •  01-run
   Type: exec
   Group: run
   Component: runtime
   Component Type: container
   Command-line: yarn start
 •  02-debug
   Type: exec
   Group: debug
   Component: runtime
   Component Type: container
   Command-line: yarn debug
 •  03-test
    Type: exec
    Group: test
    Component: runtime
   Component Type: container
    Command-line: yarn test
 •  20-build-image
    Type: apply
    Component Type: image
    Component: outerloop-build
    Image name: my-dev-image
 •  211-deploy-k8s
   Type: apply
   Component Type: kubernetes
    Component: outerloop-deploy
 •  212-deploy-ocp
   Type: apply
   Component Type: openshift
    Component: outerloop-deploy
 •  22-deploy
    Type: composite
    Group: deploy
odo describe component -o json
{
--- TRUNCATED ---
  "commands": [
    {
      "name": "00-install",
     "type": "exec|apply|composite|...",
     "group": "",
     "isDefaultCommand": true|false,
     "commandLine": "",
     "component": "",
     "componentType": "image|kubernetes|...",
     "imageName": "my-dev-image"
    }
...
  ]
}

Links

/kind user-story

@openshift-ci openshift-ci bot added the kind/user-story An issue of user-story kind label Jun 14, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Jun 14, 2023
@kadel kadel added the priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). label Jun 21, 2023
@rm3l rm3l removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Jun 22, 2023
@rm3l rm3l added this to the v3.13.0 🚀 milestone Jun 23, 2023
@rm3l rm3l self-assigned this Jun 27, 2023
@rm3l rm3l added the sprint demo Indicates an issue for which a demo should be recorded and presented at the end of the sprint. label Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/user-story An issue of user-story kind 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
2 participants