-
Notifications
You must be signed in to change notification settings - Fork 84
ENG-1796 - /aggregate-results returns confidence scores as optional #6872
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
2efd5f6 to
0dbbb2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR updates the frontend to handle optional confidence score fields (classified_low_confidence and classified_high_confidence) in datastore monitor updates, aligning with backend API changes. The classified_manually field has been removed from the type definition, constants, and test fixtures.
Key changes:
- Type definition updated to make confidence fields optional and nullable
- Added proper null checking in
MonitorResultDescription.tsxbefore filtering and formatting - Removed
classified_manuallyfrom ignored fields array - Updated test fixture to match new type structure
The implementation correctly handles the nullable fields by filtering out null/undefined values before processing, and uses a non-null assertion operator after the filter, which is safe since the filter ensures only non-null values pass through.
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- The changes are straightforward type updates with proper null handling. The null check is correctly placed in the filter before any value usage, and the non-null assertion is safe after filtering. All references to the removed field have been cleaned up, and test fixtures have been updated accordingly.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| clients/admin-ui/src/types/api/models/DatastoreMonitorUpdates.ts | 5/5 | Made confidence fields optional/nullable and removed classified_manually field - aligns with backend API changes |
| clients/admin-ui/src/features/data-discovery-and-detection/action-center/MonitorResultDescription.tsx | 5/5 | Added null check in filter to handle optional confidence fields - correctly uses non-null assertion after filtering |
4 files reviewed, no comments
Ticket ENG-1796
Description Of Changes
This PR updates the frontend to handle optional confidence score fields in datastore monitor updates and removes the
classified_manuallyfield that is no longer needed.fidesplusbranchENG-1796-confidence-score.The
classified_low_confidenceandclassified_high_confidencefields are now optional and nullable, as they may not always be present in monitor update responses. Theclassified_manuallyclassification type has been removed from the system.Code Changes
DatastoreMonitorUpdatesTypeScript type to makeclassified_low_confidenceandclassified_high_confidenceoptional and nullableclassified_manuallyfield from the monitor updates type definitionMonitorResultDescription.tsxto handle nullable count values before filteringclassified_manuallyfrom theMONITOR_UPDATES_TO_IGNOREconstants arrayaggregate-results.jsonto remove theclassified_manuallyfieldSteps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works