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

RHOAIENG-14731 - Run ValidatingAdmissionPolicy test downstream #2192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jiripetrlik
Copy link
Contributor

No description provided.

Copy link

openshift-ci bot commented Jan 27, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

openshift-ci bot commented Jan 27, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jiripetrlik

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[Tags] Tier2
... DistributedWorkloads
... WorkloadsOrchestration
Run DistributedWorkloads ODH Test TestValidatingAdmissionPolicy ${RAY_CUDA_IMAGE_3.11} ${NOTEBOOK_IMAGE_3.11}

Check warning

Code scanning / Robocop

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

Line is too long (122/120)
Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
604 0 0 604 100

@@ -308,3 +308,39 @@
Container Image Url Should Contain ${APPLICATIONS_NAMESPACE} ${pod} ${container}
... ${registry_name}/rhoai/${expected_image}
Log To Console ${pod_name}'s container image is verified

Enable appwrapper in Codeflare operator

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Enable appwrapper in Codeflare operator' does not follow case convention
... DistributedWorkloads
... WorkloadsOrchestration
... MYTEST
[Setup] Enable appwrapper in Codeflare operator

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Enable appwrapper in Codeflare operator' does not follow case convention
... WorkloadsOrchestration
... MYTEST
[Setup] Enable appwrapper in Codeflare operator
[Teardown] Disable appwrapper in Codeflare operator

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Disable appwrapper in Codeflare operator' does not follow case convention
... MYTEST
[Setup] Enable appwrapper in Codeflare operator
[Teardown] Disable appwrapper in Codeflare operator
Run DistributedWorkloads ODH Test TestValidatingAdmissionPolicy ${RAY_CUDA_IMAGE_3.11} ${NOTEBOOK_IMAGE_3.11}

Check warning

Code scanning / Robocop

'{{ section_name }}' is in wrong place of Test Case. Recommended order of elements in Test Cases: {{ recommended_order }} Warning test

'KEYWORD' is in wrong place of Test Case. Recommended order of elements in Test Cases: DOCUMENTATION, TAGS, TIMEOUT, SETUP, TEMPLATE, KEYWORD, TEARDOWN
... shell=true
... stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0

Check notice

Code scanning / Robocop

'{{ block_name }}' condition can be simplified Note test

'IF' condition can be simplified
... shell=true
... stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0

Check notice

Code scanning / Robocop

'{{ block_name }}' condition can be simplified Note test

'IF' condition can be simplified
IF ${result.rc} != 0
FAIL Unable to edit codeflare-operator-config configmap
END
${result} = Run Process oc -n ${APPLICATIONS_NAMESPACE} delete pod -l app.kubernetes.io/name\=codeflare-operator

Check warning

Code scanning / Robocop

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

Line is too long (122/120)
IF ${result.rc} != 0
FAIL Unable to edit codeflare-operator-config configmap
END
${result} = Run Process oc -n ${APPLICATIONS_NAMESPACE} delete pod -l app.kubernetes.io/name\=codeflare-operator

Check warning

Code scanning / Robocop

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

Line is too long (122/120)
... shell=true
... stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0

Check notice

Code scanning / Robocop

IF can be replaced with inline IF Note test

IF can be replaced with inline IF
... shell=true
... stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0

Check notice

Code scanning / Robocop

'{{ block_name }}' condition can be simplified Note test

'IF' condition can be simplified
... shell=true
... stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0

Check notice

Code scanning / Robocop

IF can be replaced with inline IF Note test

IF can be replaced with inline IF
... shell=true
... stderr=STDOUT
Log To Console ${result.stdout}
IF ${result.rc} != 0

Check notice

Code scanning / Robocop

'{{ block_name }}' condition can be simplified Note test

'IF' condition can be simplified
IF ${result.rc} != 0
FAIL Unable to reset codeflare-operator pod
END
${result} = Run Process oc -n ${APPLICATIONS_NAMESPACE} wait --for\=condition\=Available deployment/codeflare-operator-manager

Check warning

Code scanning / Robocop

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

Line is too long (136/120)
IF ${result.rc} != 0
FAIL Unable to reset codeflare-operator pod
END
${result} = Run Process oc -n ${APPLICATIONS_NAMESPACE} wait --for\=condition\=Available deployment/codeflare-operator-manager

Check warning

Code scanning / Robocop

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

Line is too long (136/120)
@jiripetrlik jiripetrlik marked this pull request as ready for review February 12, 2025 10:15
@jiripetrlik jiripetrlik requested a review from sutaakar February 12, 2025 10:16
[Tags] Tier2
... DistributedWorkloads
... WorkloadsOrchestration
... MYTEST
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sutaakar
Thank you for noticing it! Tag was removed.


Enable appwrapper in Codeflare operator
[Documentation] Enable appwrapper in Codeflare operator
${result} = Run Process oc -n ${APPLICATIONS_NAMESPACE} get configmap codeflare-operator-config -o yaml | sed 's/enabled: false/enabled: true/' | oc apply -n redhat-ods-applications -f -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this also overrides kueueJobReconciller/waitForPodsReady , is it so?
Would it be possible to use yq to modify just the specific field?

Copy link

@ChristianZaccaria ChristianZaccaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Echoing what @jiripetrlik and I discussed offline:

The VAP resource's default behaviour is to reject RayClusters that don't use a LocalQueue. Hence, the resource can conflict with other tests.

As part of the teardown for that test, I recommend to disable the ValidatingAdmissionPolicyBinding resource named "kueue-validating-admission-policy-binding". This can be done as follows:

apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicyBinding
metadata:
  name: kueue-validating-admission-policy-binding
spec:
  policyName: disabled ##### SET TO DISABLED
  validationActions: [Deny]
  matchResources:
    namespaceSelector: {}

[Tags] Tier2
... DistributedWorkloads
... WorkloadsOrchestration
... MYTEST

Check warning

Code scanning / Robocop

Each next continuation line should be aligned with the previous one Warning test

Each next continuation line should be aligned with the previous one

Enable appwrapper in Codeflare operator
[Documentation] Enable appwrapper in Codeflare operator
${result} = Run Process config_yaml\=\$(oc -n ${APPLICATIONS_NAMESPACE} get configmap codeflare-operator-config -o json | jq -r '.data."config.yaml"' | yq ".appwrapper.enabled\=true" | sed 's/"/\\\\"/g') && oc -n ${APPLICATIONS_NAMESPACE} get configmap codeflare-operator-config -o json | jq ".data.\\"config.yaml\\"\=\\"\$config_yaml\\"" | oc apply -n ${APPLICATIONS_NAMESPACE} -f -

Check warning

Code scanning / Robocop

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

Line is too long (394/120)

Disable appwrapper in Codeflare operator
[Documentation] Enable appwrapper in Codeflare operator
${result} = Run Process config_yaml\=\$(oc -n ${APPLICATIONS_NAMESPACE} get configmap codeflare-operator-config -o json | jq -r '.data."config.yaml"' | yq ".appwrapper.enabled\=false" | sed 's/"/\\\\"/g') && oc -n ${APPLICATIONS_NAMESPACE} get configmap codeflare-operator-config -o json | jq ".data.\\"config.yaml\\"\=\\"\$config_yaml\\"" | oc apply -n ${APPLICATIONS_NAMESPACE} -f -

Check warning

Code scanning / Robocop

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

Line is too long (395/120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants