Skip to content

Conversation

@qJkee
Copy link
Contributor

@qJkee qJkee commented Oct 18, 2022

Do not run storage related tests if storage capability disabled.

@openshift-ci openshift-ci bot requested review from jwforres and mfojtik October 18, 2022 17:19
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 18, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: qJkee
Once this PR has been reviewed and has the lgtm label, please assign bparees for approval by writing /assign @bparees in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@qJkee
Copy link
Contributor Author

qJkee commented Oct 18, 2022

/cc @wking

@openshift-ci openshift-ci bot requested a review from wking October 18, 2022 17:21
@qJkee
Copy link
Contributor Author

qJkee commented Oct 18, 2022

/retest

}

if !storageEnabled {
fmt.Fprintln(opt.Out, "Skipping [sig-storage] tests because Storage capability disabled")
Copy link
Contributor

Choose a reason for hiding this comment

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

100% of sig-storage tests can't be run when this cap is disabled? including things like emptydir storage?

Copy link
Member

Choose a reason for hiding this comment

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

nit, can we move this line down to an else block of the newly-conditional tests = append(tests, storageTestsCopy...)?

if storageEnabled {
  // I thought about randomizing the order of the kube, storage, and openshift tests, but storage dominates our e2e runs, so it doesn't help much.
  storageTestsCopy := copyTests(storageTests)
  q.Execute(testCtx, storageTestsCopy, max(1, parallelism/2), status.Run) // storage tests only run at half the parallelism, so we can avoid cloud provider quota problems.
  tests = append(tests, storageTestsCopy...)
} else {
  fmt.Fprintln(opt.Out, "Skipping [sig-storage] tests because Storage capability disabled")
}

Keeping that collected together reduces the chances that someone touches one of the branches without noticing that they may also need to adjust the other.


// no need to count storage tests if storage disabled
if !storageEnabled {
storageTests = nil
Copy link
Member

Choose a reason for hiding this comment

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

Ah, clearing this here keeps expectedTestCount from being inflated with subsequently-not-added storage tests. Maybe this is where we should log the Skipping ....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added 9e66b24

q.Execute(testCtx, storageTestsCopy, max(1, parallelism/2), status.Run) // storage tests only run at half the parallelism, so we can avoid cloud provider quota problems.
tests = append(tests, storageTestsCopy...)
// run storage tests only if storage capability enabled
if storageEnabled {
Copy link
Member

Choose a reason for hiding this comment

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

With this nil-ing above, I don't understand why we need a conditional here. Can we leave this block of code unchanged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right
Fixed at 9e66b24

Do not run storage related tests if storage capability disabled.
@qJkee qJkee force-pushed the OCPPLAN-9509-check-caps branch from d1eb466 to 9e66b24 Compare October 19, 2022 21:35
@qJkee
Copy link
Contributor Author

qJkee commented Oct 20, 2022

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 20, 2022

@qJkee: 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/prow/e2e-openstack-ovn 9e66b24 link false /test e2e-openstack-ovn
ci/prow/e2e-aws-ovn-single-node-upgrade 9e66b24 link false /test e2e-aws-ovn-single-node-upgrade

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.

@qJkee
Copy link
Contributor Author

qJkee commented Oct 21, 2022

closing because of #27481

@qJkee qJkee closed this Oct 21, 2022
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