Skip to content

Fix: ra: Prevent to add unknown operation (bsc#1236442) #1679

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

liangxin1300
Copy link
Collaborator

@liangxin1300 liangxin1300 commented Jan 27, 2025

  • When adding unknown operation, sanity check should give an error instead of a warning
  • Leveled all verify return values as VERIFY_SUCCESS, VERIFY_WARNING, VERIFY_NON_FATAL_ERROR and VERIFY_FATAL_ERROR
  • sanity check will return VERIFY_FATAL_ERROR to indicate this is a fatal error, so that the commit process will be aborted

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.74%. Comparing base (e63ac0b) to head (eb8e9fc).

Files with missing lines Patch % Lines
crmsh/utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
integration 53.56% <90.00%> (+0.03%) ⬆️
unit 53.07% <10.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crmsh/constants.py 100.00% <100.00%> (ø)
crmsh/ra.py 53.45% <100.00%> (+0.46%) ⬆️
crmsh/ui_configure.py 45.05% <100.00%> (+0.31%) ⬆️
crmsh/utils.py 66.49% <0.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@liangxin1300 liangxin1300 changed the title Dev: ra: Prevent to add unknown operation Fix: ra: Prevent to add unknown operation (bsc#1236442) Jan 27, 2025
@liangxin1300 liangxin1300 force-pushed the 20250113_prevent_unknown_op branch from 5d54ee1 to b7c15db Compare January 27, 2025 06:16
@liangxin1300 liangxin1300 marked this pull request as ready for review February 5, 2025 07:58
@liangxin1300 liangxin1300 force-pushed the 20250113_prevent_unknown_op branch 2 times, most recently from 033a45c to eb8e9fc Compare February 14, 2025 02:45
@liangxin1300 liangxin1300 force-pushed the 20250113_prevent_unknown_op branch 6 times, most recently from 3128845 to a533416 Compare March 20, 2025 07:58
@liangxin1300 liangxin1300 force-pushed the 20250113_prevent_unknown_op branch from a533416 to 356f0a5 Compare March 20, 2025 09:49
Copy link
Collaborator

@nicholasyang2022 nicholasyang2022 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It is invalid to use bitwise-or operation with a series defined as 0, 1, 2, 3, ....
  2. Please use enum instead instead of standalone integers.

- When adding unknown operation, sanity check should give an error instead of a warning
- Leveled all verify return values as VERIFY_SUCCESS, VERIFY_WARNING,
  VERIFY_NON_FATAL_ERROR and VERIFY_FATAL_ERROR
- sanity check will return VERIFY_FATAL_ERROR to indicate this is a fatal
  error, so that the commit process will be aborted
@liangxin1300 liangxin1300 force-pushed the 20250113_prevent_unknown_op branch 3 times, most recently from f83e5c8 to f4481b9 Compare April 25, 2025 09:53
@liangxin1300 liangxin1300 force-pushed the 20250113_prevent_unknown_op branch from f4481b9 to 5f18e0e Compare April 25, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants