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

Revert "New KW Wait For Deployment Replica To Be Ready for oc_install.robot" because discussion was not done #1872

Closed
wants to merge 1 commit into from
Closed
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
94 changes: 62 additions & 32 deletions ods_ci/tasks/Resources/RHODS_OLM/install/oc_install.robot
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@
Set Global Variable ${DASHBOARD_APP_NAME} ${PRODUCT.lower()}-dashboard
Log Verifying RHODS installation console=yes
Log To Console Waiting for all RHODS resources to be up and running
Wait For Deployment Replica To Be Ready namespace=${OPERATOR_NAMESPACE}
... label_selector=name=${OPERATOR_NAME_LABEL} timeout=2000s
Wait For Pods Numbers 1
... namespace=${OPERATOR_NAMESPACE}
... label_selector=name=${OPERATOR_NAME_LABEL}
... timeout=2000
Wait For Pods Status namespace=${OPERATOR_NAMESPACE} timeout=1200
Log Verified ${OPERATOR_NAMESPACE} console=yes

Expand All @@ -97,68 +99,96 @@
END
Apply DataScienceCluster CustomResource dsc_name=${DSC_NAME}
END

${dashboard} = Is Component Enabled dashboard ${DSC_NAME}
IF ("${UPDATE_CHANNEL}" == "stable" or "${UPDATE_CHANNEL}" == "beta") or "${dashboard}" == "true"
# Needs to be removed ASAP
IF "${PRODUCT}" == "ODH"
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=odh-dashboard timeout=1200s
Log To Console "Waiting for 2 pods in ${APPLICATIONS_NAMESPACE}, label_selector=app=odh-dashboard"
Wait For Pods Numbers 2
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=odh-dashboard
... timeout=1200
#This line of code is strictly used for the exploratory cluster to accommodate UI/UX team requests
Add UI Admin Group To Dashboard Admin

ELSE
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=${DASHBOARD_APP_NAME} timeout=1200s
Log To Console "Waiting for 5 pods in ${APPLICATIONS_NAMESPACE}, label_selector=app=${DASHBOARD_APP_NAME}"
Wait For Pods Numbers 5
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=${DASHBOARD_APP_NAME}
... timeout=1200
END
END

${workbenches} = Is Component Enabled workbenches ${DSC_NAME}
IF ("${UPDATE_CHANNEL}" == "stable" or "${UPDATE_CHANNEL}" == "beta") or "${workbenches}" == "true"
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=notebook-controller timeout=400s
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=odh-notebook-controller timeout=400s
Log To Console "Waiting for 1 pod in ${APPLICATIONS_NAMESPACE}, label_selector=app=notebook-controller"
Wait For Pods Numbers 1
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=notebook-controller
... timeout=400
Log To Console "Waiting for 1 pod in ${APPLICATIONS_NAMESPACE}, label_selector=app=odh-notebook-controller"
Wait For Pods Numbers 1
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=odh-notebook-controller
... timeout=400
END

${modelmeshserving} = Is Component Enabled modelmeshserving ${DSC_NAME}
IF ("${UPDATE_CHANNEL}" == "stable" or "${UPDATE_CHANNEL}" == "beta") or "${modelmeshserving}" == "true"
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=odh-model-controller timeout=400s
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=component=model-mesh-etcd timeout=400s
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app.kubernetes.io/name=modelmesh-controller timeout=400s
Log To Console "Waiting for 3 pods in ${APPLICATIONS_NAMESPACE}, label_selector=app=odh-model-controller"
Wait For Pods Numbers 3
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=odh-model-controller
... timeout=400
Log To Console "Waiting for 1 pod in ${APPLICATIONS_NAMESPACE}, label_selector=component=model-mesh-etcd"
Wait For Pods Numbers 1
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=component=model-mesh-etcd
... timeout=400
Log To Console "Waiting for 3 pods in ${APPLICATIONS_NAMESPACE}, label_selector=app.kubernetes.io/name=modelmesh-controller"

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning

Line is too long (131/120)
Wait For Pods Numbers 3
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app.kubernetes.io/name=modelmesh-controller
... timeout=400
END

${datasciencepipelines} = Is Component Enabled datasciencepipelines ${DSC_NAME}
IF ("${UPDATE_CHANNEL}" == "stable" or "${UPDATE_CHANNEL}" == "beta") or "${datasciencepipelines}" == "true"
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app.kubernetes.io/name=data-science-pipelines-operator timeout=400s
Log To Console "Waiting for 1 pod in ${APPLICATIONS_NAMESPACE}, label_selector=app.kubernetes.io/name=data-science-pipelines-operator"

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning

Line is too long (141/120)
Wait For Pods Numbers 1
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app.kubernetes.io/name=data-science-pipelines-operator
... timeout=400
END

${modelregistry} = Is Component Enabled modelregistry ${DSC_NAME}
IF "${modelregistry}" == "true"
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app.kubernetes.io/part-of=model-registry-operator timeout=400s
Log To Console "Waiting for 1 pod in ${APPLICATIONS_NAMESPACE}, label_selector=app.kubernetes.io/part-of=model-registry-operator"

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning

Line is too long (136/120)
Wait For Pods Numbers 1
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app.kubernetes.io/part-of=model-registry-operator
... timeout=400
END

${kserve} = Is Component Enabled kserve ${DSC_NAME}
IF "${kserve}" == "true"
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=odh-model-controller timeout=400s
Wait For Deployment Replica To Be Ready namespace=${APPLICATIONS_NAMESPACE}
... label_selector=control-plane=kserve-controller-manager timeout=400s
Log To Console "Waiting for 3 pods in ${APPLICATIONS_NAMESPACE}, label_selector=app=odh-model-controller"
Wait For Pods Numbers 3
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=app=odh-model-controller
... timeout=400
Log To Console "Waiting for 1 pods in ${APPLICATIONS_NAMESPACE}, label_selector=control-plane=kserve-controller-manager"

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning

Line is too long (127/120)
Wait For Pods Numbers 1
... namespace=${APPLICATIONS_NAMESPACE}
... label_selector=control-plane=kserve-controller-manager
... timeout=400
END

IF ("${UPDATE_CHANNEL}" == "stable" or "${UPDATE_CHANNEL}" == "beta") or "${dashboard}" == "true" or "${workbenches}" == "true" or "${modelmeshserving}" == "true" or "${datasciencepipelines}" == "true" # robocop: disable
Log To Console Waiting for pod status in ${APPLICATIONS_NAMESPACE}
Log To Console "Waiting for pod status in ${APPLICATIONS_NAMESPACE}"
Wait For Pods Status namespace=${APPLICATIONS_NAMESPACE} timeout=200
Log Verified Applications NS: ${APPLICATIONS_NAMESPACE} console=yes
END

# Monitoring stack only deployed for managed, as modelserving monitoring stack is no longer deployed
IF "${cluster_type}" == "managed"
Log To Console Waiting for pod status in ${MONITORING_NAMESPACE}
Log To Console "Waiting for pod status in ${MONITORING_NAMESPACE}"
Wait For Pods Status namespace=${MONITORING_NAMESPACE} timeout=600
Log Verified Monitoring NS: ${MONITORING_NAMESPACE} console=yes
END
Expand Down
9 changes: 4 additions & 5 deletions ods_ci/tests/Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,11 @@ Extract URLs From Text
RETURN ${urls}

Run And Verify Command
[Documentation] Run and verify shell command
[Arguments] ${command} ${print_to_log}=${TRUE}
${result}= Run Process ${command} shell=yes stderr=STDOUT
IF ${print_to_log} Log ${result.stdout} console=True
[Documentation] Run an oc delete command and log the output and errors
[Arguments] ${command}
${result}= Run Process ${command} shell=yes
Log ${result.stdout}\n${result.stderr} console=True
Should Be True ${result.rc} == 0
RETURN ${result.stdout}

Run And Watch Command
[Documentation] Run any shell command (including args) with optional:
Expand Down
10 changes: 0 additions & 10 deletions ods_ci/tests/Resources/OCP.resource
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@ Wait For Pods To Be Ready
Length Should Be ${replicas} ${exp_replicas}
END

Wait For Deployment Replica To Be Ready
[Documentation] Wait for Deployment of ${label_selector} in ${namespace} to have the Replica-Set Ready
[Arguments] ${namespace} ${label_selector} ${timeout}=600s
Log To Console Waiting for Deployment with label "${label_selector}" in Namespace "${namespace}", to have desired Replica-Set
${output} = Wait Until Keyword Succeeds ${timeout} 3s Run And Verify Command
... oc wait -n ${namespace} --for condition\=ready pod -l "${label_selector}" --timeout\=${timeout}
... print_to_log=${FALSE}
Run And Verify Command
... oc get deployment -l ${label_selector} -n ${namespace} -o json | jq -e '.status | .replicas \=\= .readyReplicas'

Wait For Pods To Succeed
[Arguments] ${label_selector} ${namespace} ${timeout}=300s ${exp_replicas}=${NONE}
Wait Until Keyword Succeeds ${timeout} 3s
Expand Down
Loading