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

More internal type filtering #1471

Merged
merged 32 commits into from
Sep 20, 2022
Merged

Conversation

alexander-yevsyukov
Copy link
Contributor

@alexander-yevsyukov alexander-yevsyukov commented Sep 16, 2022

This PR teaches QueryService and SubscriptionService to reject calls referring types marked as internal_type (either directly in a type option or via a file option internal_all).

To extract common logic of processing, an abstract ServiceDelegate class was introduced.
CommandService, QueryService, and SubscriptionService were modified to processing calls to classes derived from ServiceDelegate.

Also UnknownEntityTypeException was renamed to UnknownEntityStateTypeException to better reflect the cause of the error.

@alexander-yevsyukov alexander-yevsyukov self-assigned this Sep 16, 2022
@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Merging #1471 (57eafa1) into master (b6fccad) will increase coverage by 0.00%.
The diff coverage is 96.94%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1471   +/-   ##
=========================================
  Coverage     91.39%   91.40%           
+ Complexity     5012     5006    -6     
=========================================
  Files           631      632    +1     
  Lines         15402    15424   +22     
  Branches        887      882    -5     
=========================================
+ Hits          14077    14098   +21     
  Misses         1019     1019           
- Partials        306      307    +1     

@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review September 19, 2022 14:33
@alexander-yevsyukov
Copy link
Contributor Author

@yevhenii-nadtochii, since you were the author of (#1449), you may want to have a look at this PR.

Copy link
Contributor

@yevhenii-nadtochii yevhenii-nadtochii left a comment

Choose a reason for hiding this comment

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

@alexander-yevsyukov thank you. I've checked this out and left several suggestions. LGTM, but I would preserve the power of a formal approve to other reviewers.

server/src/main/java/io/spine/server/CommandService.java Outdated Show resolved Hide resolved
server/src/main/java/io/spine/server/CommandService.java Outdated Show resolved Hide resolved
server/src/main/java/io/spine/server/ServiceDelegate.java Outdated Show resolved Hide resolved
server/src/test/java/io/spine/server/QueryServiceTest.java Outdated Show resolved Hide resolved
Copy link
Contributor

@armiol armiol left a comment

Choose a reason for hiding this comment

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

@alexander-yevsyukov please see the comments left by @yevhenii-nadtochii

Other than those, LGTM.

Copy link
Contributor

@armiol armiol left a comment

Choose a reason for hiding this comment

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

@alexander-yevsyukov alexander-yevsyukov merged commit 2e8482d into master Sep 20, 2022
@alexander-yevsyukov alexander-yevsyukov deleted the more-internal-type-filtering branch September 20, 2022 10:42
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.

3 participants