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 release version to status #1023

Merged
merged 6 commits into from
May 30, 2024

Conversation

VaishnaviHire
Copy link
Member

Description

Jira Issue: https://issues.redhat.com/browse/RHOAIENG-6292

Note, this is an initialization PR i.e the changes introduce only the status field for release in DSC and DSCI for 2.10

We need a followup PR to introduce changes in upgrade logic using this version(2.11)

How Has This Been Tested?

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • 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

@zdtsw
Copy link
Member

zdtsw commented May 29, 2024

in the case of upgrade from 2.9.3 to 2.10.0 (assume this change gets into 2.10.0) user will see the new Release filed after upgrade, right?
and if we want to support both "init" version and "upgraded" version in the future, will Release with only oneVersion enough?

Version version.OperatorVersion `json:"version,omitempty"`
}

func SetRelease(cli client.Client) (*Release, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

May be it is GetRelease() since creates the structure and does not set it anywhere (and in sync with the error message).

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Version version.OperatorVersion `json:"version,omitempty"`
}

func SetRelease(cli client.Client) (*Release, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally do not see reason for pointer (*Release) here since you anyway dereference it right after the call and optimiser should avoid extra structure copying, but it's a matter of taste, probably.

operatorReleaseVersion, err := cluster.SetRelease(r.Client)
if err != nil {
r.Log.Error(err, "failed to get operator release version")
return ctrl.Result{}, err
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we consider it as a critical error?

Copy link
Member Author

Choose a reason for hiding this comment

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

We probably need this to be critical error. It points to either error getting platform or CSV

@@ -257,10 +257,17 @@ func (r *DataScienceClusterReconciler) Reconcile(ctx context.Context, req ctrl.R
}

// finalize reconciliation
operatorReleaseVersion, err := cluster.SetRelease(r.Client)
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it would be useful to retrieve the version information before reconciling components? in case there are problems with certain components...

Copy link
Contributor

@etirelli etirelli left a comment

Choose a reason for hiding this comment

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

Left minor comments, but overall I think it is fine.

@openshift-ci openshift-ci bot removed the lgtm label May 29, 2024
@VaishnaviHire VaishnaviHire marked this pull request as ready for review May 29, 2024 21:09
@openshift-ci openshift-ci bot removed the lgtm label May 30, 2024
@VaishnaviHire
Copy link
Member Author

@zdtsw @AjayJagan Fixed the unit tests. Can you add the lgtm again?

Copy link

openshift-ci bot commented May 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AjayJagan, etirelli, zdtsw

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 [AjayJagan,etirelli,zdtsw]

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

@AjayJagan
Copy link
Contributor

/lgtm

@VaishnaviHire VaishnaviHire merged commit 34283e7 into opendatahub-io:incubation May 30, 2024
3 of 8 checks passed
VaishnaviHire added a commit to VaishnaviHire/opendatahub-operator that referenced this pull request May 30, 2024
* Add release version to status

* Set Release version

* Address comments and update manifests

* Update api docs

* Fix unit tests

* fix linters

(cherry picked from commit 34283e7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants