Skip to content
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

[ISSUE #4521] Enhance clarity and avoid concept conflict in exception enum #4524

Merged
merged 4 commits into from
Oct 31, 2023

Conversation

Pil0tXia
Copy link
Member

@Pil0tXia Pil0tXia commented Oct 31, 2023

Fixes #4521.

Motivation

The Message subclass represents the string message for exceptions; however, its concept may potentially conflict with MQ messages. To address this concern, the class name has been changed while retaining the field name.

Type refers to a kind or category, where its constituents share similar characteristics. It can pertain to a single exception or multiple exceptions of the same type, which might lead to potential ambiguity. Therefore, its class name has been exacted to the primary classification level Category.

The Errors enum has been renamed to Status to accommodate additional situations, such as the status of a K8s pod being Deploying.

Modifications

The names of exception enum members have been optimized to better align with their usage in the code, adhere more closely to English grammar, and avoid potential conflicts with future-introduced concepts.

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@Pil0tXia Pil0tXia mentioned this pull request Oct 31, 2023
3 tasks
@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #4524 (1020d14) into master (62935c4) will increase coverage by 0.62%.
Report is 11 commits behind head on master.
The diff coverage is 22.50%.

❗ Current head 1020d14 differs from pull request most recent head d91e9e5. Consider uploading reports for the commit d91e9e5 to get more accurate results

@@             Coverage Diff              @@
##             master    #4524      +/-   ##
============================================
+ Coverage     15.47%   16.09%   +0.62%     
- Complexity     1452     1550      +98     
============================================
  Files           691      730      +39     
  Lines         28106    28640     +534     
  Branches       2626     2523     -103     
============================================
+ Hits           4349     4611     +262     
- Misses        23312    23581     +269     
- Partials        445      448       +3     
Files Coverage Δ
...in/java/org/apache/eventmesh/common/Constants.java 75.00% <ø> (ø)
...apache/eventmesh/common/file/WatchFileManager.java 67.64% <100.00%> (+9.31%) ⬆️
...he/eventmesh/filter/condition/PrefixCondition.java 100.00% <100.00%> (ø)
...eventmesh/filter/condition/SpecifiedCondition.java 100.00% <100.00%> (ø)
...he/eventmesh/filter/condition/SuffixCondition.java 100.00% <100.00%> (ø)
...eventmesh/metrics/api/model/TcpSummaryMetrics.java 0.00% <ø> (ø)
...e/admin/handler/RedirectClientByIpPortHandler.java 34.04% <ø> (ø)
...ime/admin/handler/RedirectClientByPathHandler.java 84.44% <ø> (ø)
...he/eventmesh/runtime/boot/EventMeshGrpcServer.java 0.75% <ø> (+<0.01%) ⬆️
.../runtime/core/protocol/grpc/retry/GrpcRetryer.java 0.00% <ø> (ø)
... and 106 more

... and 17 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pandaapo pandaapo changed the title [ISSUE #4521] Enhancing clarity and Avoiding future conflicts in exception enum [ISSUE #4521] A poor naming. Oct 31, 2023
@xwm1992 xwm1992 merged commit 2bfc1ae into apache:master Oct 31, 2023
7 checks passed
@Pil0tXia Pil0tXia deleted the pil0txia_enhance_4521 branch January 4, 2024 05:05
@Pil0tXia Pil0tXia changed the title [ISSUE #4521] A poor naming. [ISSUE #4521] Enhance clarity and avoid concept conflict in exception enum Jan 10, 2024
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.

[Enhancement] A poor naming.
3 participants