-
Notifications
You must be signed in to change notification settings - Fork 133
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
base: incubation
Are you sure you want to change the base?
feat: Mapping component versions to RHOAI releases #1299
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
4b85fbc
to
d29af02
Compare
@Sara4994: The following test failed, say
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. |
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"` |
There was a problem hiding this comment.
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 thespec. 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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
@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. |
<!---
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:
`
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