-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue in extraCommandArgs field #1541
base: master
Are you sure you want to change the base?
Conversation
c2b7eb0
to
e8ed105
Compare
// If this flag already exists in cmd, skip it | ||
if _, exists := existingArgs[arg]; exists { | ||
if i+1 < len(extraArgs) && !strings.HasPrefix(extraArgs[i+1], "--") { | ||
i++ // Skip the associated value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if an existing flag is added with a new value, will that also be skipped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it is skipped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that the expected behavior? what if the user wants to change the current flag value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the existing unit test https://github.com/argoproj-labs/argocd-operator/blob/master/controllers/argocd/deployment_test.go#L1304 which is updating existing cmd i.e --redis command, I think this is expected behaviour, I might be wrong and open for suggestions
}, | ||
deployment)) | ||
|
||
// Non-duplicate argument "--newarg" should be added, duplicate "--redis" is ignored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably a typo of --redis, I don't see that in the test case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, its a typo
Signed-off-by: Rizwana777 <[email protected]>
e8ed105
to
06d0795
Compare
JIRA - https://issues.redhat.com/browse/GITOPS-5200