-
Notifications
You must be signed in to change notification settings - Fork 78
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
HA-423 - Fix Compass returning error for deleted GVL systems #5786
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (33.33%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #5786 +/- ##
==========================================
- Coverage 87.23% 87.22% -0.01%
==========================================
Files 404 404
Lines 24678 24679 +1
Branches 2659 2659
==========================================
- Hits 21528 21527 -1
- Misses 2570 2571 +1
- Partials 580 581 +1 ☔ View full report in Codecov by Sentry. |
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.
thanks for finding the issue @andres-torres-marroquin!
this may be an OK path to go down, but i've got some questions that we should clarify. generally, we need to add test coverage here - tests that surface the bug we're fixing, and i think also tests that prove we haven't caused a new regression with Url
fields, as the comment suggests we may be.
relatedly, we need to make sure (ideally with automated tests) that update_system
isn't being left with a similar bug to what you're fixing here...
@@ -44,6 +44,7 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o | |||
### Fixed | |||
- Fixed GPP string and section inconsistencies [#5765](https://github.com/ethyca/fides/pull/5765) | |||
- Fixed sending of notifications for privacy request receipts [#5777](https://github.com/ethyca/fides/pull/5777) | |||
- Fixed Compass returning error for deleted GVL systems [#5786](https://github.com/ethyca/fides/pull/5786) |
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.
nit: this isn't a very accurate description IMO, it's not compass that has any sort of error here
resource_dict = resource.model_dump( | ||
mode="json" | ||
) # mode=json helps Url fields be converted to strings before saving to db | ||
resource_dict = resource.model_dump() |
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.
so did we validate that a resource
here (i.e., a System
) with an AnyUrl
field that's populated actually gets created successfully? just trying to make sense of the comment that was clearly left here.
i'm also seeing that update_system
in this module does a similar operation -
existing_system_dict = copy.deepcopy(
SystemSchema.model_validate(system)
).model_dump(mode="json")
is that not going to cause a similar problem? do we need to adjust that?
Closes HA-423
Description Of Changes
Fix Compass returning error for deleted GVL systems
Code Changes
create_system
insrc/fides/api/db/system.py
somodel_dump
doesn't usemode=json
create_resource
insrc/fides/api/db/crud.py
so aSQLAlchemyError
exception logs.Steps to Confirm
vendor_deleted_date
from the "add a system" form, eg AB InBev, more examples are on the jira ticket.Pre-Merge Checklist
CHANGELOG.md
updatedmain
downgrade()
migration is correct and works