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

Poll for classification updates #1908

Merged
merged 5 commits into from
Nov 30, 2022

Conversation

allisonking
Copy link
Contributor

@allisonking allisonking commented Nov 30, 2022

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

Turns out this was pretty easy, thanks to some built in RTK polling functionality 🎉

Code Changes

  • Pass a polling interval to useGetAllClassifyInstancesQuery which stops once all classifications are done. I set it to 20 seconds, though it's easy to change if we want.

I couldn't think of a good way to cypress test this one since it depends on waiting quite a while for the next poll to happen.

Steps to Confirm

  • Go through the /add-systems flow and use the data flow scanner. Continue until you end up at the classifications page, which should show all entries as "Processing"
  • Open up the network tab (or your fides plus server). Every 20 seconds, you should see it requery /api/v1/plus/classify
  • Eventually, all entries will change to Awaiting Review. At this point, you should no longer see requeries for /api/v1/plus/classify

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Documentation Updated:
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Issue Requirements are Met
  • Relevant Follow-Up Issues Created
  • Update CHANGELOG.md

Description Of Changes

Write some things here about the changes and any potential caveats

@allisonking allisonking marked this pull request as ready for review November 30, 2022 19:59
@allisonking allisonking merged commit 960f3fb into main Nov 30, 2022
@allisonking allisonking deleted the aking/fidesplus-368/poll-classification branch November 30, 2022 21:13
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