-
Notifications
You must be signed in to change notification settings - Fork 23
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
Feature/639 handle policy expiration #1041
Merged
ds-mwesener
merged 21 commits into
eclipse-tractusx:main
from
ds-lcapellino:feature/639-handle-policy-expiration
Jul 3, 2024
Merged
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
3b6739f
feature: #639 update irs-lib
ds-lcapellino 30c995a
Merge branch 'main' into feature/639-handle-policy-expiration
ds-lcapellino 88b7fd5
feature: #639 adapt integration tests
ds-lcapellino e292065
feature: #639 adapt integration tests
ds-lcapellino e1eb275
feature: #639 fix integration tests
ds-lcapellino 81d839a
feature: #639 remove PolicyCheckerService.isValid() check
ds-lcapellino ef77bc0
Merge branch 'main' into feature/639-handle-policy-expiration
ds-lcapellino fc5f75b
Merge branch 'main' into feature/639-handle-policy-expiration
ds-lcapellino 8efea7e
Merge branch 'main' into feature/639-handle-policy-expiration
ds-lcapellino 32536c8
feature: #639 test
ds-lcapellino e86bfba
feature: #639 test
ds-lcapellino 1059d7e
Merge branch 'main' into feature/639-handle-policy-expiration
ds-lcapellino 19fc8e9
feature: #639 test
ds-lcapellino 5568cbf
feature: #639 fix integration tests
ds-lcapellino fa8349b
feature: #639 don't show sql
ds-lcapellino bf9db9f
feature: #639 refactor
ds-lcapellino 6540dd2
Merge branch 'main' into feature/639-handle-policy-expiration
ds-lcapellino 8e229fd
feature: #639 update irs-client-lib.version
ds-lcapellino 932eedc
Merge remote-tracking branch 'ds-lcapellino/feature/639-handle-policy…
ds-lcapellino 1d7215e
feature: #639 update irs-client-lib.version
ds-lcapellino 5659c08
feature: #639 fix integration tests
ds-lcapellino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Currently the issue is that on the getCatalog call within the class NotificationsEdcFacade between line 157 and 164 we filter out all elements which are invalid.
Instead of filtering them out we need to catch them in a different exception.
e.g. PolicyExpiredException
This policy then will be cached again in EdcNotificationServiceImpl#handleSendingNotification, where we need to enrich the error message into the notification.
At the end we will have the info in the frontend that it was not possible to send it out due to policy issues.
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.
PolicyCheckerService was adapted according to the requirements in issue #639. Please see eclipse-tractusx/item-relationship-service@6e8880b#diff-b63cc42711ba192e7a2ff818eaad3bf34984ebf1f30d53b2f5df2abfa468e623 fore reference.
This handles "NotificationsEdcFacade between line 157 and 164".
UsagePolicyExpiredException was also added: eclipse-tractusx/item-relationship-service@6e8880b#diff-3db264f1f24f39482d77c13221eaba18eba63de4620a7598ba4a1d404623e8ce
This is thrown, if the policy is expired during contract negotiation.
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.
Now the filter is gone. That is good. Still some things missing.
When the client library throws an exception within the contract negotiation (the point were you changed the exceptions) it will throw an exception and based on the logic of trace-x it will be catched and always mapped to the generic "NegotiationException" which is for our usage not enough.
We need to know if the policy was expired, or the policy constraints are incorrect or the policy is missing.
Therefore please catch those exceptions and pass them to the errorEnricher. To make sure we have that information in the frontend available.
If this is not manageable within the story - please recheck with product owner if new issue can be created for following up on that one.