Skip to content

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
  • Create enum class utils.VerifyResult to represent the return value of verify functions, include SUCCESS, WARNING, NON_FATAL_ERROR and FATAL_ERROR
  • sanity check will return utils.VerifyResult.FATAL_ERROR to indicate this is a fatal
    error, so that the commit process will be aborted

@codecov
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.

@liangxin1300 liangxin1300 force-pushed the 20250113_prevent_unknown_op branch 10 times, most recently from 6952df8 to 7dec671 Compare April 27, 2025 07:27
- When adding unknown operation, sanity check should give an error
instead of a warning
- Create enum class utils.VerifyResult to represent the return value
of verify functions, include SUCCESS, WARNING, NON_FATAL_ERROR and
FATAL_ERROR
- sanity check will return utils.VerifyResult.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 from 7dec671 to 0393954 Compare April 29, 2025 06:41
@liangxin1300 liangxin1300 merged commit 63b8830 into ClusterLabs:master Apr 30, 2025
32 checks passed
liangxin1300 added a commit that referenced this pull request May 6, 2025
… check related functions (#1773)

#1679 only updated some sanity check functions and failed to change all
related return values to use `VerifyResult`.

This PR ensures that all related functions now consistently use
`VerifyResult` as the return value.
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