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

PROD-2117 frontend generate served notice history guid and pass to be #4933

Conversation

lucanovera
Copy link
Contributor

@lucanovera lucanovera commented May 29, 2024

Description Of Changes

  • For notices-served and privacy-preferences, we want to generate the served_notice_history_id (a uuid v4) in the client instead of in the backend (that way we also don't have to wait for the response in order to use the same id for both requests).

Code Changes

  • Split hooks.ts into multiple files
  • Remove await from privacy-preferences called to optimize speed
  • Generate a starting uuidv4 and regenerate each time notices-served is called (same behavior as before)
  • Use the same uuiv4 in notices-served request as for saved-preferences
  • Update tests

Steps to Confirm

  • Open development mode in the browsers, go to network tab
  • Trigger a fides modal
  • In the dev tools, find the served-notices request and check that the body of the request should include served_notice_history_id with a valid uuidv4
  • Click save
  • In the dev tools, find the preferences-saved request and check that the body of the request should include served_notice_history_id with the same uuidv4 as the served-notices request

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Documentation:
    • documentation complete, PR opened in fidesdocs
    • documentation issue created in fidesdocs
    • if there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
  • Issue Requirements are Met
  • Relevant Follow-Up Issues Created
  • Update CHANGELOG.md

Copy link

vercel bot commented May 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 3:01pm

Copy link

cypress bot commented May 29, 2024

Passing run #7998 ↗︎

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 f9f3bad into cd772b2...
Project: fides Commit: 3b087dcb1c ℹ️
Status: Passed Duration: 00:33 💡
Started: May 30, 2024 3:09 PM Ended: May 30, 2024 3:09 PM

Review all test suite changes for PR #4933 ↗︎

@lucanovera lucanovera requested a review from jpople May 30, 2024 19:51

return uuid;
};
export default useUUID4;
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't appear to me to get imported anywhere, is it still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, it's not needed. It was used in an earlier approach, but then had to change it. I left it as it might be useful for someone, but I can easly remove it too.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you think it'll still be useful in the future I don't have a problem leaving it in, just wanted to make sure it wasn't a total oversight!

Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

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

✅ Working as expected!

…d-Generate-Served-Notice-History-Guid-and-pass-to-BE
@lucanovera lucanovera merged commit 0ef9822 into main May 31, 2024
10 of 11 checks passed
@lucanovera lucanovera deleted the PROD-2117-Frontend-Generate-Served-Notice-History-Guid-and-pass-to-BE branch May 31, 2024 14:59
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.

2 participants