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

Add deprecated stacks filtering to registry-library #232

Merged

Conversation

thepetk
Copy link
Contributor

@thepetk thepetk commented Apr 10, 2024

Please specify the area for this PR

/area registry-library

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

After the implementation for https://github.com/api/issues/959 we have now the ability of filtering the registry index for deprecated or non deprecated stacks by adding a deprecated=true/false parameter in the URL.

This PR updates the registry-library importing the same logic followed to the index server too.

Which issue(s) this PR fixes:

Fixes devfile/api#1065

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?

Documentation (WIP)

How to test changes / Special notes to the reviewer:

Copy link

openshift-ci bot commented Apr 10, 2024

@thepetk: The label(s) area/registry-library cannot be applied, because the repository doesn't have them.

In response to this:

Please specify the area for this PR

/area registry-library

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

After the implementation for https://github.com/api/issues/959 we have now the ability of filtering the registry index for deprecated or non deprecated stacks by adding a deprecated=true/false parameter in the URL.

This PR updates the registry-library importing the same logic followed to the index server too.

Which issue(s) this PR fixes:

Fixes devfile/api#1065

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?

Documentation (WIP)

How to test changes / Special notes to the reviewer:

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 10, 2024
@thepetk thepetk changed the title Ft/add deprecated filter to get registry index Add deprecated stacks filtering to registry-library Apr 10, 2024
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.

I would reflect these changes in other areas as well (docs and testing):

registry-library/README.md Outdated Show resolved Hide resolved
registry-library/library/library_test.go Outdated Show resolved Hide resolved
@thepetk thepetk force-pushed the ft/add_deprecated_filter_to_get_registry_index branch from 8c52863 to 162cd73 Compare April 15, 2024 13:50
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 15, 2024
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.

Change the value of index/server/tests/registry/stacks/java-springboot/devfile.yaml#L9 to our sprintboot logo to get around this https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2024
@thepetk
Copy link
Contributor Author

thepetk commented Apr 15, 2024

Change the value of index/server/tests/registry/stacks/java-springboot/devfile.yaml#L9 to our sprintboot logo to get around this https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg

I've added this change to all places where the icon was mentioned. Although I think better if we open an issue for a more permanent solution around this. I think a good approach here could be to try to gather all test resources into a single directory, shared between the modules of the repo. WDYT?

Signed-off-by: thepetk <[email protected]>
@michael-valdron
Copy link
Member

Change the value of index/server/tests/registry/stacks/java-springboot/devfile.yaml#L9 to our sprintboot logo to get around this https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg

I've added this change to all places where the icon was mentioned. Although I think better if we open an issue for a more permanent solution around this. I think a good approach here could be to try to gather all test resources into a single directory, shared between the modules of the repo. WDYT?

@thepetk I agree, an issue should opened to do this instead, I'd suggest everything should use registry-support/tests/registry instead so the content from all the individual ones should be migrated there and unit test source should point there.

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 15, 2024
Copy link

openshift-ci bot commented Apr 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: michael-valdron, thepetk

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:
  • OWNERS [michael-valdron,thepetk]

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

@thepetk thepetk merged commit 4f92146 into devfile:main Apr 15, 2024
8 checks passed
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support filtering deprecated devfile stacks and samples within the registry library
2 participants