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

MGMT-19599: Extend the operator API to indicate to which bundle the operator belongs #7170

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eranco74
Copy link
Contributor

@eranco74 eranco74 commented Jan 8, 2025

Part of Assisted Installer Operator marketplace
Jira task: https://issues.redhat.com/browse/MGMT-19599

Added support for operator bundles, introducing two initial bundles: OpenShift AI and Virtualization.
New API endpoints to retrieve bundle information:

  • List available operator bundles.
  • Retrieve operators associated with a specific bundle.
  • Update the API documentation (Swagger/OpenAPI) to reflect these changes.

These changes provide a more structured approach to managing and discovering operators, making it easier for users to find and select relevant operators during cluster installation.


  • Should this PR be tested by the reviewer? no
  • Is this PR relying on CI for an e2e test run? for regression
  • Should this PR be tested in a specific environment? no
  • Any logs, screenshots, etc that can help with the review process?
$ curl http://10.100.102.50:8090/api/assisted-install/v2/operators/bundles
["virtualization","openshiftai"]
$  curl http://10.100.102.50:8090/api/assisted-install/v2/operators/bundles/openshiftai
["pipelines","servicemesh","odf","authorino","serverless","openshift-ai"]
$  curl http://10.100.102.50:8090/api/assisted-install/v2/operators/bundles/virtualization
["odf","cnv","mtv"]
```-->

## List all the issues related to this PR

- [x] New Feature <!-- new functionality -->
- [ ] Enhancement <!-- refactor, code changes, improvement, that won't add new features -->
- [ ] Bug fix
- [ ] Tests
- [ ] Documentation
- [ ] CI/CD <!-- Notice that changes for Dockerfiles/Jenkinsfiles aren't tested in CI due to a known bug. -->

## What environments does this code impact?

- [ ] Automation (CI, tools, etc)
- [x] Cloud
- [ ] Operator Managed Deployments
- [x] None

## How was this code tested?

<!-- Please, select one or more if needed: -->

- [ ] assisted-test-infra environment
- [ ] dev-scripts environment
- [ ] Reviewer's test appreciated
- [ ] Waiting for CI to do a full test run
- [x] Manual (Elaborate on how it was tested)
- [ ] No tests needed

## Checklist

- [x] Title and description added to both, commit and PR.
- [x] Relevant issues have been associated (see [CONTRIBUTING] guide)
- [ ] This change does not require a documentation update (docstring, `docs`, README, etc)
- [x] Does this change include unit-tests (note that code changes require unit-tests)


## Reviewers Checklist

- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?

[Kubernetes community documentation]: https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#commit-message-guidelines
[CONTRIBUTING]: https://github.com/openshift/assisted-service/blob/master/CONTRIBUTING.md

Added operator bundles support
Introducing two initial bundles: OpenShift AI and Virtualization
New API endpoints to retrieve bundle information:
* List available operator bundles
* Retrieve operators associated with a specific bundle

Signed-off-by: Eran Cohen <[email protected]>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 8, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 8, 2025

@eranco74: This pull request references MGMT-19599 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

Part of Assisted Installer Operator marketplace
Jira task: https://issues.redhat.com/browse/MGMT-19599

Added support for operator bundles, introducing two initial bundles: OpenShift AI and Virtualization.
New API endpoints to retrieve bundle information:

  • List available operator bundles.
  • Retrieve operators associated with a specific bundle.
  • Update the API documentation (Swagger/OpenAPI) to reflect these changes.

These changes provide a more structured approach to managing and discovering operators, making it easier for users to find and select relevant operators during cluster installation.


  • Should this PR be tested by the reviewer? no
  • Is this PR relying on CI for an e2e test run? for regression
  • Should this PR be tested in a specific environment? no
  • Any logs, screenshots, etc that can help with the review process?
$ curl http://10.100.102.50:8090/api/assisted-install/v2/operators/bundles
["virtualization","openshiftai"]
$  curl http://10.100.102.50:8090/api/assisted-install/v2/operators/bundles/openshiftai
["pipelines","servicemesh","odf","authorino","serverless","openshift-ai"]
$  curl http://10.100.102.50:8090/api/assisted-install/v2/operators/bundles/virtualization
["odf","cnv","mtv"]
```-->

## List all the issues related to this PR

- [x] New Feature <!-- new functionality -->
- [ ] Enhancement <!-- refactor, code changes, improvement, that won't add new features -->
- [ ] Bug fix
- [ ] Tests
- [ ] Documentation
- [ ] CI/CD <!-- Notice that changes for Dockerfiles/Jenkinsfiles aren't tested in CI due to a known bug. -->

## What environments does this code impact?

- [ ] Automation (CI, tools, etc)
- [x] Cloud
- [ ] Operator Managed Deployments
- [x] None

## How was this code tested?

<!-- Please, select one or more if needed: -->

- [ ] assisted-test-infra environment
- [ ] dev-scripts environment
- [ ] Reviewer's test appreciated
- [ ] Waiting for CI to do a full test run
- [x] Manual (Elaborate on how it was tested)
- [ ] No tests needed

## Checklist

- [x] Title and description added to both, commit and PR.
- [x] Relevant issues have been associated (see [CONTRIBUTING] guide)
- [ ] This change does not require a documentation update (docstring, `docs`, README, etc)
- [x] Does this change include unit-tests (note that code changes require unit-tests)


## Reviewers Checklist

- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?

[Kubernetes community documentation]: https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#commit-message-guidelines
[CONTRIBUTING]: https://github.com/openshift/assisted-service/blob/master/CONTRIBUTING.md

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 8, 2025
@eranco74 eranco74 requested review from jhernand and tsorya January 8, 2025 15:25
@openshift-ci openshift-ci bot requested review from eliorerz and gamli75 January 8, 2025 15:26
@openshift-ci openshift-ci bot added the api-review Categorizes an issue or PR as actively needing an API review. label Jan 8, 2025
Copy link

openshift-ci bot commented Jan 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eranco74

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 35.08772% with 37 lines in your changes missing coverage. Please review.

Project coverage is 67.66%. Comparing base (0a00e70) to head (e76c3e8).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
internal/operators/handler/handler_v2.go 0.00% 9 Missing ⚠️
internal/operators/authorino/authorino_operator.go 0.00% 2 Missing ⚠️
internal/operators/cnv/cnv_operator.go 0.00% 2 Missing ⚠️
internal/operators/lso/ls_operator.go 0.00% 2 Missing ⚠️
internal/operators/lvm/lvm_operator.go 0.00% 2 Missing ⚠️
internal/operators/mce/mce_operator.go 0.00% 2 Missing ⚠️
internal/operators/mtv/operator.go 0.00% 2 Missing ⚠️
...eaturediscovery/node_feature_discovery_operator.go 0.00% 2 Missing ⚠️
...nternal/operators/nvidiagpu/nvidia_gpu_operator.go 0.00% 2 Missing ⚠️
internal/operators/odf/odf_operator.go 0.00% 2 Missing ⚠️
... and 5 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7170      +/-   ##
==========================================
- Coverage   67.70%   67.66%   -0.05%     
==========================================
  Files         296      296              
  Lines       40270    40327      +57     
==========================================
+ Hits        27265    27286      +21     
- Misses      10548    10585      +37     
+ Partials     2457     2456       -1     
Files with missing lines Coverage Δ
internal/operators/manager.go 79.64% <100.00%> (+1.56%) ⬆️
internal/operators/authorino/authorino_operator.go 9.09% <0.00%> (-0.35%) ⬇️
internal/operators/cnv/cnv_operator.go 76.83% <0.00%> (-0.88%) ⬇️
internal/operators/lso/ls_operator.go 9.09% <0.00%> (-0.44%) ⬇️
internal/operators/lvm/lvm_operator.go 76.31% <0.00%> (-1.37%) ⬇️
internal/operators/mce/mce_operator.go 70.27% <0.00%> (-1.29%) ⬇️
internal/operators/mtv/operator.go 68.42% <0.00%> (-1.48%) ⬇️
...eaturediscovery/node_feature_discovery_operator.go 12.69% <0.00%> (-0.42%) ⬇️
...nternal/operators/nvidiagpu/nvidia_gpu_operator.go 33.33% <0.00%> (-0.76%) ⬇️
internal/operators/odf/odf_operator.go 67.66% <0.00%> (-0.83%) ⬇️
... and 6 more

... and 2 files with indirect coverage changes

This commit also extend the MonitoredOperator model to include bundle associations.
Signed-off-by: Eran Cohen <[email protected]>
Copy link

openshift-ci bot commented Jan 9, 2025

@eranco74: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/edge-e2e-metal-assisted-odf-4-17 e76c3e8 link true /test edge-e2e-metal-assisted-odf-4-17
ci/prow/edge-e2e-metal-assisted-mtv-4-17 e76c3e8 link true /test edge-e2e-metal-assisted-mtv-4-17
ci/prow/edge-e2e-metal-assisted-cnv-4-17 e76c3e8 link true /test edge-e2e-metal-assisted-cnv-4-17
ci/prow/edge-e2e-ai-operator-disconnected-capi e76c3e8 link false /test edge-e2e-ai-operator-disconnected-capi
ci/prow/edge-e2e-ai-operator-ztp e76c3e8 link true /test edge-e2e-ai-operator-ztp
ci/prow/edge-e2e-ai-operator-ztp-capi e76c3e8 link false /test edge-e2e-ai-operator-ztp-capi

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants