Closed serenamarie125 closed 2 years ago
I find odo registry list
a little weird command to list the devfile stacks. Thinking out loud, I suggest we consider/discuss:
# to list only the registries
$ odo list registry
# to list only the stacks
$ odo list registry --stacks
# to fileter stacks (this one looks bad)
$ odo list registry --stacks --filter python
# to list them all
$ odo list registry --all
Users could have a private devfile registry deployed on their cluster. So registry, in that sense, is something that can be either on the cluster or on the cluster.
The intention that we have for odo list
is that it will list devfile components and their parts like endpoints, services, bindings etc... In another word, it will list users applications and their parts. Devfile registry is not part of the devfile component It is a separate construct that doesn't affect how the actual application is running.
For that reason, it is not a good fit for odo list
command.
As we discussed during the cabal call we will change what is described in this issue. It won't be odo registry list
but just odo registry
to alight it with odo catalog
command. Commands for adding and removing devfile registries into odo will be under odo preference
(odo preference add/remove registry
) I tried to capture this in https://github.com/redhat-developer/odo/issues/5535
@kadel could you add the scenario we discussed during triage call about allowing a way to show details for only one stack from the list shown by odo registry
?
Been experimenting with the implementation so far.
What do you all think of this? @dharmit @kadel @serenamarie125
This is SPECIFICALLY only for --details
instead of the "listed" output.
I've been using the table library for unified output and it can easily be changed to a list.
This has been implemented in my PR: https://github.com/redhat-developer/odo/pull/5667
go/src/odo add-registry-command ✔ 30m ⍉
▶ odo registry --filter python
NAME REGISTRY DESCRIPTION
python Test Python Stack with Python 3.7
python DefaultDevfileRegistry Python Stack with Python 3.7
python-django Test Python3.7 with Django
python-django DefaultDevfileRegistry Python3.7 with Django
go/src/odo add-registry-command ✗ 18h32m ⚑
▶ odo registry --details --filter python
┌────────────────┬──────────────────────────────────────────┬──────────────────────┬─────┬────────┬───────┬──────────────────────────────┬────────────────┐
│ NAME / VERSION │ REGISTRY / URL │ LANGUAGE / TAGS │ DEV │ DEPLOY │ DEBUG │ DESCRIPTION │ STARTER PROJ. │
├────────────────┼──────────────────────────────────────────┼──────────────────────┼─────┼────────┼───────┼──────────────────────────────┼────────────────┤
│ python │ Test (https://registry.devfile.io) │ python (Python, pip) │ Y │ Y │ Y │ Python Stack with Python 3.7 │ python-example │
│ Python │ │ │ │ │ │ │ │
│ 1.0.0 │ │ │ │ │ │ │ │
│ ├──────────────────────────────────────────┤ ├─────┼────────┼───────┤ │ │
│ │ DefaultDevfileRegistry │ │ Y │ Y │ Y │ │ │
│ │ (https://registry.devfile.io) │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │
├────────────────┼──────────────────────────────────────────┼──────────────────────┼─────┼────────┼───────┼──────────────────────────────┼────────────────┤
│ python-django │ Test (https://registry.devfile.io) │ python (Python, pip, │ Y │ Y │ Y │ Python3.7 with Django │ django-example │
│ Django │ │ Django) │ │ │ │ │ │
│ 1.0.0 │ │ │ │ │ │ │ │
│ ├──────────────────────────────────────────┤ ├─────┼────────┼───────┤ │ │
│ │ DefaultDevfileRegistry │ │ Y │ Y │ Y │ │ │
│ │ (https://registry.devfile.io) │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │
└────────────────┴──────────────────────────────────────────┴──────────────────────┴─────┴────────┴───────┴──────────────────────────────┴────────────────┘
@cdrage I really liked the tabular output! It looks really pleasing to the eyes. I have left some review comments on the PR.
I find the tabular output quite unreadable :-( It is really wide, and unless you have full-screen terminal it is unreadable.
And that terminal is already pretty wide.
@cdrage please stick to the original agreed-upon structure.
I find the tabular output quite unreadable :-( It is really wide, and unless you have full-screen terminal it is unreadable.
And that terminal is already pretty wide.
@cdrage please stick to the original agreed-upon structure.
Done in the PR! Was only a quick experiment to see the formatting.
It looks like this now:
Name: python-django
Display Name: Django
Registry: DefaultDevfileRegistry
Registry URL: https://registry.devfile.io
Version: 1.0.0
Description: Python3.7 with Django
Tags: Python, pip, Django
Project Type: django
Language: python
Starter Projects:
- django-example
Supported odo features:
- dev: Y
- deploy: Y
- debug: Y
To display odo supported features, you can use the function libdevfile.Has*Command
added from the (merged) PR https://github.com/redhat-developer/odo/pull/5658
@feloy you're right, just noticed it got merged in. I'll implement it now!
description to be updated by @kadel
/kind user-story
User Story
Acceptance Criteria
odo registry
should be the command for listing the content of devfile registries--filter
flags allows filtering the output, it searches for matches in NAME, DESCRIPTION (not shortened) fields--details
flag allows printing detailed information about devfile stacks, to see fields in detailed output see an example. Most of the information is from the metadata section in devfile. "Supported odo features" is based on the command group kinds defined in devfile. If there is at least onegroup.kind: run
commanddev: true
ifgroup.kind: debug
thendebug: true
ifgroup.kind: deploy
deploy:true
--details
and--filter
can be combined--devfile
and--devfile-registry
can be used point to the single devfile stack. This will be mainly use together with--detail
,( see example)Example