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

extensions: implement catalog for data management api #1195

Merged
merged 2 commits into from
Apr 24, 2022
Merged

extensions: implement catalog for data management api #1195

merged 2 commits into from
Apr 24, 2022

Conversation

ndr-brt
Copy link
Member

@ndr-brt ndr-brt commented Apr 21, 2022

What this PR changes/adds

Introduce Data Management API for catalog

Why it does that

To provide an api module for the catalog feature.

Further notes

  • currently the only parameter that the /catalog api accept is the providerUrl
  • make also EndToEndTest pass through the /catalog request, to have a more complete E2E scenario

Linked Issue(s)

Closes #1118

Checklist

  • added appropriate tests?
  • performed checkstyle check locally?
  • added/updated copyright headers?
  • documented public classes/methods?
  • added/updated relevant documentation?
  • added relevant details to the changelog? (skip with label no-changelog)
  • formatted title correctly? (take a look at the CONTRIBUTING and styleguide for details)


import java.util.concurrent.CompletableFuture;

public interface CatalogService {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is already a CatalogService interface. Shouldnt those be merged?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure it would be a good idea, they serve different purposes and have different dependencies

Copy link
Member Author

@ndr-brt ndr-brt Apr 22, 2022

Choose a reason for hiding this comment

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

Since we decided to have the *Service notation on the data management api, probably the other could be named differently, like CatalogProvider or CatalogGenerator

@Override
public CompletableFuture<Catalog> getByProviderUrl(String providerUrl) {
var request = CatalogRequest.Builder.newInstance()
.protocol("ids-multipart")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really want to hardcode this? Maybe a setting with a default value being "ids-multipart" should be preferred?

Copy link
Member Author

Choose a reason for hiding this comment

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

I just moved the functionality from control api to data-management, so I prefer to not put too much stuff in there. I see that "ids-multipart" is hardcoded pretty much everywhere, so maybe it's a thing to be addressed in another issue.

@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2022

Codecov Report

Merging #1195 (9e3ada1) into main (2553b2b) will increase coverage by 0.07%.
The diff coverage is 80.00%.

@@             Coverage Diff              @@
##               main    #1195      +/-   ##
============================================
+ Coverage     58.31%   58.38%   +0.07%     
- Complexity     2708     2717       +9     
============================================
  Files           694      697       +3     
  Lines         15431    15453      +22     
  Branches       1047     1047              
============================================
+ Hits           8999     9023      +24     
+ Misses         6009     6007       -2     
  Partials        423      423              
Impacted Files Coverage Δ
...core/base/RemoteMessageDispatcherRegistryImpl.java 14.28% <0.00%> (+1.78%) ⬆️
...nder/MultipartCatalogDescriptionRequestSender.java 0.00% <0.00%> (ø)
...i/datamanagement/catalog/CatalogApiController.java 100.00% <100.00%> (ø)
...pi/datamanagement/catalog/CatalogApiExtension.java 100.00% <100.00%> (ø)
...management/catalog/service/CatalogServiceImpl.java 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2553b2b...9e3ada1. Read the comment docs.

@ndr-brt ndr-brt requested a review from bscholtes1A April 22, 2022 12:44
@bscholtes1A bscholtes1A merged commit 8830be9 into eclipse-edc:main Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data Management API: add catalog endpoint
4 participants