Fix AfterEach in ingress manifest tests to restore override first#4120
Open
Davo911 wants to merge 1 commit into
Open
Fix AfterEach in ingress manifest tests to restore override first#4120Davo911 wants to merge 1 commit into
Davo911 wants to merge 1 commit into
Conversation
The "using manifests" AfterEach asserted on manifest cleanup before restoring the uploadProxyURLOverride, so any manifest delete failure would prevent the override from being restored. Move the override restore before the manifest delete, and guard the delete with a nil check on manifestFile. Fix ingress config test BeforeEach wiping uploadProxyURLOverride The ingress config tests checked the route URL before saving the override, so when the Eventually timed out the AfterEach restored a nil value, permanently wiping the override for all subsequent tests. Reorder to save+clear the override first, matching the route config tests which already do this correctly. Signed-off-by: Thomas-David Griedel griedel911@gmail.com Co-Authored-By: Cursor Agent <cursoragent@cursor.com>
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Member
Author
|
/test pull-containerized-data-importer-non-csi-hpp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Fix a bug in the
cdiconfig_test.goingress config test BeforeEach that permanently wipesuploadProxyURLOverridewhen an override is set externally (e.g. viaUPLOAD_PROXY_URL_OVERRIDEin CI see s390x rehearsal job in kubevirt/project-infra#4832).The CDI ingress config tests and CDI ingress config tests, using manifests check the route-based URL before saving the existing override. When an override like
:6005is set,status.uploadProxyURLreflects that override and doesn't match the route prefix, so theEventuallytimes out. SinceorigUploadProxyOverridewas never saved, theAfterEachrestoresnil— wiping the override for all subsequent tests.This was discovered while debugging upload proxy connection timeouts in the s390x e2e Prow job, where all upload tests failed with
dial tcp <ip>:443: connect: connection timed outbecause the:6005override was silently wiped mid-run.The fix
Validated by running focused cdiconfig + upload tests on both main (override wiped to nil after ingress tests) and this branch (override preserved at :6005).
/cc @awels @dollierp
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: