-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat: replace contract dates with policy #2950
feat: replace contract dates with policy #2950
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2950 +/- ##
==========================================
+ Coverage 66.19% 66.24% +0.05%
==========================================
Files 1039 1041 +2
Lines 21281 21227 -54
Branches 1259 1258 -1
==========================================
- Hits 14086 14062 -24
+ Misses 6672 6642 -30
Partials 523 523
☔ View full report in Codecov by Sentry. |
private Duration asDuration(String rightValueStr) { | ||
var matcher = Pattern.compile(EXPRESSION_REGEX).matcher(rightValueStr); | ||
if (matcher.matches()) { | ||
var number = Integer.parseInt(matcher.group(REGEX_GROUP_NUMERIC)); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
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.
@paullatzelsperger should we catch and handle this or let it bubble? We could also address in another PR
776554a
to
7bc6624
Compare
7bc6624
to
269ce7e
Compare
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.
Awesome stuff, especially removing code ;-) One small comment but that can either stay the same or be addressed later.
private Duration asDuration(String rightValueStr) { | ||
var matcher = Pattern.compile(EXPRESSION_REGEX).matcher(rightValueStr); | ||
if (matcher.matches()) { | ||
var number = Integer.parseInt(matcher.group(REGEX_GROUP_NUMERIC)); |
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.
@paullatzelsperger should we catch and handle this or let it bubble? We could also address in another PR
I think it's not an issue, since it would never match the Regex unless its a numeric value. Maybe another test for this would be in order though :) |
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.
LGTM 🪓
What this PR changes/adds
This PR does a couple of things:
ContractOffer
validity
fromContractDefinition
and related DTOsWhy it does that
validity periods of contracts should be represented by policies
Further notes
AbsractEndToEndTransfer.java
, but because Rejection Messages are not properly handled in IDS, I@Disabled
those tests. Once the tests use the new DSP, we should be able to re-enable them.ContractExpiryCheckFunction.java
: contains the permission function to validate a time-limiting policyContractValidationServiceImpl.java
: where the policy is supposed to be evaluatedContractOffer.java
: removed the start- and end-date as well as the offerstart and end dateContractAgreement.java
: removed the start- and end-dateLinked Issue(s)
Closes #2758
Checklist
no-changelog
)