-
Notifications
You must be signed in to change notification settings - Fork 82
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 the selfmanaged uninstall of rhoai operator #2157
base: master
Are you sure you want to change the base?
fix the selfmanaged uninstall of rhoai operator #2157
Conversation
${result} = Set Variable False | ||
[Documentation] Returns if RHODS operator has a CSV | ||
|
||
${result} = Set Variable False |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning
${namespace}= Get RHODS Namespace | ||
IF "${subscription}" != "${EMPTY}" | ||
Log Getting CSV from subscription ${subscription} namespace ${namespace} console=yes | ||
${rc} ${current_csv_name} = Run And Return Rc And Output |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning
... oc get subscription ${subscription} -n ${namespace} -ojson | jq '.status.currentCSV' | tr -d '"' | ||
Log Got CSV '${current_csv_name}' from subscription '${subscription}', result: ${rc} console=yes | ||
IF "${rc}" == "0" and "${current_csv_name}" != "${EMPTY}" | ||
${rc}= Run Keyword And Return Status oc get csv ${current_csv_name} -n ${namespace} |
Check warning
Code scanning / Robocop
Keyword name '{{ keyword_name }}' does not follow case convention Warning
@@ -84,6 +84,7 @@ | |||
Set Global Variable ${RHODS_VERSION} | |||
Set Prometheus Variables | |||
Set Global Variable ${DASHBOARD_APP_NAME} ${PRODUCT.lower()}-dashboard | |||
Set Global Variable ${RHODS_PACKAGE_NAME} rhods-operator |
Check notice
Code scanning / Robocop
{{ set_variable_keyword }} can be replaced with VAR Note test
@@ -84,6 +84,7 @@ | |||
Set Global Variable ${RHODS_VERSION} | |||
Set Prometheus Variables | |||
Set Global Variable ${DASHBOARD_APP_NAME} ${PRODUCT.lower()}-dashboard | |||
Set Global Variable ${RHODS_PACKAGE_NAME} rhods-operator |
Check warning
Code scanning / Robocop
Don't set global variables outside the variables section Warning test
Robot Results
|
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.
Maybe uninstall should be verified on managed cluster as well.
Hi @kobihk , in the description you have mentioned |
ods_ci/tasks/Resources/RHODS_OLM/pre-tasks/oc_is_operator_installed.robot
Outdated
Show resolved
Hide resolved
ods_ci/tasks/Resources/RHODS_OLM/pre-tasks/oc_is_operator_installed.robot
Outdated
Show resolved
Hide resolved
Signed-off-by: Kobi Hakimi <[email protected]>
b6caea8
to
6f0cf73
Compare
Quality Gate passedIssues Measures |
[Documentation] Returns the subscription name of RHOAI/ODH operator | ||
Log Get the RHODS subscription name by package name: '${RHODS_PACKAGE_NAME}' console=yes | ||
${rc} ${out}= Run And Return RC And Output | ||
... oc get sub -A -o json | jq --arg pkgName "${RHODS_PACKAGE_NAME}" -r '.items[] | select(.spec.name==$pkgName) | .metadata.name' |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning
[Documentation] Returns the namespace of RHOAI/ODH operator | ||
Log Get the RHODS namespace by package name: '${RHODS_PACKAGE_NAME}' console=yes | ||
${rc} ${out}= Run And Return RC And Output | ||
... oc get sub -A -o json | jq --arg pkgName "${RHODS_PACKAGE_NAME}" -r '.items[] | select(.spec.name==$pkgName) | .metadata.namespace' |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning
The uninstall of rhoai addon on managed cluster - failed AFAICS this is something that we need to fix in: olminstall/cleanup.sh script file so probably it will be in another patch |
Hi @kobihk , Cli way of uninstallation using olminstall is common across self managed/managed and odh-nightlies. It varies only in the argument that we pass. Also, rhoai-operator-dev - Could you confirm if this is the operator name that you are observing in stage ? |
@@ -84,6 +84,7 @@ Initialize Global Variables | |||
Set Global Variable ${RHODS_VERSION} | |||
Set Prometheus Variables | |||
Set Global Variable ${DASHBOARD_APP_NAME} ${PRODUCT.lower()}-dashboard | |||
Set Global Variable ${RHODS_PACKAGE_NAME} rhods-operator |
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.
are you working on passing this variable from CI/CD job? otherwise ODH uninstall won't work
Since we moved to using Konflux, we don't have the same CATALOG_SOURCE_NAME and OPERATOR_NAME for Stage and Red Hat.
Stage:
Operator name: rhoai-operator-dev, CatalogSource: rhoai-catalog-dev
Red Hat:
Operator name: rhods-operator, CatalogSource: redhat-operators
So the uninstall didn't work as expected.
Related to Jira ticket: RHOAIENG-2720