Skip to content

Conversation

Segflow
Copy link
Contributor

@Segflow Segflow commented Oct 4, 2021

Fixes #7360

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

@Segflow Segflow changed the title fix parameter name when the value is a list (#7360) fix: fix parameter name when the value is a list (#7360) Oct 4, 2021
Signed-off-by: Assel Meher <asselmeher@gmail.com>
Signed-off-by: Assel Meher <asselmeher@gmail.com>
@codecov
Copy link

codecov bot commented Oct 7, 2021

Codecov Report

Merging #7362 (868d9f3) into master (4290304) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7362      +/-   ##
==========================================
+ Coverage   41.12%   41.25%   +0.13%     
==========================================
  Files         158      161       +3     
  Lines       21365    21509     +144     
==========================================
+ Hits         8786     8874      +88     
- Misses      11313    11378      +65     
+ Partials     1266     1257       -9     
Impacted Files Coverage Δ
util/helm/helm.go 60.81% <100.00%> (+0.53%) ⬆️
util/cache/cache.go 53.93% <0.00%> (-3.03%) ⬇️
util/session/state.go 69.09% <0.00%> (-0.73%) ⬇️
server/application/application.go 32.32% <0.00%> (-0.45%) ⬇️
pkg/apis/application/v1alpha1/types.go 57.51% <0.00%> (-0.36%) ⬇️
util/git/client.go 44.56% <0.00%> (-0.32%) ⬇️
util/git/creds.go 10.00% <0.00%> (-0.30%) ⬇️
cmd/argocd/commands/cluster.go 5.68% <0.00%> (-0.23%) ⬇️
server/server.go 54.65% <0.00%> (-0.20%) ⬇️
util/settings/settings.go 47.02% <0.00%> (-0.14%) ⬇️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4290304...868d9f3. Read the comment docs.

Copy link
Contributor

@mayzhang2000 mayzhang2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -192,7 +192,7 @@ func Test_flatVals(t *testing.T) {
t.Run("Array", func(t *testing.T) {
output := map[string]string{}

flatVals(map[string]interface{}{"foo": []interface{}{"bar"}}, output)
flatVals(map[string]interface{}{"foo": []interface{}{"bar", "baz"}}, output)

assert.Equal(t, map[string]string{"foo[0]": "bar"}, output)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the expected output be map[string]string{"foo[0]": "bar", "foo[1]": "baz"}?

@@ -171,8 +171,9 @@ func flatVals(input interface{}, output map[string]string, prefixes ...string) {
flatVals(v, output, append(prefixes, k)...)
}
case []interface{}:
p := append([]string(nil), prefixes...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mayzhang2000 mayzhang2000 merged commit c80c1d4 into argoproj:master Oct 12, 2021
@Segflow Segflow deleted the fix-7360 branch October 15, 2021 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong parameter name when the value is a slice
2 participants