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

Fix issue with monitor results pagination #5060

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

jpople
Copy link
Contributor

@jpople jpople commented Jul 3, 2024

Closes #PROD-2233

Description Of Changes

Fixes a bug where, when switching between pages using the result tables' pagination menu or searching, results from previous table views were remaining on the table.

Loom demonstrating bugged behavior

Loom demonstrating fixed behavior

The issue was that the key prop, which is used by React to determine which rows to clear when rerendering, wasn't unique enough-- if a result on page A had the same name as a result on page B, its row would stay on the table instead of being removed. I fixed this by making all discovery/detection tables also include their monitor config ID in their row ID (from which the key is derived).

Code Changes

  • Unify getRowId across all D&D tables
  • Change getRowId to include monitor config ID
  • Update (a lot of) tests to use changed data-testids

Steps to Confirm

  • Create several discovery monitors for integrations that have data (I used S3)
  • Execute all monitors until there are >25 results
  • View results in "Activity" and "Detection" tables
  • Should be able to switch pages and search
  • Table should show only the 25 results per page that are supposed to be populated

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Update CHANGELOG.md

Copy link

vercel bot commented Jul 3, 2024

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Jul 3, 2024 6:41pm

Copy link
Contributor

@lucanovera lucanovera left a comment

Choose a reason for hiding this comment

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

Good fix! Appreciate the loom videos too. Approve

Copy link

cypress bot commented Jul 3, 2024

Passing run #8760 ↗︎

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 6c7d473 into 182ffe7...
Project: fides Commit: 8aa598d3b6 ℹ️
Status: Passed Duration: 00:42 💡
Started: Jul 3, 2024 6:56 PM Ended: Jul 3, 2024 6:56 PM

Review all test suite changes for PR #5060 ↗︎

@jpople jpople merged commit b2d94fa into main Jul 3, 2024
13 checks passed
@jpople jpople deleted the jpople/prod-2233/monitor-results-pagination-fix branch July 3, 2024 19:02
Copy link

cypress bot commented Jul 3, 2024

Passing run #8762 ↗︎

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

Details:

Fix issue with monitor results pagination (#5060)
Project: fides Commit: b2d94fa770
Status: Passed Duration: 00:42 💡
Started: Jul 3, 2024 7:13 PM Ended: Jul 3, 2024 7:14 PM

Review all test suite changes for PR #5060 ↗︎

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