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

Allow fetching specific devfile stack version #6429

Conversation

valaparthvi
Copy link
Contributor

What type of PR is this:
/kind feature

What does this PR do / why we need it:
This PR allows fetching a specific devfile stack version.

Which issue(s) this PR fixes:

Fixes #6315

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:
Try to fetch a Go/Springboot/Python devfile and select the version. Test with ACs described in #6315 (comment).

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation labels Dec 20, 2022
@netlify
Copy link

netlify bot commented Dec 20, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit 39105dd
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/63a2f340eafcff000a05389a

@openshift-ci openshift-ci bot requested review from kadel and rm3l December 20, 2022 03:33
@odo-robot
Copy link

odo-robot bot commented Dec 20, 2022

Validate Tests on commit 628ae68 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 20, 2022

Windows Tests (OCP) on commit 628ae68 finished with errors.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 20, 2022

Unit Tests on commit 628ae68 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 20, 2022

OpenShift Tests on commit 628ae68 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 20, 2022

NoCluster Tests on commit 628ae68 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 20, 2022

Kubernetes Tests on commit 628ae68 finished successfully.
View logs: TXT HTML

Signed-off-by: Parthvi Vala <pvala@redhat.com>
@valaparthvi valaparthvi force-pushed the 6315-allow-fetching-specific-devfile-stack-version branch from 844ba34 to 005ab28 Compare December 20, 2022 11:00
@valaparthvi valaparthvi changed the title WIP: Allow fetching specific devfile stack version Allow fetching specific devfile stack version Dec 21, 2022
@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 21, 2022
Signed-off-by: Parthvi Vala <pvala@redhat.com>
@valaparthvi valaparthvi force-pushed the 6315-allow-fetching-specific-devfile-stack-version branch from b2a8c3c to f2fa06e Compare December 21, 2022 10:26
@@ -49,6 +49,9 @@ var initExample = templates.Examples(`
# Bootstrap a new component with a specific versioned devfile from registry
%[1]s --name my-app --devfile nodejs --devfile-version 2.1.0

# Bootstrap a new component with the latest devfile from registry
Copy link
Contributor

Choose a reason for hiding this comment

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

In the previous example:

%[1]s --name my-app --devfile nodejs

you could indicate that if several versions exist, the one marked as default will be used

@sonarqubecloud
Copy link

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.3% 0.3% Duplication

Copy link
Contributor

@feloy feloy left a comment

Choose a reason for hiding this comment

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

Thanks @valaparthvi for this work :)

@@ -163,6 +167,10 @@ func (o *InitClient) downloadDirect(URL string, dest string) error {
// downloadFromRegistry downloads a devfile from the provided registry and saves it in dest
// If registryName is empty, will try to download the devfile from the list of registries in preferences
func (o *InitClient) downloadFromRegistry(ctx context.Context, registryName string, devfile string, dest string) error {
// setting NewIndexSchema ensures that the Devfile library pulls registry based on the stack version
registryOptions := segment.GetRegistryOptions(ctx)
registryOptions.NewIndexSchema = true
Copy link
Contributor

Choose a reason for hiding this comment

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

We have to check if we need a fallback if the new index schema is not supported by the Devfile Registry. Let's keep it for another PR. The issue is tracked with #6435

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Dec 21, 2022
@feloy
Copy link
Contributor

feloy commented Dec 21, 2022

/override windows-integration-test/Windows-test
Flaky e2e test

@openshift-ci
Copy link

openshift-ci bot commented Dec 21, 2022

@feloy: Overrode contexts on behalf of feloy: windows-integration-test/Windows-test

In response to this:

/override windows-integration-test/Windows-test
Flaky e2e test

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.

@feloy
Copy link
Contributor

feloy commented Dec 21, 2022

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

@openshift-ci
Copy link

openshift-ci bot commented Dec 21, 2022

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

In response to this:

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

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 0d392ef into redhat-developer:main Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Allow fetching a specific Devfile Stack version
3 participants