Skip to content

Disable failing when TESTS not found in TEST_SKIPS#22594

Closed
ardaguclu wants to merge 1 commit intoopenshift:masterfrom
ardaguclu:not-fail-skipping-test-empty
Closed

Disable failing when TESTS not found in TEST_SKIPS#22594
ardaguclu wants to merge 1 commit intoopenshift:masterfrom
ardaguclu:not-fail-skipping-test-empty

Conversation

@ardaguclu
Copy link
Member

Previously we are inspired by

echo "${TESTS}" | grep "${TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the TEST_SKIPS regex:'; echo "$TEST_SKIPS"; return $exit_code; } &&

However, when TESTS are not in TEST_SKIPS section, grep still fails and we don't catch it. For example, https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift_release/22490/rehearse-22490-pull-ci-openshift-cluster-baremetal-operator-release-4.10-e2e-metal-ipi-serial-compact/1446421249919029248/artifacts/e2e-metal-ipi-serial-compact/baremetalds-e2e-test/build-log.txt

openshift-e2e-test-commands.sh has the same problem, but it works due to TEST_SKIPS section is empty.

This PR catches grep not found failure and gracefully returns.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 8, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ardaguclu

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 8, 2021
@ardaguclu
Copy link
Member Author

/assign @andfasano

As it is suspected, it still fails, we need to catch error and gracefully return to allow process continues.

Could you PTAL?, thanks.

@ardaguclu
Copy link
Member Author

/title Disable failing when TESTS not found in TEST_SKIPS

@ardaguclu ardaguclu changed the title Disable failing when TEST_SKIPS empty Disable failing when TESTS not found in TEST_SKIPS Oct 8, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 8, 2021

@ardaguclu: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/openshift/router/release-4.9/e2e-metal-ipi-ovn-router c97d39f link unknown /test pj-rehearse
ci/rehearse/openshift/cluster-baremetal-operator/release-4.10/e2e-metal-ipi-ovn-ipv6 c97d39f link unknown /test pj-rehearse
ci/rehearse/periodic-ci-openshift-release-master-nightly-4.9-e2e-metal-ipi-virtualmedia c97d39f link unknown /test pj-rehearse
ci/prow/pj-rehearse c97d39f link false /test pj-rehearse

Full PR test history. Your PR dashboard.

Details

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/test-infra repository. I understand the commands that are listed here.

echo "${TESTS}" | grep -v "${TEST_SKIPS}" >/tmp/tests &&
echo "Skipping tests:" &&
echo "${TESTS}" | grep "${TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the TEST_SKIPS regex:'; echo "$TEST_SKIPS"; return $exit_code; } &&
echo "${TESTS}" | grep "${TEST_SKIPS}" || { echo 'Error: no tests were found matching the TEST_SKIPS regex:'; echo "$TEST_SKIPS"; } &&
Copy link
Member

Choose a reason for hiding this comment

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

I think all of the &&s are unnecessary now, since this line always succeeds. It'd be significantly easier to read without them.
Also it's a bit weird to print 'Error' for something that isn't actually an error.

Copy link
Member Author

Choose a reason for hiding this comment

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

I totally agree all of your comments @zaneb. Our intention was to be similar with other workflows in here

echo "${TESTS}" | grep "${TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the TEST_SKIPS regex:'; echo "$TEST_SKIPS"; return $exit_code; } &&

But I think, we can remove && and change the message from Error to something Info.

What do you think @andfasano ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, but given that our long-term goal is to adopt directly the openshift-e2e-test step (and abandon baremetalds-e2-test one - also PR #19987 goes in that direction), any discrepancy - not baremetal specific - introduced now will make more painful to merge our changes into the openshift-e2e-test when we'll be ready to do it.
So in this PR I'll stick as much as possible closer to the openshift-e2e-test step for whatever is not baremetal specific - and eventually address later any improvement directly in that step once we'll get it.

@ardaguclu
Copy link
Member Author

As stated in here #22755 (comment). Workflows can use their own TEST_SKIPS section by overriding the default one.

Thus, I'm also closing this PR.

/close

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 19, 2021

@ardaguclu: Closed this PR.

Details

In response to this:

As stated in here #22755 (comment). Workflows can use their own TEST_SKIPS section by overriding the default one.

Thus, I'm also closing this PR.

/close

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/test-infra repository.

@openshift-ci openshift-ci bot closed this Oct 19, 2021
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants