Skip to content

Conversation

pohly
Copy link
Contributor

@pohly pohly commented Aug 28, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Promoting real tests (#133132) turned out to be harder than expected (should be rewritten to be self-contained, additional reviews, etc.).

They would not achieve 100% endpoint+operation coverage because real tests only use some of the operations. Therefore each API type has to be covered with CRUD-style tests which only exercise the apiserver, then maybe additional functional tests can be added later (depending on time and motivation).

Which issue(s) this PR is related to:

#114183
#133691
KEP: kubernetes/enhancements#4381

Special notes for your reviewer:

The machinery for testing different API types is meant to be reusable, so it gets added in the new e2e/framework/conformance helper package.

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 28, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Aug 28, 2025
@pohly pohly marked this pull request as draft August 28, 2025 09:15
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Aug 28, 2025
@k8s-ci-robot k8s-ci-robot added the wg/device-management Categorizes an issue or PR as relevant to WG Device Management. label Aug 28, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Aug 28, 2025
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2025
@pohly
Copy link
Contributor Author

pohly commented Aug 28, 2025

/test pull-kubernetes-audit-kind-conformance

DeleteCollection not implemented yet, checking whether the job finds that...

@pohly pohly force-pushed the dra-e2e-crud-conformance branch from f28bd30 to eb603fc Compare August 28, 2025 13:27
@pohly
Copy link
Contributor Author

pohly commented Aug 28, 2025

/test pull-kubernetes-audit-kind-conformance

Now with DeleteCollection, non-namespace list and API get.

@pohly
Copy link
Contributor Author

pohly commented Aug 28, 2025

/test pull-kubernetes-e2e-kind

@michaelasp
Copy link
Contributor

/retest
The fix was merged after the trigger

@pohly pohly force-pushed the dra-e2e-crud-conformance branch 2 times, most recently from 2500c4d to 8093062 Compare October 2, 2025 14:00
pohly added 2 commits October 2, 2025 16:07
It's a nested map which looks a lot nicer as YAML, in particular
when it represents a Kubernetes object.

Unit+integration tests using ktesting+gomega and E2E tests benefit from this
change.
That was the original intent, but the implementation then ended up checking
ResourceClaims in all namespaces. Depending on timing this was merely
misleading (showing ResourceClaim changes from a different test running in
parallel), but with upcoming CRUD tests which intentionally set an allocation
result without a finalizer it breaks the non-CRUD tests when they check the
those CRUD ResourceClaims.
@pohly pohly force-pushed the dra-e2e-crud-conformance branch from 8093062 to d9df6f8 Compare October 2, 2025 14:07
@pohly
Copy link
Contributor Author

pohly commented Oct 2, 2025

I had to rebase to get access to apimachineryutils.HaveValidResourceVersion. https://github.com/kubernetes/kubernetes/compare/839045e442ff485ce395d4fb90901d83e8794fc6..2500c4d0c2811b6be8ac9a2ea5f2f43e5b1e33b2 is that rebase with no content changes.

The actual changes are in https://github.com/kubernetes/kubernetes/compare/2500c4d0c2811b6be8ac9a2ea5f2f43e5b1e33b2..8093062d4cc36bd8dc3be4c6e44ef13a2b667ec3:

  • checking ResourceVersion
  • simplifying the event sequence check
  • unstructured.Unstructured rendering as YAML in Gomega output

Small cleanups in https://github.com/kubernetes/kubernetes/compare/8093062d4cc36bd8dc3be4c6e44ef13a2b667ec3..d9df6f82a77e659855720ea6f4be01967e2874f3