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

chore(tests): switch to EndpointSlices for webhook tests #3998

Merged
merged 1 commit into from
May 12, 2023

Conversation

programmer04
Copy link
Member

@programmer04 programmer04 commented May 12, 2023

What this PR does / why we need it:

This PR fixes integration tests flakiness introduced by PR #3980.

Sometimes integration test TestHTTPRouteValidationWebhook

This change should make this test passes constantly.

Which issue this PR fixes:

Furthermore it's part of the issue #3916 - getting rid of CoreV1 Endpoints

Special notes for your reviewer:

It fixes the problem because now tests rely on DiscoveryV1 EndpointSlices instead of old CoreV1 Endpoints. It used to work sometimes because the cluster's control plane mirrors most Endpoints resources to corresponding EndpointSlices as described in docs. When the test failed it means that race condition occurred - the test expected to have EndpointSlices available before they had been created. It explains that only sometimes the test fails.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.8 ⚠️

Comparison is base (86a3c0f) 74.2% compared to head (7f67da3) 73.5%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3998     +/-   ##
=======================================
- Coverage   74.2%   73.5%   -0.8%     
=======================================
  Files        142     142             
  Lines      15996   15996             
=======================================
- Hits       11885   11773    -112     
- Misses      3361    3454     +93     
- Partials     750     769     +19     

see 15 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@programmer04 programmer04 removed the work in progress Work In Progress label May 12, 2023
@programmer04 programmer04 marked this pull request as ready for review May 12, 2023 13:10
@programmer04 programmer04 requested a review from a team as a code owner May 12, 2023 13:10
@programmer04 programmer04 enabled auto-merge (squash) May 12, 2023 13:10
@programmer04 programmer04 requested a review from pmalek May 12, 2023 13:10
test/integration/webhook_test.go Show resolved Hide resolved
@pmalek pmalek added this to the KIC v2.10.0 milestone May 12, 2023
@programmer04 programmer04 merged commit e8ac086 into main May 12, 2023
@programmer04 programmer04 deleted the fix-flakiness branch May 12, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants