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

Fix envtest tearing down #316

Merged
merged 1 commit into from May 17, 2023
Merged

Conversation

gkurz
Copy link
Member

@gkurz gkurz commented May 17, 2023

PR #307 was too optimistic. The original issue worked around by 053f866 still exists actually ; make test is now failing with :

  [FAILED] Unexpected error:
      <errors.aggregate | len:1, cap:1>: [
          <*errors.errorString | 0xc0005ebf80>{
              s: "timeout waiting for process kube-apiserver to stop",
          },
      ]
      timeout waiting for process kube-apiserver to stop occurred

This is caused by a missing cancellation of the certwatcher in the controller-runtime. The fix, as documented in [1], is to create a cancellable context, pass it to envtest and cancel it just before tearing down the test.

[1] kubernetes-sigs/kubebuilder#2379

Fixes https://issues.redhat.com/browse/KATA-2168

PR openshift#307 was too optimistic. The original issue worked around
by 053f866 still exists actually ; `make test` is now
failing with :

  [FAILED] Unexpected error:
      <errors.aggregate | len:1, cap:1>: [
          <*errors.errorString | 0xc0005ebf80>{
              s: "timeout waiting for process kube-apiserver to stop",
          },
      ]
      timeout waiting for process kube-apiserver to stop
  occurred

This is caused by a missing cancellation of the certwatcher in the
controller-runtime. The fix, as documented in [1], is to create
a cancellable context, pass it to envtest and cancel it just before
tearing down the test.

[1] kubernetes-sigs/kubebuilder#2379

Signed-off-by: Greg Kurz <groug@kaod.org>
@openshift-ci openshift-ci bot requested review from littlejawa and pmores May 17, 2023 11:10
@gkurz gkurz requested a review from bpradipt May 17, 2023 11:10
@pmores
Copy link
Contributor

pmores commented May 17, 2023

Is there an explanation why #307 appeared to work?

@gkurz
Copy link
Member Author

gkurz commented May 17, 2023

Is there an explanation why #307 appeared to work?

I tried to reproduce but I couldn't find my way in the multiple cross PRs that were merged after #307 obviously and I couldn't get it to work again. 😞 , but FWIW this new fix is officially documented this time.

Copy link
Contributor

@bpradipt bpradipt left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 17, 2023
Copy link
Contributor

@pmores pmores left a comment

Choose a reason for hiding this comment

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

thanks @gkurz !

@gkurz gkurz merged commit 37ab2c9 into openshift:peer-pods-tech-preview May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants