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

Add ModelRegistry Namespace Check #1862

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,23 @@

Set DSC Component Managed State And Wait For Completion modelregistry ${MODELREGISTRY_CONTROLLER__DEPLOYMENT_NAME} ${MODELREGISTRY_CONTROLLER__LABEL_SELECTOR}

Check Model Registry Namespace

[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

Line is too long (180/120)

Set DSC Component Removed State And Wait For Completion modelregistry ${MODELREGISTRY_CONTROLLER__DEPLOYMENT_NAME} ${MODELREGISTRY_CONTROLLER__LABEL_SELECTOR}

# Note: Model Registry namespace will not be deleted when component state changed from Manged to Removed
Check Model Registry Namespace

[Teardown] Restore DSC Component State modelregistry ${MODELREGISTRY_CONTROLLER__DEPLOYMENT_NAME} ${MODELREGISTRY_CONTROLLER__LABEL_SELECTOR} ${SAVED_MANAGEMENT_STATES.MODELREGISTRY}

Validate KServe Controller Manager Managed State
Expand Down Expand Up @@ -382,3 +391,17 @@
ELSE
Fail Deployment image ${deployment_name} does not contain pull path registry.redhat.io
END

Check Model Registry Namespace
[Documentation] Check that DSC modelregistry.registriesNamespace is correct for ODH/RHOAI
... Validate that namespace exists.

${rc} ${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

Line is too long (135/120)
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

Line is too long (161/120)

${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

File has too many lines (428/400)
Loading