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: enable Trusty's Bias Feature Flag #1220

Merged

Conversation

zdtsw
Copy link
Member

@zdtsw zdtsw commented Sep 4, 2024

Description

https://issues.redhat.com/browse/RHOAIENG-11891

How Has This Been Tested?

local build: from odh quay.io/wenzhou/opendatahub-operator-catalog:v2.18.11891-0

for odh build: quay.io/wenzhou/opendatahub-operator-catalog:v2.18.11891-0

for rhoai: quay.io/wenzhou/rhoai-operator-catalog:v2.14.11891-0
tests on rhoai local build:
New install

  • clean installation of local build
    get disableBiasMetrics: false

Upgrade

  • prepare:
    install RHOAI 2.12 + enable dashbaord
    check ODC CR, get disableBiasMetrics: true
    uninstall operator but keep DSCI not deleted
    check DSCI CR should have release.name: OpenShift AI Self-Managed and release.version: 2.12.0

  • test:
    install rhoai local build , no need enable any component
    after pod stable, check ODC CR, get disableBiasMetrics: false => expected, as force to false on from any old version

    update check ODC CR, to disableBiasMetrics: true
    restart pod, check ODC CR, keeps disableBiasMetrics: true => expected, as from a 2.14 to 2.14, should keep it as is

  • cleanup: uninstall everything

  • prepare:
    install RHOAI 2.10 + enable dashbaord
    ensure ODC CR has disableBiasMetrics: true
    should be no release block in DSCI CR
    uninstall operator but keep DSCI not deleted + ODC CR

  • test:
    install rhoai local build , no need enable any component
    after pod stable, check ODC CR, get disableBiasMetrics: false => expected, as force to false from any old version

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

@@ -424,6 +428,11 @@ func unsetOwnerReference(ctx context.Context, cli client.Client, instanceName st
return fmt.Errorf("error unset ownerreference for CR %s : %w", instanceName, err)
}
}
// flip TrustyAI BiasMetrics to false (.spec.dashboardConfig.disableBiasMetrics)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you still need to gate this configuration change to only execute when upgrade from version < 2.14 to version >= 2.14. This will prevent the case where a user running 2.14 (or later version) manually disables this feature, to be overriden on their next upgrade.

Copy link
Member Author

Choose a reason for hiding this comment

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

i was thinking this will be a temp workaround which only lives in 2.14, then we can remove the call in 2.15.
from downstream skipRange: (different from ODH upgrade path which we allow on jump from 2.X to the latest release 2.17 for now)

  • 2.8.x can one jump to 2.10
  • 2.11 can only go from 2.10
  • 2.12 can only go from 2.11
  • 2.13 can only go from 2.12

Copy link
Contributor

Choose a reason for hiding this comment

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

In theory, 2.8.x will also be able to jump to ~2.17 when that is released (EUS channel).

In order to know which version the operator is upgrading from, can we use the DSCI status? https://github.com/opendatahub-io/opendatahub-operator/blob/incubation/pkg/cluster/cluster_config.go#L133

- for upgrade case, if previously flag is true, after install new version should set to false

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
- introduce upgrade.GetReleaseFromCR()
- create upgradeODCCR() for calling unsetOwnerReference and updateODCBiasMetrics
- updateODSCBiasMetrics() only patch if previous Release is lower than 2.14, e.g 2.13.1, 2.8.3

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Copy link
Member

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

Data change looks good to me! Thanks for your help with this.

Copy link
Member

@VaishnaviHire VaishnaviHire left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented Sep 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, VaishnaviHire

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

@VaishnaviHire
Copy link
Member

/hold cancel

@openshift-merge-bot openshift-merge-bot bot merged commit 562efd1 into opendatahub-io:incubation Sep 12, 2024
8 checks passed
@ykaliuta
Copy link
Contributor

Let's discuss naming a bit.
For my understanding that GetReleaseFrom* actually serve different purposes. Not just getting release (like the same) from different places how I read it from function names. What I see is

GetReleaseFromCR() is actually discovers release of already deployed cluster
GetReleaseFromCSV() look up currently running operator release (former GetRelease()). Getting it from CSV is just an implementation (I would prefer compile it in but we did not finish that discussion).

I would personally kept GetRelease() and introduced GetDeployedRelease() or something like that.

Cc: @lburgazzoli

@zdtsw
Copy link
Member Author

zdtsw commented Sep 13, 2024

Let's discuss naming a bit. For my understanding that GetReleaseFrom* actually serve different purposes. Not just getting release (like the same) from different places how I read it from function names. What I see is

GetReleaseFromCR() is actually discovers release of already deployed cluster GetReleaseFromCSV() look up currently running operator release (former GetRelease()). Getting it from CSV is just an implementation (I would prefer compile it in but we did not finish that discussion).

I would personally kept GetRelease() and introduced GetDeployedRelease() or something like that.

Cc: @lburgazzoli

i am ok if we want to discuss naming and refine code.
to get the main feature out, so we can start basic verification process is the main point here.

@ykaliuta
Copy link
Contributor

No, I'm not about blocking or something. Renaming follow-up if we agree is a tiny thing :) I raised it here since this is the origin.

@zdtsw
Copy link
Member Author

zdtsw commented Sep 13, 2024

No, I'm not about blocking or something. Renaming follow-up if we agree is a tiny thing :) I raised it here since this is the origin.

FYI: #1232

zdtsw referenced this pull request in zdtsw-forking/rhods-operator Sep 16, 2024
* feat: enable Trusty's Bias Feature Flag

- for upgrade case, if previously flag is true, after install new version should set to false

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* - rename cluster.GetRelease to cluster.GetReleaseFromCSV()
- introduce upgrade.GetReleaseFromCR()
- create upgradeODCCR() for calling unsetOwnerReference and updateODCBiasMetrics
- updateODSCBiasMetrics() only patch if previous Release is lower than 2.14, e.g 2.13.1, 2.8.3

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 562efd1)
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Sep 16, 2024
* feat: enable Trusty's Bias Feature Flag

- for upgrade case, if previously flag is true, after install new version should set to false

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* - rename cluster.GetRelease to cluster.GetReleaseFromCSV()
- introduce upgrade.GetReleaseFromCR()
- create upgradeODCCR() for calling unsetOwnerReference and updateODCBiasMetrics
- updateODSCBiasMetrics() only patch if previous Release is lower than 2.14, e.g 2.13.1, 2.8.3

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 562efd1)
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Sep 16, 2024
* feat: enable Trusty's Bias Feature Flag

- for upgrade case, if previously flag is true, after install new version should set to false

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* - rename cluster.GetRelease to cluster.GetReleaseFromCSV()
- introduce upgrade.GetReleaseFromCR()
- create upgradeODCCR() for calling unsetOwnerReference and updateODCBiasMetrics
- updateODSCBiasMetrics() only patch if previous Release is lower than 2.14, e.g 2.13.1, 2.8.3

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 562efd1)
openshift-merge-bot bot referenced this pull request in red-hat-data-services/rhods-operator Sep 18, 2024
* feat: enable Trusty's Bias Feature Flag

- for upgrade case, if previously flag is true, after install new version should set to false

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* - rename cluster.GetRelease to cluster.GetReleaseFromCSV()
- introduce upgrade.GetReleaseFromCR()
- create upgradeODCCR() for calling unsetOwnerReference and updateODCBiasMetrics
- updateODSCBiasMetrics() only patch if previous Release is lower than 2.14, e.g 2.13.1, 2.8.3

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 562efd1)
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