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

make odo catalog list components work outside of experimental mode #3669

Conversation

girishramnani
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind line, and delete the rest.
For example, > /kind bug would simply become: /kind bug

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind failing-test

/kind feature

What does does this PR do / why we need it:
make odo catalog list components work outside of experimental mode

Which issue(s) this PR fixes:

Works towards experimental mode

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

odo catalog list components 
odo catalog list components -o json

both should work with openshift and kube cluster outside of experimental mode

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation label Jul 31, 2020
@girishramnani
Copy link
Contributor Author

output against local minikube

(base) girish@MacBook-Pro odo % odo catalog list components           
Odo Devfile Components:
NAME                 DESCRIPTION                            REGISTRY
java-maven           Upstream Maven and OpenJDK 11          DefaultDevfileRegistry
java-openliberty     Open Liberty microservice in Java      DefaultDevfileRegistry
java-quarkus         Upstream Quarkus with Java+GraalVM     DefaultDevfileRegistry
java-springboot      Spring Boot® using Java                DefaultDevfileRegistry
nodejs               Stack with NodeJS 12                   DefaultDevfileRegistry

output against crc

(base) girish@MacBook-Pro odo % odo catalog list components
Odo OpenShift Components:
NAME              PROJECT       TAGS                   SUPPORTED
java              openshift     11,8,latest            YES
nodejs            openshift     10-SCL,latest          YES
dotnet            openshift     2.1,2.2,3.0,latest     NO
golang            openshift     1.11.5,latest          NO
httpd             openshift     2.4,latest             NO
modern-webapp     openshift     10.x,latest            NO
nginx             openshift     1.10,1.12,latest       NO
nodejs            openshift     8,8-RHOAR              NO
perl              openshift     5.24,5.26,latest       NO
php               openshift     7.0,7.1,7.2,latest     NO
python            openshift     2.7,3.6,latest         NO
ruby              openshift     2.4,2.5,latest         NO

Odo Devfile Components:
NAME                 DESCRIPTION                            REGISTRY
java-maven           Upstream Maven and OpenJDK 11          DefaultDevfileRegistry
java-openliberty     Open Liberty microservice in Java      DefaultDevfileRegistry
java-quarkus         Upstream Quarkus with Java+GraalVM     DefaultDevfileRegistry
java-springboot      Spring Boot® using Java                DefaultDevfileRegistry
nodejs               Stack with NodeJS 12                   DefaultDevfileRegistry

@kadel
Copy link
Member

kadel commented Jul 31, 2020

while we are modifying this it might be a good idea to switch the order in odo catalog lists components to first list devfile components

@dharmit
Copy link
Member

dharmit commented Jul 31, 2020

Should it require a connection with k8s/ocp cluster?

$ odo catalog list components
 ✗  invalid configuration: no configuration has been provided
Please login to your server: 

odo login https://mycluster.mydomain.com

Don't we just fetch the info from registry?

@kadel
Copy link
Member

kadel commented Jul 31, 2020

Should it require a connection with k8s/ocp cluster?

$ odo catalog list components
 ✗  invalid configuration: no configuration has been provided
Please login to your server: 

odo login https://mycluster.mydomain.com

Don't we just fetch the info from registry?

good point. We definitely should not fail. We could just siletly ignore this error, or just print warning.

@girishramnani
Copy link
Contributor Author

Changing

@girishramnani
Copy link
Contributor Author

Done @kadel @dharmit

@cdrage
Copy link
Member

cdrage commented Jul 31, 2020

Still shows s2i as the first one not Devfile.

Otherwise, code LGTM!

github.com/openshift/odo  pr_3669 ✔                                                                                                                                                                                                                                                                                                                                  2h51m  
▶ odo catalog list components
Odo OpenShift Components:
NAME              PROJECT       TAGS                   SUPPORTED
java              openshift     11,8,latest            YES
nodejs            openshift     10-SCL,latest          YES
dotnet            openshift     2.1,2.2,3.0,latest     NO
golang            openshift     1.11.5,latest          NO
httpd             openshift     2.4,latest             NO
modern-webapp     openshift     10.x,latest            NO
nginx             openshift     1.10,1.12,latest       NO
nodejs            openshift     8,8-RHOAR              NO
perl              openshift     5.24,5.26,latest       NO
php               openshift     7.0,7.1,7.2,latest     NO
python            openshift     2.7,3.6,latest         NO
ruby              openshift     2.4,2.5,latest         NO

Odo Devfile Components:
NAME                 DESCRIPTION                            REGISTRY
java-maven           Upstream Maven and OpenJDK 11          DefaultDevfileRegistry
java-openliberty     Open Liberty microservice in Java      DefaultDevfileRegistry
java-quarkus         Upstream Quarkus with Java+GraalVM     DefaultDevfileRegistry
java-springboot      Spring Boot® using Java                DefaultDevfileRegistry
nodejs               Stack with NodeJS 12                   DefaultDevfileRegistry

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cdrage

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Jul 31, 2020
@girishramnani
Copy link
Contributor Author

Done

@cdrage
Copy link
Member

cdrage commented Jul 31, 2020

LGTM!

github.com/openshift/odo  pr_3669 ✗                                                                                                                                                                                                                                                                                                                                   1m ◒  
▶ odo catalog list components
Odo Devfile Components:
NAME                 DESCRIPTION                            REGISTRY
java-maven           Upstream Maven and OpenJDK 11          DefaultDevfileRegistry
java-openliberty     Open Liberty microservice in Java      DefaultDevfileRegistry
java-quarkus         Upstream Quarkus with Java+GraalVM     DefaultDevfileRegistry
java-springboot      Spring Boot® using Java                DefaultDevfileRegistry
nodejs               Stack with NodeJS 12                   DefaultDevfileRegistry

Odo OpenShift Components:
NAME              PROJECT       TAGS                   SUPPORTED
java              openshift     11,8,latest            YES
nodejs            openshift     10-SCL,latest          YES
dotnet            openshift     2.1,2.2,3.0,latest     NO
golang            openshift     1.11.5,latest          NO
httpd             openshift     2.4,latest             NO
modern-webapp     openshift     10.x,latest            NO
nginx             openshift     1.10,1.12,latest       NO
nodejs            openshift     8,8-RHOAR              NO
perl              openshift     5.24,5.26,latest       NO
php               openshift     7.0,7.1,7.2,latest     NO
python            openshift     2.7,3.6,latest         NO
ruby              openshift     2.4,2.5,latest         NO

Copy link
Contributor

@devang-gaur devang-gaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor changes suggested. everything else lgtm

fmt.Fprintln(w, "Odo Devfile Components:")
fmt.Fprintln(w, "NAME", "\t", "DESCRIPTION", "\t", "REGISTRY")

o.printDevfileCatalogList(w, o.catalogDevfileList.Items, "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put these lines

fmt.Fprintln(w, "Odo Devfile Components:")
fmt.Fprintln(w, "NAME", "\t", "DESCRIPTION", "\t", "REGISTRY")

inside o.printDevfileCatalogList( .. .) method?

Same for the S2i components case, o.printCatalogList( ... ) method.

@@ -200,6 +200,7 @@ func ListComponents(client *occlient.Client) (ComponentTypeList, error) {
},
Items: catalogList,
}, nil

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove this unnecessary newline added?

@cdrage
Copy link
Member

cdrage commented Jul 31, 2020

New code LGTM. We could address @dev-gaur 's comments after. Going to

/lgtm

for now and see if it'll merge.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jul 31, 2020
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@cdrage
Copy link
Member

cdrage commented Jul 31, 2020

/retest

1 similar comment
@girishramnani
Copy link
Contributor Author

/retest

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@codecov
Copy link

codecov bot commented Aug 1, 2020

Codecov Report

Merging #3669 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3669   +/-   ##
=======================================
  Coverage   44.62%   44.62%           
=======================================
  Files         124      124           
  Lines       12524    12524           
=======================================
  Hits         5589     5589           
  Misses       6384     6384           
  Partials      551      551           
Impacted Files Coverage Δ
pkg/catalog/catalog.go 53.74% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c2956ce...a380ccd. Read the comment docs.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

19 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@kadel
Copy link
Member

kadel commented Aug 3, 2020

/retest

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit eec1f66 into redhat-developer:master Aug 4, 2020
cdrage added a commit that referenced this pull request Aug 4, 2020
* Adds documentation on Devfile file reference (#3487)

**What type of PR is this?**
> Uncomment only one ` /kind` line, and delete the rest.
> For example, `> /kind bug` would simply become: `/kind bug`

> Documentation changes: Please include [skip ci] in your commit message as well
/kind documentation
[skip ci]

**What does does this PR do / why we need it**:

This PR adds documentation regarding each section of Devfile and what we
support / do not support

**Which issue(s) this PR fixes**:

N/A

**How to test changes / Special notes to the reviewer**:

N/A

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* Update file reference documentation (#3675)

**What type of PR is this?**
> Uncomment only one ` /kind` line, and delete the rest.
> For example, `> /kind bug` would simply become: `/kind bug`

/kind documentation
[skip ci]

**What does does this PR do / why we need it**:

Updates the file reference documentation to not have the introductory
section and move unsupported features to the bottom.

**Which issue(s) this PR fixes**:

N/A

**PR acceptance criteria**:

N/A

**How to test changes / Special notes to the reviewer**:

N/A

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* make odo delete work on s2i components in experimental mode (#3649)

* Fixes GetRunningPodNameByComponent for the CLI runners (#3666)

* increase ResponseHeaderTimeout (#3674)

* Make the file sync destination more consistent (#3662)

* Make the file sync destination more consistent

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Update tests to use PROJECTS_ROOT

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Fix workdir in tests

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Remove more references to nodejs-starter

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Update more sample devfiles

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* make odo catalog list components work outside of experimental mode (#3669)

* make odo catalog list components work outside of experimental mode

* moved the logic to cli

* Ignore error while checking for imagestream support

* rearranged the catalog list

* Validate exec subcommands in a composite (#3658)

* Validate exec subcommands in composite

* Add integration test

* added --s2i flag for `odo create` command

* corrected error messages

* Corrected flag description and validation

* added --s2i flag for `odo create` command

* Make Devfile the default deployment mechanism for odo

**What type of PR is this?**
> Uncomment only one ` /kind` line, and delete the rest.
> For example, `> /kind bug` would simply become: `/kind bug`

/kind feature

**What does does this PR do / why we need it**:

Makes Devfile the default deployment mechanism, removing S2I in favour
of Devfile deployment.

**Which issue(s) this PR fixes**:

Closes #3550

**How to test changes / Special notes to the reviewer**:

Run:

```sh
odo preference set experimental false
odo create --starter nodejs
odo push
```

Co-authored-by: Girish Ramnani <girishramnani95@gmail.com>
Co-authored-by: Mrinal Das <mrinald7@gmail.com>
Co-authored-by: Tomas Kral <tkral@redhat.com>
Co-authored-by: John Collier <John.J.Collier@ibm.com>
Co-authored-by: Devang Gaur <devang.gaur.7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants