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

Show Devfile Stack versions in "odo registry" output #6397

Conversation

rm3l
Copy link
Member

@rm3l rm3l commented Dec 9, 2022

What type of PR is this:
/kind feature
/area registry

What does this PR do / why we need it:
This PR fetches and displays the Devfile Stack versions in the "odo registry" output (both human-readable and JSON).
As discussed in the linked issue, it does so by first querying (using the Devfile library) the /v2index registry endpoint (which should expose a list of stack versions), and falls back to the /index endpoint if the /v2index is not available.
See #6314 for more context.

For backward compatibility, the Version and Starter Projects fields have not been removed. Just like before, they are representing the version and starter projects of the default Stack version.

Which issue(s) this PR fixes:
Fixes #6314

PR acceptance criteria:

How to test changes / Special notes to the reviewer:

  • A new "VERSIONS" column is added to the human-readable output of odo registry:
$ odo registry --devfile-registry Staging                       
 NAME                          REGISTRY  DESCRIPTION                                  VERSIONS     
 dotnet50                      Staging   Stack with .NET 5.0                          1.0.3        
 dotnet60                      Staging   Stack with .NET 6.0                          1.0.2        
 dotnetcore31                  Staging   Stack with .NET Core 3.1                     1.0.3        
 go                            Staging   Go is an open source programming languag...  1.0.2, 2.0.0 
 java-maven                    Staging   Upstream Maven and OpenJDK 11                1.2.0        
 java-openliberty              Staging   Java application Maven-built stack using...  0.9.0        
 java-openliberty-gradle       Staging   Java application Gradle-built stack usin...  0.4.0        
 java-quarkus                  Staging   Quarkus with Java                            1.3.0        
 java-springboot               Staging   Spring Boot using Java                       1.2.0, 2.0.0 
 java-vertx                    Staging   Upstream Vert.x using Java                   1.2.0        
 java-websphereliberty         Staging   Java application Maven-built stack using...  0.9.0        
 java-websphereliberty-gradle  Staging   Java application Gradle-built stack usin...  0.4.0        
 java-wildfly                  Staging   Upstream WildFly                             1.1.0        
 java-wildfly-bootable-jar     Staging   Java stack with WildFly in bootable Jar ...  1.1.0        
 nodejs                        Staging   Stack with Node.js 16                        2.1.1        
 nodejs-angular                Staging   Angular is a development platform, built...  2.0.2        
 nodejs-nextjs                 Staging   Next.js gives you the best developer exp...  1.0.3        
 nodejs-nuxtjs                 Staging   Nuxt is the backbone of your Vue.js proj...  1.0.3        
 nodejs-react                  Staging   React is a free and open-source front-en...  2.0.2        
 nodejs-svelte                 Staging   Svelte is a radical new approach to buil...  1.0.3        
 nodejs-vue                    Staging   Vue is a JavaScript framework for buildi...  1.0.2        
 php-laravel                   Staging   Laravel is an open-source PHP framework,...  1.0.1        
 python                        Staging   Python is an interpreted, object-oriente...  2.1.0, 3.0.0 
 python-django                 Staging   Django is a high-level Python web framew...  2.1.0        
  • A new "versions" field is added to the JSON output of odo registry
$ odo registry --devfile-registry Staging --devfile go -o json            
[
        {
                "name": "go",
                "displayName": "Go Runtime",
                "description": "Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.",
                "registry": {
                        "name": "Staging",
                        "url": "https://registry.stage.devfile.io",
                        "secure": false
                },
                "language": "Go",
                "tags": [
                        "Go"
                ],
                "projectType": "Go",
                "version": "1.0.2",
                "versions": [
                        {
                                "version": "1.0.2",
                                "isDefault": true,
                                "schemaVersion": "2.1.0",
                                "starterProjects": [
                                        "go-starter"
                                ]
                        },
                        {
                                "version": "2.0.0",
                                "isDefault": false,
                                "schemaVersion": "2.2.0",
                                "starterProjects": [
                                        "go-starter"
                                ]
                        }
                ],
                "starterProjects": [
                        "go-starter"
                ]
        }
]
  • A new "Versions:" section is added to the human-readable output of odo registry --details
$ odo registry --devfile-registry Staging --devfile go --details
Name: go
Display Name: Go Runtime
Registry: Staging
Registry URL: https://registry.stage.devfile.io
Version: 1.0.2
Description: Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. 
Tags: Go
Project Type: Go
Language: Go
Starter Projects:
  - go-starter
Supported odo Features:
  - Dev: Y
  - Deploy: N
  - Debug: N
Versions:
  - 1.0.2
  - 2.0.0

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Dec 9, 2022
@netlify
Copy link

netlify bot commented Dec 9, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit 6d8f383
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/63932181b98d730009df5df7

@openshift-ci
Copy link

openshift-ci bot commented Dec 9, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation area/registry Issues or PRs related to Devfile registries labels Dec 9, 2022
@odo-robot
Copy link

odo-robot bot commented Dec 9, 2022

Windows Tests (OCP) on commit 1c87489 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 9, 2022

NoCluster Tests on commit 1c87489 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 9, 2022

Unit Tests on commit 1c87489 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 9, 2022

Validate Tests on commit 1c87489 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 9, 2022

Kubernetes Tests on commit 1c87489 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 9, 2022

OpenShift Tests on commit 1c87489 finished successfully.
View logs: TXT HTML

@rm3l rm3l force-pushed the 6314-odo-registry-list-devfile-stack-versions branch from 59e95e9 to 6d8f383 Compare December 9, 2022 11:52
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rm3l rm3l marked this pull request as ready for review December 9, 2022 12:00
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Dec 9, 2022
@openshift-ci openshift-ci bot requested review from anandrkskd and feloy December 9, 2022 12:00
@rm3l rm3l requested a review from valaparthvi December 9, 2022 12:01
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Dec 9, 2022
@feloy
Copy link
Contributor

feloy commented Dec 9, 2022

Thanks Armel

@rm3l
Copy link
Member Author

rm3l commented Dec 9, 2022

/override ci/prow/v4.11-integration-e2e

All tests passing on IBM Cloud.

@openshift-ci
Copy link

openshift-ci bot commented Dec 9, 2022

@rm3l: Overrode contexts on behalf of rm3l: ci/prow/v4.11-integration-e2e

In response to this:

/override ci/prow/v4.11-integration-e2e

All tests passing on IBM Cloud.

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
Copy link
Member Author

rm3l commented Dec 9, 2022

/override ci/prow/v4.11-integration-e2e

All tests passing on IBM Cloud.

@openshift-ci
Copy link

openshift-ci bot commented Dec 9, 2022

@rm3l: Overrode contexts on behalf of rm3l: ci/prow/v4.11-integration-e2e

In response to this:

/override ci/prow/v4.11-integration-e2e

All tests passing on IBM Cloud.

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.

@openshift-merge-robot openshift-merge-robot merged commit 9f86698 into redhat-developer:main Dec 9, 2022
@rm3l rm3l deleted the 6314-odo-registry-list-devfile-stack-versions branch December 9, 2022 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Issues or PRs related to Devfile registries 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.

odo registry: list Devfile Stack versions
3 participants