-
Notifications
You must be signed in to change notification settings - Fork 107
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
fix(dspv2): label should be check on existance and value as well #967
fix(dspv2): label should be check on existance and value as well #967
Conversation
Out of curiosity, where this logic comes from? I checked Jira, slack thread, the referenced commit message, but missed it somehow. |
for all the resource deployed by ODH operator, we set the label and "true" on these resource, this is by the "plugin"
the original PR for DSPv2 with Argo, does check, but only if this CRD has label on it, but not for the 2nd case "check value is true" |
- when label has value "true" means Argo CDR is from DSPv2 - if label has value "false" could be a pre-exist cluster CRD Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
controllers/datasciencecluster/datasciencecluster_controller.go
Outdated
Show resolved
Hide resolved
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
// Verify if existing workflow is deployed by ODH with label | ||
odhLabelValue, odhLabelExists := workflowCRD.Labels[labels.ODH.Component(ComponentName)] | ||
if odhLabelExists && odhLabelValue != "true" { | ||
return fmt.Errorf(" %v CRD already exists but not deployed by this operator. Remove existing Argo workflows or set datasciencepipelines to Removed to proceed ", |
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.
maybe use the full path for clarity? spec.components.datasciencepipelines.managedState
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 got merged the same time i made this update 🤣
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.
fix in #970
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.
minor suggestion, but other than that LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: etirelli, ykaliuta 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 |
ef977c2
into
opendatahub-io:incubation
…ndatahub-io#967) * fix(dspv2): label should be check on existance and value as well - when label has value "true" means Argo CDR is from DSPv2 - if label has value "false" could be a pre-exist cluster CRD Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update(naming): code review from previous PR Signed-off-by: Wen Zhou <wenzhou@redhat.com> * Update controllers/datasciencecluster/datasciencecluster_controller.go Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> Signed-off-by: Wen Zhou <wenzhou@redhat.com>
…ndatahub-io#967) * fix(dspv2): label should be check on existance and value as well - when label has value "true" means Argo CDR is from DSPv2 - if label has value "false" could be a pre-exist cluster CRD Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update(naming): code review from previous PR Signed-off-by: Wen Zhou <wenzhou@redhat.com> * Update controllers/datasciencecluster/datasciencecluster_controller.go Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> Signed-off-by: Wen Zhou <wenzhou@redhat.com>
…ndatahub-io#967) * fix(dspv2): label should be check on existance and value as well - when label has value "true" means Argo CDR is from DSPv2 - if label has value "false" could be a pre-exist cluster CRD Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update(naming): code review from previous PR Signed-off-by: Wen Zhou <wenzhou@redhat.com> * Update controllers/datasciencecluster/datasciencecluster_controller.go Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
Description
https://issues.redhat.com/browse/RHOAIENG-4570
based on #955
How Has This Been Tested?
Merge criteria: