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

Automated cherry pick of #4016: Fix unit test flaky for IPsec controller #4060: Fix race condition in unit test for IPsec #4241: Fix flaky TestController_RotateCertificates unit test #4483

Conversation

xliuxu
Copy link
Contributor

@xliuxu xliuxu commented Dec 14, 2022

Cherry pick of #4016 #4060 #4241 on release-1.7.

#4016: Fix unit test flaky for IPsec controller
#4060: Fix race condition in unit test for IPsec
#4241: Fix flaky TestController_RotateCertificates unit test

For details on the cherry pick process, see the cherry pick requests page.

xliuxu and others added 3 commits December 14, 2022 18:23
Wait one second as the fake clientset doesn't support watching with specific resourceVersion.
Otherwise the update event would be missed by the watcher used in csrutil.WaitForCertificate()
if it happens to be generated in-between the List and Watch calls.

Fixes: antrea-io#3851

Signed-off-by: Xu Liu <[email protected]>
Wait for the signer goroutine to finish before quitting the tests.
This ensures that the *testing.T is always valid in the signer.

Fixes: antrea-io#4059

Signed-off-by: Xu Liu <[email protected]>
The difference in CSR CreationTimestamp can be lower than 7s because the
resolution of the certificate's NotAfter field is at the second level,
which means the provided expiration time will be truncated.

Fixes antrea-io#4224

Signed-off-by: Antonin Bas <[email protected]>
@xliuxu xliuxu added the kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release label Dec 14, 2022
@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Merging #4483 (c113f45) into release-1.7 (285cc46) will increase coverage by 0.13%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-1.7    #4483      +/-   ##
===============================================
+ Coverage        62.99%   63.13%   +0.13%     
===============================================
  Files              293      293              
  Lines            43460    43460              
===============================================
+ Hits             27379    27437      +58     
+ Misses           13877    13833      -44     
+ Partials          2204     2190      -14     
Flag Coverage Δ
kind-e2e-tests 48.95% <ø> (+0.11%) ⬆️
unit-tests 44.88% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...g/agent/apiserver/handlers/featuregates/handler.go 4.54% <0.00%> (-77.28%) ⬇️
pkg/agent/controller/networkpolicy/packetin.go 16.90% <0.00%> (-52.82%) ⬇️
...kg/apiserver/registry/system/supportbundle/rest.go 22.17% <0.00%> (-50.44%) ⬇️
pkg/support/dump.go 7.90% <0.00%> (-49.16%) ⬇️
pkg/support/dump_others.go 0.00% <0.00%> (-44.74%) ⬇️
...g/agent/apiserver/handlers/addressgroup/handler.go 5.00% <0.00%> (-35.00%) ⬇️
...agent/apiserver/handlers/appliedtogroup/handler.go 5.00% <0.00%> (-35.00%) ⬇️
pkg/ovs/ovsctl/ofctl.go 26.71% <0.00%> (-16.44%) ⬇️
...nt/apiserver/handlers/serviceexternalip/handler.go 37.03% <0.00%> (-14.82%) ⬇️
pkg/ovs/ovsctl/appctl.go 28.68% <0.00%> (-13.18%) ⬇️
... and 31 more

@tnqn
Copy link
Member

tnqn commented Dec 14, 2022

/skip-all

@tnqn tnqn merged commit 0c689c1 into antrea-io:release-1.7 Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants