Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
entitlement: compute blocking states baed on all services and not onl…
…y ENTITLEMENT_SERVICE_NAME. That is required for block() / unblock() apis to behave correctly
- Loading branch information
Showing
1 changed file
with
4 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fd7c0c1
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'm not sure about this change because now any service can impact the entitlement status as seen by the entitlement system? For example, any service can insert an event with state name
ENT_CANCELLED
and mark the entitlement as cancelled (or change theentitlementEffectiveEndDate
, etc.).fd7c0c1
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.
The issue comes from the method computeBlockingAggregator which is trying to compute the
blockingAggregator
(that is across all services). If we filter only per-service level, the computedblockingAggregator
ends up being wrong (because it only accounts for entitlement service).That being i think you are correct that something is off (at the very least the naming of variables and method should be changed). I'll take a second pass.