Skip to content
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

Encode arrays correctly in query params. #1754

Closed
wants to merge 5 commits into from

Conversation

noelzubin
Copy link
Contributor

@noelzubin noelzubin commented Dec 3, 2020

Closes #1713

@codecov-io
Copy link

codecov-io commented Dec 3, 2020

Codecov Report

Merging #1754 (d0508a1) into master (cfedc92) will decrease coverage by 0.05%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1754      +/-   ##
==========================================
- Coverage   71.51%   71.45%   -0.06%     
==========================================
  Files         178      178              
  Lines       13775    13780       +5     
==========================================
- Hits         9851     9847       -4     
- Misses       3312     3321       +9     
  Partials      612      612              
Flag Coverage Δ
ubuntu 71.42% <50.00%> (-0.05%) ⬇️
windows 70.00% <50.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
js/modules/k6/http/request.go 79.29% <50.00%> (-0.71%) ⬇️
core/engine.go 90.95% <0.00%> (-2.02%) ⬇️
stats/cloud/collector.go 79.81% <0.00%> (-0.64%) ⬇️

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 cfedc92...d0508a1. Read the comment docs.

Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

Thanks for making this PR. I guess picking to reuse the same key for all slice values (instead of key[] or key.<N> or any other convention) is better than the current behavior (#1713, #878)...

Can you please add some tests in your PR? And also you probably don't need reflection, you should be able to get by with a simple type assertion that v is []interface{}?

@noelzubin
Copy link
Contributor Author

@na-- I dont think go allows type assertion on []interface{}, Although it allows type assertions on []string though.

@na--
Copy link
Member

na-- commented Dec 7, 2020

Ah, yeah, fair enough... 🤦‍♂️ Though the rest of my request still stands - please add some tests, and also you probably don't need to check for reflect.Array in the switch, which should take care of the lint error as well.

Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

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

@noelzubin Thanks for the PR. Are you available to finish it? We'd like to have this merged for v0.33.0. I think it would just need a test and maybe disabling the exhaustive linter if we can't avoid the reflection.

If we don't hear from you by sometime next week or if you're not available, that's OK too, and we can proceed to do the leftover changes.

@imiric
Copy link
Contributor

imiric commented Jun 15, 2021

Fixed in #2060.

Thanks for your contribution @noelzubin! We'll make sure to thank you in the release notes :)

@imiric imiric closed this Jun 15, 2021
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.

samples html_form_post.js fails
4 participants