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

USHIFT-3742: test if all the running pods are annotated for workload partitioning #3608

Merged

Conversation

eslutsky
Copy link
Contributor

@eslutsky eslutsky commented Jul 9, 2024

Which issue(s) this PR addresses:

Closes #

@openshift-ci openshift-ci bot requested review from ggiguash and pacevedom July 9, 2024 08:31
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 9, 2024
@eslutsky eslutsky force-pushed the wp-test-control-pods-annontation branch 2 times, most recently from 87ce9e4 to 0ac6042 Compare July 9, 2024 08:45
@eslutsky eslutsky changed the title test if all the running pods are annotated for workload partitioning USHIFT-3742: test if all the running pods are annotated for workload partitioning Jul 9, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 9, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 9, 2024

@eslutsky: This pull request references USHIFT-3742 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.17.0" version, but no target version was set.

In response to this:

Which issue(s) this PR addresses:

Closes #

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@eslutsky eslutsky force-pushed the wp-test-control-pods-annontation branch 3 times, most recently from 2afa28c to 8f0d521 Compare July 9, 2024 12:00
@{pods}= Split String ${pods_raw}
FOR ${pod} IN @{pods}
${ns} ${pod}= Split String ${pod} \@
${csv_dss}= Check Pod Management Annotation ${ns} ${pod}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does not look like the check function returns any values, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no it doesnt return, changed the name.

Comment on lines 38 to 47
Oc Get All Pods
[Documentation] Runs 'oc get pods -A`
... Returns the command output as formatted string <name-space>@<pod-name>

${data}= Run With Kubeconfig
... oc get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"@"}{.metadata.name}{"\\n"}{end}'
RETURN ${data}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we reuse the existing Oc Get JsonPath function from oc.resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could, but the original function Oc Get JsonPath only works with a specified namespace, the idea here is that we want to get all the pods across all namespaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so we would need to refactor it to support -A

Copy link
Contributor

Choose a reason for hiding this comment

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

I think let's refactor rather than creating a copy of the code.

The easiest way should be to check the namespace argument value and if it's empty, pass -A to the command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@eslutsky eslutsky force-pushed the wp-test-control-pods-annontation branch from 8f0d521 to 3a76047 Compare July 10, 2024 08:22
@eslutsky
Copy link
Contributor Author

/retest

1 similar comment
@eslutsky
Copy link
Contributor Author

/retest

Signed-off-by: Evgeny Slutsky <eslutsky@redhat.com>
@eslutsky eslutsky force-pushed the wp-test-control-pods-annontation branch from 3a76047 to ded674c Compare July 11, 2024 10:40
@ggiguash
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 11, 2024
Copy link
Contributor

openshift-ci bot commented Jul 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eslutsky, ggiguash

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

The pull request process is described 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

Copy link
Contributor

openshift-ci bot commented Jul 11, 2024

@eslutsky: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 1292de0 into openshift:main Jul 11, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants