-
Notifications
You must be signed in to change notification settings - Fork 151
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
feat: enable Trusty's Bias Feature Flag #1220
Conversation
pkg/upgrade/upgrade.go
Outdated
@@ -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) |
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.
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.
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.
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
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.
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>
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.
Data change looks good to me! Thanks for your help with this.
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.
/lgtm
[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 |
/hold cancel |
562efd1
into
opendatahub-io:incubation
Let's discuss naming a bit. GetReleaseFromCR() is actually discovers release of already deployed cluster 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. |
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 |
* 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)
* 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)
* 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)
* 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)
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
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
andrelease.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 versionupdate 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 iscleanup: 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 versionScreenshot or short clip
Merge criteria