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

add: urlencode selector - space as plus or 20 #6621

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

veshus
Copy link

@veshus veshus commented Nov 24, 2023

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

Add ability to change quoter for url encode query parameters from default "space as plus" to "space as %20".
Feature is controlled by env REDASH_URLENCODE_SPACE_AS_PLUS = true|false

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

I have an API that treats space as %20, so default behaviour doesn't work. After REDASH_URLENCODE_SPACE_AS_PLUS set to "false", all parameters passes ok.

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Merging #6621 (e60d3e2) into master (f7b47c0) will decrease coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 50.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6621      +/-   ##
==========================================
- Coverage   62.39%   62.38%   -0.01%     
==========================================
  Files         161      161              
  Lines       13179    13184       +5     
  Branches     1796     1797       +1     
==========================================
+ Hits         8223     8225       +2     
- Misses       4672     4675       +3     
  Partials      284      284              
Files Coverage Δ
redash/settings/__init__.py 98.66% <100.00%> (+<0.01%) ⬆️
redash/utils/requests_session.py 46.66% <40.00%> (-7.88%) ⬇️

@masayuki038
Copy link
Collaborator

Hi @veshus, thanks for the PR.

It seems that the part you added is not covered by unit tests. Could you please provide some testing to ensure that this change does not affect existing behavior? It is very helpful for us. thank you.

@masayuki038
Copy link
Collaborator

@veshus I found #6610.
Could you reply to it before adding some tests? I also would like to know the background of this update.

Copy link
Collaborator

@guidopetri guidopetri left a comment

Choose a reason for hiding this comment

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

I'd also like some clarity on #6610 before merging

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.

None yet

3 participants