Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions ods_ci/tasks/Resources/Files/dsc_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ spec:
managementState: <llamastackoperator_value>
mlflowoperator:
managementState: <mlflowoperator_value>
sparkoperator:
managementState: <sparkoperator_value>
9 changes: 8 additions & 1 deletion ods_ci/tasks/Resources/RHODS_OLM/install/oc_install.robot
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ${DSCI_NAME} = default-dsci
... llamastackoperator
... mlflowoperator
... modelsasservice
... sparkoperator
${LWS_OP_NAME}= leader-worker-set
${LWS_OP_NS}= openshift-lws-operator
${LWS_SUB_NAME}= leader-worker-set
Expand Down Expand Up @@ -338,6 +339,12 @@ Verify RHODS Installation
... label_selector=app.kubernetes.io/part-of=mlflowoperator
END

${sparkoperator} = Is Component Enabled sparkoperator ${DSC_NAME}
IF "${sparkoperator}" == "true"
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app.kubernetes.io/name=spark-operator
END

${modelsasservice} = Is Nested Component Enabled kserve modelsAsService ${DSC_NAME}
IF "${modelsasservice}" == "true"
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
Expand All @@ -354,7 +361,7 @@ Verify RHODS Installation
END
END

IF "${dashboard}" == "true" or "${workbenches}" == "true" or "${aipipelines}" == "true" or "${kserve}" == "true" or "${kueue}" == "true" or "${ray}" == "true" or "${trustyai}" == "true" or "${modelregistry}" == "true" or "${trainingoperator}" == "true" # robocop: disable
IF "${dashboard}" == "true" or "${workbenches}" == "true" or "${aipipelines}" == "true" or "${kserve}" == "true" or "${kueue}" == "true" or "${ray}" == "true" or "${trustyai}" == "true" or "${modelregistry}" == "true" or "${trainingoperator}" == "true" or "${sparkoperator}" == "true" # robocop: disable
Log To Console Waiting for pod status in ${APPLICATIONS_NAMESPACE}
Wait For Pods Status namespace=${APPLICATIONS_NAMESPACE} timeout=600
Log Verified Applications NS: ${APPLICATIONS_NAMESPACE} console=yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
${MLFLOWOPERATOR_CONTROLLER_MANAGER_DEPLOYMENT_NAME} mlflow-operator-controller-manager
${MODELSASSERVICE_CONTROLLER_MANAGER_LABEL_SELECTOR} app.kubernetes.io/part-of=models-as-a-service
${MODELSASSERVICE_CONTROLLER_MANAGER_DEPLOYMENT_NAME} maas-api
${SPARKOPERATOR_LABEL_SELECTOR} app.kubernetes.io/name=spark-operator
${SPARKOPERATOR_DEPLOYMENT_NAME} spark-operator-controller-manager
${NOTEBOOK_CONTROLLER_DEPLOYMENT_LABEL_SELECTOR} component.opendatahub.io/name=kf-notebook-controller
${NOTEBOOK_CONTROLLER_MANAGER_LABEL_SELECTOR} component.opendatahub.io/name=odh-notebook-controller
${NOTEBOOK_DEPLOYMENT_NAME} notebook-controller-deployment
Expand All @@ -61,6 +63,7 @@
... LLAMASTACKOPERATOR=${EMPTY}
... MLFLOWOPERATOR=${EMPTY}
... MODELSASSERVICE=${EMPTY}
... SPARKOPERATOR=${EMPTY}

@{CONTROLLERS_LIST} # dashboard added in Suite Setup, since it's different in RHOAI vs ODH
... data-science-pipelines-operator-controller-manager
Expand Down Expand Up @@ -546,6 +549,63 @@

[Teardown] Restore DSC Component State mlflowoperator ${MLFLOWOPERATOR_CONTROLLER_MANAGER_DEPLOYMENT_NAME} ${MLFLOWOPERATOR_CONTROLLER_MANAGER_LABEL_SELECTOR} ${SAVED_MANAGEMENT_STATES.MLFLOWOPERATOR}

Validate Spark Default State
[Documentation] Validate that sparkoperator component defaults to Removed state (dev preview).
... This verifies that the component is in Removed state by default and resources are not present.
[Tags]
... Operator
... Tier1
... sparkoperator-default
... Integration
${current_state}= Get DSC Component State ${DSC_NAME} sparkoperator ${OPERATOR_NS}
Should Be Equal ${current_state} Removed
... msg=Sparkoperator should default to Removed state in dev preview, but found ${current_state}
# Verify that resources are not present when in Removed state
Wait Until Keyword Succeeds 2 min 10 sec
... Is Resource Present Deployment ${SPARKOPERATOR_DEPLOYMENT_NAME} ${APPLICATIONS_NS}
... ${IS_NOT_PRESENT}

Validate Spark Managed State
[Documentation] Validate that the DSC Sparkoperator component Managed state creates the expected resources,
... check that Sparkoperator deployment is created and pod is in Ready state
[Tags]
... Operator
... Tier1
... sparkoperator-managed
... Integration
Set DSC Component Managed State And Wait For Completion
... sparkoperator
... ${SPARKOPERATOR_DEPLOYMENT_NAME}
... ${SPARKOPERATOR_LABEL_SELECTOR}
Check That Image Pull Path Is Correct ${SPARKOPERATOR_DEPLOYMENT_NAME} ${IMAGE_PULL_PATH}

[Teardown] Restore DSC Component State sparkoperator
... ${SPARKOPERATOR_DEPLOYMENT_NAME} ${SPARKOPERATOR_LABEL_SELECTOR}
... ${SAVED_MANAGEMENT_STATES.SPARKOPERATOR}

Validate Spark Removed State

Check warning

Code scanning / Robocop

Test case '{{ test_name }}' is too long ({{ test_length }}/{{ allowed_length }}) Warning test

Test case 'Validate Spark Removed State' is too long (21/20)
[Documentation] Validate that Sparkoperator management state Removed does remove relevant resources.
... Since sparkoperator is in dev preview and defaults to Removed state, first set it to Managed
... to ensure resources exist before testing removal.
[Tags]
... Operator
... Tier1
... sparkoperator-removed
... Integration
# Properly validate Removed state by first setting to Managed, which will ensure that resources
# are created as needed for later validating that they are removed when component is set to Removed
[Setup] Set DSC Component Managed State And Wait For Completion sparkoperator
... ${SPARKOPERATOR_DEPLOYMENT_NAME} ${SPARKOPERATOR_LABEL_SELECTOR}

Set DSC Component Removed State And Wait For Completion
... sparkoperator
... ${SPARKOPERATOR_DEPLOYMENT_NAME}
... ${SPARKOPERATOR_LABEL_SELECTOR}

[Teardown] Restore DSC Component State sparkoperator
... ${SPARKOPERATOR_DEPLOYMENT_NAME} ${SPARKOPERATOR_LABEL_SELECTOR}
... ${SAVED_MANAGEMENT_STATES.SPARKOPERATOR}

Validate Modelsasservice Managed State
[Documentation] Validate that the DSC Modelsasservice component Managed state creates the expected resources,
... check that ModelsAsService deployment is created and pod is in Ready state
Expand Down Expand Up @@ -665,6 +725,8 @@
${SAVED_MANAGEMENT_STATES.FEASTOPERATOR}= Get DSC Component State ${DSC_NAME} feastoperator ${OPERATOR_NS}
${SAVED_MANAGEMENT_STATES.LLAMASTACKOPERATOR}= Get DSC Component State ${DSC_NAME} llamastackoperator ${OPERATOR_NS}
${SAVED_MANAGEMENT_STATES.MLFLOWOPERATOR}= Get DSC Component State ${DSC_NAME} mlflowoperator ${OPERATOR_NS}
${SAVED_MANAGEMENT_STATES.SPARKOPERATOR}= Get DSC Component State ${DSC_NAME} sparkoperator

Check notice

Code scanning / Robocop

Variable '{{ name }}' is assigned but not used Note test

Variable '${SAVED_MANAGEMENT_STATES.SPARKOPERATOR}' is assigned but not used
... ${OPERATOR_NS}
${SAVED_MANAGEMENT_STATES.MODELSASSERVICE}= Get DSC Nested Component State ${DSC_NAME} kserve modelsAsService ${OPERATOR_NS}
Set Suite Variable ${SAVED_MANAGEMENT_STATES}
Append To List ${CONTROLLERS_LIST} ${DASHBOARD_DEPLOYMENT_NAME}
Expand Down
Loading