When objects are deleted externally (e.g., pods deleted directly after
job deletion), the garbage collector should not log errors. This change
adds explicit NotFound error handling in attemptToDeleteItem to enqueue
virtual delete events when deleteObject returns NotFound, treating
external deletion as a successful outcome.
This follows the same pattern already used when getObject returns
NotFound, ensuring consistency across the function.
Signed-off-by: Alessio Attilio <attilio.alessio@protonmail.com>
fix: Update TestAuditLogMaxSizeZero to expect os.File when MaxSize is 0
fix: Update TestAuditValidOptions to handle MaxSize=0 case
Simplify testExtendedResource structure and add proper field validation:
- Rename tests to distinguish explicit vs implicit modes clearly
- Remove unnecessary nested sub-test to flatten test hierarchy
- Validate ExtendedResourceName is correctly stored or stripped
based on feature gate state to ensure proper API behavior
- Remove outdated comment that no longer applies
Co-Authored-By: Patrick Ohly <patrick.ohly@intel.com>
Simplified testExtendedResource by using the helper functions added
in the previous commit:
- Removed unused global test data (podWithExtendedResource,
classWithExtendedResource, etc.)
- Used createTestClassWithSpec to create DeviceClass with extended resources
- Used createPodWithExtendedResource to create test pods
- Removed manual class and pod creation boilerplate
Add helper functions to use for testing DRA extended resources:
- Add createTestClassWithSpec to support custom DeviceClassSpec
- Add createPodWithExtendedResource to create pods requesting extended resources
Downloading repository metadata and installing these packages can take too
long, causing timeouts in e2e-gce and similar jobs because the 300s timeout for
"Kubernetes is up and running" gets exceeded.
It's unclear whether all of these packages are still needed. They apparently
were in 2020 (acd286d), but maybe not anymore?
The google/btree package is deprecated, so switch to the maintained
fork in k8s.io/utils/third_party/forked/golang/btree.
API differences:
- NewG -> New
- BTreeG[T] -> BTree[T]
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Run hack/update-openapi-spec.sh to regenerate the static OpenAPI
specification files after adding +optional markers to
PodDisruptionBudgetStatus fields.
Run hack/update-codegen.sh to regenerate OpenAPI specifications after
adding +optional markers to PodDisruptionBudgetStatus fields in both
policy/v1 and policy/v1beta1.
Add missing +optional markers to PodDisruptionBudgetStatus fields in
policy/v1 and policy/v1beta1 and enable the optionalorrequired linter
for the policy API group.