-
Notifications
You must be signed in to change notification settings - Fork 93
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: ra: Prevent to add unknown operation (bsc#1236442) #1679
base: master
Are you sure you want to change the base?
Fix: ra: Prevent to add unknown operation (bsc#1236442) #1679
Conversation
liangxin1300
commented
Jan 27, 2025
- When adding unknown operation, sanity check should give an error instead of a warning
- And sanity check will return a big number to indicate this is a fatal error, so that the commit process will be aborted
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
- When adding unknown operation, sanity check should give an error instead of a warning - And sanity check will return a big number to indicate this is a fatal error, so that the commit process will be aborted
5d54ee1
to
b7c15db
Compare
@@ -744,6 +744,8 @@ def _verify(self, set_obj_semantic, set_obj_all): | |||
rc1 = set_obj_all.verify() | |||
if config.core.check_frequency != "never": | |||
rc2 = set_obj_semantic.semantic_check(set_obj_all) | |||
if rc2 >= constants.SANITY_FATAL_RC: | |||
cib_factory.reset() |
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.
I think reset()
should not be called here.
_verify()
is also called fromdo_verify()
. This subcommand should not have a side effect.- Even when called from
_commit()
, it is enough to abort the commit, so that users will have a chance to modify their config instead of losing all the changes.