-
Notifications
You must be signed in to change notification settings - Fork 401
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(versioning): prevent FeatureSegment from writing audit log on delete when v2 versioning enabled #4088
fix(versioning): prevent FeatureSegment from writing audit log on delete when v2 versioning enabled #4088
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4088 +/- ##
=======================================
Coverage 96.44% 96.44%
=======================================
Files 1149 1149
Lines 37575 37589 +14
=======================================
+ Hits 36238 36252 +14
Misses 1337 1337 ☔ 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.
Approved with one minor quality of life improvement suggestion
def get_skip_create_audit_log(self) -> bool: | ||
# Don't create audit logs when deleting feature segments using versioning | ||
# v2 as we rely on the version history instead. | ||
return self.environment_feature_version_id is not None |
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: I would do the following
def get_skip_create_audit_log(self) -> bool: | |
# Don't create audit logs when deleting feature segments using versioning | |
# v2 as we rely on the version history instead. | |
return self.environment_feature_version_id is not None | |
@property | |
def is_skip_create_audit_log(self) -> bool: | |
# Don't create audit logs when deleting feature segments using versioning | |
# v2 as we rely on the version history instead. | |
return self.environment_feature_version_id is not None |
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
Prevents the application from writing an AuditLog record when a feature segment is deleted if v2 versioning is enabled.
How did you test this code?
Added a new unit test.