-
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
Add ModelRegistry Namespace Check #1862
Add ModelRegistry Namespace Check #1862
Conversation
.../0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0113__dsc_components.robot
Fixed
Show fixed
Hide fixed
|
||
# Get expected namespace | ||
${rc} ${expected_namespace}= Run And Return Rc And Output | ||
... oc get DataScienceCluster/${DSC_NAME} -n ${OPERATOR_NS} -o "jsonpath={".spec.components.modelregistry.registriesNamespace"}" |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
.../0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0113__dsc_components.robot
Fixed
Show fixed
Hide fixed
Robot Results
|
|
||
# Get actual namespace | ||
${rc} ${actual_namespace}= Run And Return Rc And Output | ||
... oc get deployments -A | grep ${MODELREGISTRY_CONTROLLER_DEPLOYMENT_NAME} | awk '{print$1}' |
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.
can you use label instead of doing grep that will be more K8s way
Refactored namespace check based on clarification of expected feature behavior. |
Quality Gate passedIssues Measures |
[Teardown] Restore DSC Component State modelregistry ${MODELREGISTRY_CONTROLLER__DEPLOYMENT_NAME} ${MODELREGISTRY_CONTROLLER__LABEL_SELECTOR} ${SAVED_MANAGEMENT_STATES.MODELREGISTRY} | ||
|
||
Validate ModelRegistry Removed State | ||
[Documentation] Validate that ModelRegistry management state Removed does remove relevant resources. | ||
[Tags] Operator Tier1 RHOAIENG-10404 modelregistry-removed | ||
|
||
# Properly validate Removed state by first setting to Manged, which will ensure that namspace | ||
# was created as needed for later validating that namespace persisted when component is Removed | ||
[Setup] Set DSC Component Managed State And Wait For Completion modelregistry ${MODELREGISTRY_CONTROLLER__DEPLOYMENT_NAME} ${MODELREGISTRY_CONTROLLER__LABEL_SELECTOR} |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
... oc get DataScienceCluster/${DSC_NAME} -n ${OPERATOR_NS} -o "jsonpath={".spec.components.modelregistry.registriesNamespace"}" | ||
Should Be Equal As Integers ${rc} 0 msg=${namespace} | ||
|
||
Should Be Equal ${namespace} ${MODEL_REGISTRY_NAMESPACE} msg=Model Registry Namespace: Actual "${namespace}" Expected: "${MODEL_REGISTRY_NAMESPACE}" |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
|
||
${rc} ${output}= Run And Return Rc And Output | ||
... oc get namespace -A ${MODEL_REGISTRY_NAMESPACE} | ||
Should Be Equal As Integers ${rc} 0 msg=${output} |
Check warning
Code scanning / Robocop
File has too many lines ({{ lines_count }}/{{max_allowed_count }}) Warning test
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.
Add ModelRegistry check to validate the appropriate namespace is created for ODH and RHOAI.
Validate that namespace is not deleted when management state is set to Removed.
RHOAIENG-12703