-
Notifications
You must be signed in to change notification settings - Fork 77
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
HJ-131 Delete monitors before deleting integration #5478
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
fides
|
Project |
fides
|
Branch Review |
refs/pull/5478/merge
|
Run status |
|
Run duration | 00m 39s |
Commit |
|
Committer | erosselli |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
4
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
@pytest.fixture | ||
def create_monitor_config(self, db: Session, connection_config: ConnectionConfig): |
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.
moved this fixture to the new detection_discovery_fixtures.py
file I created and just renamed it to monitor_config
, to be more consistent with our existing fixture names
if TYPE_CHECKING: | ||
from fides.api.models.detection_discovery import MonitorConfig | ||
|
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.
this is so mypy doesn't complain about not recognizing the MonitorConfig
model. The if TYPE_CHECKING
is needed to avoid a circular import
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5478 +/- ##
==========================================
- Coverage 85.20% 85.20% -0.01%
==========================================
Files 386 386
Lines 24234 24242 +8
Branches 2640 2642 +2
==========================================
+ Hits 20649 20655 +6
- Misses 3032 3033 +1
- Partials 553 554 +1 ☔ View full report in Codecov by Sentry. |
fides
|
Project |
fides
|
Branch Review |
main
|
Run status |
|
Run duration | 00m 37s |
Commit |
|
Committer | erosselli |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
4
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
Closes HJ-131
Description Of Changes
Before, trying to delete an integration (i.e
ConnectionConfig
) that had a related monitor (i.eMonitorConfig
) would throw a 500 error. Intended behavior is to cascade the deletion so that all monitors associated to the givenConnectionConfig
are deleted.Code Changes
ConnectionConfig
model to explicitly define itsmonitors
reference, and updated the class'delete
method to iterate over its relatedMonitorConfig
s and delete them as welldetection_discovery_fixtures.py
file to organize D&D fixtures in one single placeSteps to Confirm
Delete integration
Pre-Merge Checklist
CHANGELOG.md
updatedmain
downgrade()
migration is correct and works