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

feat: Mapping component versions to RHOAI releases #1299

Open
wants to merge 1 commit into
base: incubation
Choose a base branch
from

Conversation

Sara4994
Copy link
Contributor

@Sara4994 Sara4994 commented Oct 11, 2024

<!---
Many thanks for submitting your Pull Request ❤️!

Please complete the following sections for a smooth review.
-->

Description

The PR is a first step to the feature initiative tracked in JIRA and this PR adds feature to capture RHOAI release versions from all the components(that are supported by DSC) repositories and include it in the DSC status.

JIRA: https://issues.redhat.com/browse/RHOAIENG-12619

How Has This Been Tested?

To test with DevFlags:

  • In a forked version of the components repository and create an .env file in config/manifest directory, have it in your branch.
  • Point that forked repository as a DevFlag like this
  • Build and deploy the changes into the cluster.
  • Create DSCI and DSC instances and you will be able see the status.components get updated with component upstream release details like below

`
apiVersion: datasciencecluster.opendatahub.io/v1
kind: DataScienceCluster
metadata:

spec:
components:

status:
components:
datasciencepipelines
upstreamReleases:
- name: datasciencepipelines
displayName: Red Hat Build of Kubeflow Pipelines
version: 2.2.0
repoUrl: https://github.com/opendatahub-io/data-science-pipelines
`

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link

openshift-ci bot commented Oct 11, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from sara4994. 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

Copy link

openshift-ci bot commented Oct 13, 2024

@Sara4994: The following test 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/opendatahub-operator-e2e d29af02 link true /test opendatahub-operator-e2e

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.

@ykaliuta
Copy link
Contributor

It's still draft, isn't it?

@@ -114,7 +108,7 @@ type DataScienceClusterStatus struct {

// Expose component's specific status
// +optional
Components ComponentsStatus `json:"components,omitempty"`
Components map[string]status.ReleaseStatus `json:"components,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

the ComponentStatus is meant to hold more information that the release status so I would not conflate different kind of information into a ReleaseStaus struct as it would be misleading.

I would also recommend not to use a map as:

  • the ComponentStatus should be symmetric to the spec. Components in term of naming
  • With a map, it would be extremely easy to accidental break the API

Version: version.OperatorVersion{Version: componentVersion},
RepoURL: repositoryURL}

fmt.Print("release object", componentReleaseStatus)
Copy link
Contributor

Choose a reason for hiding this comment

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

should be removed

@@ -86,6 +87,7 @@ type ComponentInterface interface {
owner metav1.Object, DSCISpec *dsciv1.DSCInitializationSpec, platform cluster.Platform, currentComponentStatus bool) error
Cleanup(ctx context.Context, cli client.Client, owner metav1.Object, DSCISpec *dsciv1.DSCInitializationSpec) error
GetComponentName() string
GetComponentStatus() ([]status.ComponentReleaseStatus, error)
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be better to pass a DataScienceCluster instance to the method, so each component can set the related status according to the specif need.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking a little bit more, it may even be moved in the ReconcileComponent method (with some method signature changes)

@lburgazzoli
Copy link
Contributor

@Sara4994 I'd like to see this kind of steps to be performed only once i.e. at initialization time as component version won't change during the lifetime of the operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants