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

fix manifest #171

Merged
merged 5 commits into from
Apr 4, 2023
Merged

fix manifest #171

merged 5 commits into from
Apr 4, 2023

Conversation

kim-tsao
Copy link
Contributor

@kim-tsao kim-tsao commented Apr 3, 2023

Please specify the area for this PR

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

  • fixes the manifest and config files that are generated before OCI artifacts are pushed.
  • Add an additional v2.2.0 schema stack with a deploy.yaml on the test registry so local testing can be done

Which issue(s) this PR fixes:

Fixes #?
devfile/api#1089

PR acceptance criteria:

Documentation (WIP)

How to test changes / Special notes to the reviewer:

Rebuilt the index server and deployed on a local cluster. Tested with the following testcase and confirmed the devfile.yaml and kubernetes/deploy.yaml were downloaded

func Test(t *testing.T) {
	opts := library.RegistryOptions{
		SkipTLSVerify: true,
		NewIndexSchema: true,
		Filter: library.RegistryFilter{

			MinSchemaVersion: "2.2",
		},
	}
	_ := library.PullStackFromRegistry("http://devfile-registry-test-default.apps-crc.testing/", "go:latest", ".", opts)
}

Also verified this works with odo

Devfile registries:
 NAME             URL                                                    SECURE 
 TestRegistry     http://devfile-registry-test-default.apps-crc.testing  No     
 DevfileRegistry  https://registry.devfile.io                            No     

./odo init --devfile go --devfile-version 2.0.0 --name my-go-app --devfile-registry TestRegistry
  __
 /  \__     Initializing a new component
 \__/  \    
 /  \__/    odo version: v3.8.0
 \__/

 ✓  Downloading devfile "go:2.0.0" from registry "TestRegistry" [336ms]

Your new component 'my-go-app' is ready in the current directory.
To start editing your component, use 'odo dev' and open this folder in your favorite IDE.
Changes will be directly reflected on the cluster.
To deploy your component to a cluster use "odo deploy".

Signed-off-by: Kim Tsao <ktsao@redhat.com>
@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.41 ⚠️

Comparison is base (0f64fa1) 42.69% compared to head (9fcac9c) 42.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
- Coverage   42.69%   42.28%   -0.41%     
==========================================
  Files           6        6              
  Lines        1047     1057      +10     
==========================================
  Hits          447      447              
- Misses        557      567      +10     
  Partials       43       43              
Impacted Files Coverage Δ
index/server/pkg/server/registry.go 21.27% <0.00%> (-2.54%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Kim Tsao <ktsao@redhat.com>
Signed-off-by: Kim Tsao <ktsao@redhat.com>
Signed-off-by: Kim Tsao <ktsao@redhat.com>
Signed-off-by: Kim Tsao <ktsao@redhat.com>
@kim-tsao
Copy link
Contributor Author

kim-tsao commented Apr 4, 2023

It looks like I need to have the staging server updated in order to add more unit tests. It doesn't make sense to mock when I need a real OCI server to work with. I'll add my manual testing to the PR description and open up a new issue to add new tests

@kim-tsao kim-tsao marked this pull request as ready for review April 4, 2023 01:43
@kim-tsao kim-tsao requested review from michael-valdron and removed request for elsony April 4, 2023 01:44
Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 4, 2023
@openshift-ci
Copy link

openshift-ci bot commented Apr 4, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kim-tsao, michael-valdron
Once this PR has been reviewed and has the lgtm label, please assign johnmcollier for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@kim-tsao kim-tsao merged commit ff8153b into devfile:main Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
2 participants