Skip to content

fix(e2e-next): normalize pod-level status.Resources in pod sync status assertions#4012

Open
sowmyav27 wants to merge 1 commit into
v0.34from
fix-podres34
Open

fix(e2e-next): normalize pod-level status.Resources in pod sync status assertions#4012
sowmyav27 wants to merge 1 commit into
v0.34from
fix-podres34

Conversation

@sowmyav27

Copy link
Copy Markdown
Contributor

What issue type does this pull request address?
/kind test

What does this pull request do? Which issues does it resolve?

The pod status-sync assertions in e2e-next/test_core/sync/test_pods.go (should start a pod and sync status back to vCluster and should sync readiness conditions back to the vCluster pod) fail on v0.34 while passing on main/v0.35.

Root cause: the virtual apiserver on v0.34 runs k8s 1.35, where InPlacePodLevelResourcesVerticalScaling is alpha and off by default, so the apiserver drops pod-level status.Resources. The host pod (KIND) reports a non-nil empty ResourceRequirements{}, while the virtual pod reports nil, so Expect(vpod.Status).To(Equal(pod.Status)) fails on that one field. main/v0.35 run k8s 1.36 (gate beta/on), where the field is preserved, so they pass.

Fix: normalize status.Resources before the equality check at both assertion sites, mirroring the existing QOSClass handling.

Please provide a short message that should be published in the vcluster release notes

NONE (e2e test-only fix, no user-facing change)

What else do we need to know?

v0.34-only. main/v0.35 already pass because they run k8s 1.36.

E2E Tests

Additional test suites

none

@sowmyav27 sowmyav27 requested a review from a team as a code owner June 14, 2026 21:00
…s assertions

The k8s 1.35 tenant apiserver drops pod-level status.Resources/AllocatedResources
(InPlacePodLevelResourcesVerticalScaling is alpha and off by default), so they
cannot round-trip from a newer host: the host reports populated values while the
tenant reports nil. This made the pod status-sync assertions fail on v0.34 (tenant
k8s 1.35) while passing on main/v0.35 (tenant k8s 1.36, gate on).

Exclude these two fields from the comparison, like the existing QOSClass handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant