chore: bump up common k8s deps#2746
Merged
simar7 merged 10 commits intoaquasecurity:mainfrom Sep 18, 2025
Merged
Conversation
simar7
reviewed
Sep 16, 2025
Comment on lines
+110
to
+115
| specHash := kube.ComputeHash(corev1.PodSpec{ | ||
| Containers: []corev1.Container{{ | ||
| Name: "nginx", | ||
| Image: "nginx:1.16", | ||
| }}, | ||
| }) |
Member
There was a problem hiding this comment.
While this makes the tests resilient like you mentioned, it also allows the tests to silently pass, even if there's an actual problem because the hash will never be statically defined and always get computed on the fly.
I think it's better to have the hash statically defined, similar to a static golden file. If the tests break and we have to update them often, we should re-think what we are asserting as unit tests for the most part should offer resilience across code changes.
WDYT?
…mp-some-deps # Conflicts: # go.mod # go.sum
simar7
approved these changes
Sep 18, 2025
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.
Description
In controller-runtime version v0.22+, several breaking changes were introduced that affected our test setup:
As a result, some of our existing test data became incompatible.
This PR addresses these issues by:
Additionally, due to the breaking changes, the hash of the test resources has also been affected. To make the tests more resilient, the hash value is no longer hardcoded as a constant but is now computed dynamically.
It fixes fails in #2749
Checklist