Repository navigation
Conversation
vrutkovs
reviewed
Oct 16, 2026
vrutkovs
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, a suggestion for changelog
Co-authored-by: Vadim Rutkovsky <vadim@vrutkovs.eu> Signed-off-by: Stephan Burns <34520077+Sleuth56@users.noreply.github.com>
Sleuth56
marked this pull request as ready for review
October 16, 2026 12:31
Contributor
There was a problem hiding this comment.
1 issue found across 12 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="api/operator/v1beta1/vmagent_types.go">
<violation number="1" location="api/operator/v1beta1/vmagent_types.go:401">
P3: Validation reports a random selector when both AWS selectors are incomplete because Go map iteration is nondeterministic. Validate `accessKeySecret` and `secretKeySecret` in a fixed order.</violation>
</file>
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.
Turn on auto-fix | Re-trigger cubic
Comment on lines
+401
to
+405
| for name, sel := range map[string]*corev1.SecretKeySelector{"accessKeySecret": a.AccessKeySecret, "secretKeySecret": a.SecretKeySecret} { | ||
| if sel.Name == "" || sel.Key == "" { | ||
| return fmt.Errorf("%s must have both name and key set", name) | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
P3: Validation reports a random selector when both AWS selectors are incomplete because Go map iteration is nondeterministic. Validate accessKeySecret and secretKeySecret in a fixed order.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At api/operator/v1beta1/vmagent_types.go, line 401:
<comment>Validation reports a random selector when both AWS selectors are incomplete because Go map iteration is nondeterministic. Validate `accessKeySecret` and `secretKeySecret` in a fixed order.</comment>
<file context>
@@ -372,6 +382,28 @@ type AWS struct {
+ if !a.UseSigv4 {
+ return fmt.Errorf("accessKeySecret and secretKeySecret require useSigv4=true")
+ }
+ for name, sel := range map[string]*corev1.SecretKeySelector{"accessKeySecret": a.AccessKeySecret, "secretKeySecret": a.SecretKeySecret} {
+ if sel.Name == "" || sel.Key == "" {
+ return fmt.Errorf("%s must have both name and key set", name)
</file context>
Suggested change
| for name, sel := range map[string]*corev1.SecretKeySelector{"accessKeySecret": a.AccessKeySecret, "secretKeySecret": a.SecretKeySecret} { | |
| if sel.Name == "" || sel.Key == "" { | |
| return fmt.Errorf("%s must have both name and key set", name) | |
| } | |
| } | |
| if a.AccessKeySecret.Name == "" || a.AccessKeySecret.Key == "" { | |
| return fmt.Errorf("accessKeySecret must have both name and key set") | |
| } | |
| if a.SecretKeySecret.Name == "" || a.SecretKeySecret.Key == "" { | |
| return fmt.Errorf("secretKeySecret must have both name and key set") | |
| } |
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Signed-off-by: Stephan Burns <34520077+Sleuth56@users.noreply.github.com>
This branch has not been deployed
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.
Adds AWS access and secret key refs.