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

feat: add priority on DataFlowController registration #3428

Merged

Conversation

ndr-brt
Copy link
Member

@ndr-brt ndr-brt commented Sep 8, 2023

What this PR changes/adds

Add priority on DataFlowController registration

Why it does that

to permit having multiple DataFlowControllers that could be chosen for a particular transfer, and having other used as fallback.
This is useful when there's, for example, the ProviderPushDataFlowController that pretty much can transfer anything but there's a specific DataFlowController for a particular source-todestination transfer that will be chosen first if the priority set is bigger.

Further notes

  • simplified the interface methods on DataFlowManager and DataFlowController, now they accept the whole TransferProcess object.

Linked Issue(s)

Closes #3414

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

@ndr-brt ndr-brt added the enhancement New feature or request label Sep 8, 2023
* @param policy the contract agreement usage policy for the asset being transferred
*/
@NotNull
StatusResult<DataFlowResponse> initiateFlow(TransferProcess transferProcess, Policy policy);

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'policy' is never used.
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 82.14% and no project coverage change.

Comparison is base (e0440a2) 72.09% compared to head (cc65bfb) 72.09%.
Report is 1 commits behind head on main.

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3428   +/-   ##
=======================================
  Coverage   72.09%   72.09%           
=======================================
  Files         830      834    +4     
  Lines       16818    16847   +29     
  Branches      954      953    -1     
=======================================
+ Hits        12125    12146   +21     
- Misses       4282     4289    +7     
- Partials      411      412    +1     
Files Changed Coverage Δ
...onnector/transfer/spi/flow/DataFlowController.java 0.00% <0.00%> (ø)
...c/connector/transfer/spi/flow/DataFlowManager.java 0.00% <0.00%> (ø)
.../connector/transfer/spi/types/TransferProcess.java 74.69% <0.00%> (-0.47%) ⬇️
...c/connector/transfer/flow/DataFlowManagerImpl.java 100.00% <100.00%> (ø)
...r/transfer/process/TransferProcessManagerImpl.java 92.39% <100.00%> (-0.03%) ⬇️
...e/flow/ConsumerPullTransferDataFlowController.java 100.00% <100.00%> (ø)
...e/flow/ProviderPushTransferDataFlowController.java 92.85% <100.00%> (-1.88%) ⬇️

... and 4 files with indirect coverage changes

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

@ndr-brt ndr-brt merged commit 3ee83cd into eclipse-edc:main Sep 11, 2023
18 checks passed
@ndr-brt ndr-brt deleted the 3414-dataflowmanager-improve branch September 11, 2023 07:30
ndkrimbacher pushed a commit to nexyo-io/DataSpaceConnector that referenced this pull request Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataFlowController registration is not fully controllable
4 participants