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

Returning GVL.JSON through Experiences API #4143

Merged
merged 7 commits into from
Sep 26, 2023
Merged

Returning GVL.JSON through Experiences API #4143

merged 7 commits into from
Sep 26, 2023

Conversation

pattisdr
Copy link
Contributor

@pattisdr pattisdr commented Sep 22, 2023

Closes https://github.com/ethyca/fidesplus/issues/1109

Description Of Changes

Returning gvl.json under GET /privacy-experience for TCF experiences with an include_gvl=True query param

Have copied file into src/fides/data - assume FE is going to remove the file of the same name on that end.

Code Changes

  • Adds a function that loads the GVL into memory when it is first called, and accesses that location every time thereafter
  • Adds an include_gvl query param to GET Privacy Experience

Steps to Confirm

  • Get CA Experiences with include_gvl=True, assert gvl not returned
  • GET FR experience with TCF enabled, but no applicable systems, assert gvl not returned
  • Assert GVL is only returned when TCF contents are returned

Pre-Merge Checklist

- Have copied file into src/fides/data - assume FE is going to remove the file of the same name on that end.
@cypress
Copy link

cypress bot commented Sep 22, 2023

Passing run #4339 ↗︎

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 c6578e1 into 57493f6...
Project: fides Commit: 1c699529b0 ℹ️
Status: Passed Duration: 01:13 💡
Started: Sep 26, 2023 2:30 PM Ended: Sep 26, 2023 2:31 PM

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

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (57493f6) 64.94% compared to head (c6578e1) 87.50%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4143       +/-   ##
===========================================
+ Coverage   64.94%   87.50%   +22.56%     
===========================================
  Files         326      326               
  Lines       20324    20342       +18     
  Branches     2640     2643        +3     
===========================================
+ Hits        13199    17800     +4601     
+ Misses       6657     2082     -4575     
+ Partials      468      460        -8     
Files Coverage Δ
...i/api/v1/endpoints/privacy_experience_endpoints.py 92.92% <100.00%> (+60.97%) ⬆️
src/fides/api/models/privacy_experience.py 98.53% <100.00%> (+54.41%) ⬆️
src/fides/api/schemas/privacy_experience.py 100.00% <100.00%> (+5.81%) ⬆️
src/fides/api/util/tcf_util.py 90.55% <78.57%> (+55.01%) ⬆️

... and 151 files with indirect coverage changes

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

@pattisdr pattisdr marked this pull request as ready for review September 25, 2023 14:16
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.

this looks good to me! I'll work on #3941 today to get the FE to start consuming this and make sure all is good, then we can remove its version of gvl.json. I can work off of this branch, and then we can merge that one with this PR? so that we don't pollute main with two GVL.json files 😄 but if that's not a concern then merging this one first would be fine too!

src/fides/api/util/tcf_util.py Show resolved Hide resolved
@pattisdr
Copy link
Contributor Author

I can work off of this branch, and then we can merge that one with this PR?

That sounds perfect @allisonking!

@allisonking
Copy link
Contributor

Oh actually, while you're here, let's use the latest GVL: https://vendor-list.consensu.org/v3/vendor-list.json (updated 9/21)

@allisonking
Copy link
Contributor

Frontend piece: #4159

@pattisdr pattisdr mentioned this pull request Sep 26, 2023
20 tasks
Copy link
Contributor

@adamsachs adamsachs left a comment

Choose a reason for hiding this comment

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

preemptively approving, once the FE piece gets merged in here, assuming CI passes, let's get this merged into main.

just a general note/disclaimer that the hardcoded gvl.json is a workaround until this API is moved over to fidesplus and we leverage the dynamically fetched vendor list that's maintained there!

CHANGELOG.md Show resolved Hide resolved
@pattisdr
Copy link
Contributor Author

Thank you for your updates Allison!

@pattisdr pattisdr merged commit 5c741f1 into main Sep 26, 2023
44 of 45 checks passed
@pattisdr pattisdr deleted the fidesplus1109_gvl branch September 26, 2023 15:29
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.

3 participants