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

fix: enforce consistency of contract negotiation request and transfer request #4264

Conversation

bscholtes1A
Copy link
Contributor

What this PR changes/adds

This PR fixes two issues of the current implementation:

  • in contract negotiation request, the asset id part of the offer id can be different from the asset id provided in the target field of the Policy.
  • in transfer request, the asset id provided in the request can be different to the one referred by the contract id also provided in this same request. This leads to inconsistent EndpointDataReferenceEntry being generated.

Why it does that

Fix.

Linked Issue(s)

Closes #4239
Closes #4240

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Project coverage is 75.03%. Comparing base (7f20ba5) to head (0eff36e).
Report is 299 commits behind head on main.

Files Patch % Lines
...ract/validation/ContractValidationServiceImpl.java 66.66% 1 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4264      +/-   ##
==========================================
+ Coverage   71.74%   75.03%   +3.28%     
==========================================
  Files         919     1046     +127     
  Lines       18457    20987    +2530     
  Branches     1037     1171     +134     
==========================================
+ Hits        13242    15747    +2505     
+ Misses       4756     4727      -29     
- Partials      459      513      +54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bscholtes1A bscholtes1A added the bug Something isn't working label Jun 11, 2024
@bscholtes1A bscholtes1A force-pushed the fix/enforce_contractnego_and_transferrequest_consistency branch from b1909e3 to 1d791e6 Compare June 11, 2024 15:35
@bscholtes1A bscholtes1A requested a review from ndr-brt as a code owner June 11, 2024 15:35
@bscholtes1A bscholtes1A force-pushed the fix/enforce_contractnego_and_transferrequest_consistency branch 2 times, most recently from 47fc1ef to 589d820 Compare June 11, 2024 16:43
Copy link
Member

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

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

LGTM

@bscholtes1A bscholtes1A force-pushed the fix/enforce_contractnego_and_transferrequest_consistency branch from 589d820 to 0eff36e Compare June 12, 2024 08:29
@bscholtes1A bscholtes1A merged commit d931c8b into eclipse-edc:main Jun 12, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants