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

Case-Insensitive Privacy Experience Region Filtering #4058

Merged
merged 6 commits into from
Sep 11, 2023

Conversation

pattisdr
Copy link
Contributor

@pattisdr pattisdr commented Sep 8, 2023

Closes #4056

Description Of Changes

Adjust region filtering on privacy experiences so it is case-insensitive and also allow dashes and underscores.

Code Changes

  • If region filter is supplied to GET /privacy-experience, lowercase it and turn hyphens to underscores before proceeding with querying on region/country matches.

Steps to Confirm

The following should all return France experiences:

curl -X 'GET' \
  'http://localhost:8080/api/v1/privacy-experience?show_disabled=true&region=FR_IDG&systems_applicable=false&page=1&size=50' \
  -H 'accept: application/json'
curl -X 'GET' \
  'http://localhost:8080/api/v1/privacy-experience?show_disabled=true&region=FR-IDG&systems_applicable=false&page=1&size=50' \
  -H 'accept: application/json'
curl -X 'GET' \
  'http://localhost:8080/api/v1/privacy-experience?show_disabled=true&region=FR&systems_applicable=false&page=1&size=50' \
  -H 'accept: application/json'

Pre-Merge Checklist

@pattisdr pattisdr marked this pull request as ready for review September 8, 2023 21:18
@cypress
Copy link

cypress bot commented Sep 8, 2023

Passing run #4050 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge d16a536 into c851530...
Project: fides Commit: b0daa328bd ℹ️
Status: Passed Duration: 01:23 💡
Started: Sep 11, 2023 7:20 PM Ended: Sep 11, 2023 7:21 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@pattisdr pattisdr requested a review from allisonking September 8, 2023 22:08
Copy link
Contributor

@allisonking allisonking left a comment

Choose a reason for hiding this comment

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

looks great!

@pattisdr
Copy link
Contributor Author

Thank you for reviewing 😄

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (c851530) 87.39% compared to head (d16a536) 87.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4058   +/-   ##
=======================================
  Coverage   87.39%   87.39%           
=======================================
  Files         319      319           
  Lines       19595    19595           
  Branches     2512     2512           
=======================================
  Hits        17125    17125           
  Misses       2033     2033           
  Partials      437      437           
Files Changed Coverage Δ
...i/api/v1/endpoints/privacy_experience_endpoints.py 90.78% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pattisdr pattisdr merged commit d2264b4 into main Sep 11, 2023
@pattisdr pattisdr deleted the fides_4056_PROD_1060_case_insensitive_region_filtering branch September 11, 2023 19:58
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.

Case-Insensitive Region Filtering
2 participants