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

Feature: provide in-mem implementations by default #1223

Conversation

paullatzelsperger
Copy link
Member

@paullatzelsperger paullatzelsperger commented Apr 27, 2022

What this PR changes/adds

All in-memory implementations of various stores are now provided as default (using the @Provider annotation). This means that it is not necessary anymore to add dependencies onto :extensions:in-memory:xyzstore anymore.

Why it does that

Having all those in-memory extensions had a couple of major downsides:

  • no defaults were provided
  • it was easy to forget to add them to the build file
  • there were lots of pretty thin in-memory:-modules

With this PR, sane defaults are provided at all times, reducing user error and erroneous build configurations.

Further notes

  • all the "core" stores, such as AssetIndex, ContractDefinitionStore etc. are now provided through the new :core:defaults module, which :core:base depends on. It is therefore sufficient to add :core:base, and a default (=in-mem) impl will be registered if no other impl is found on the classpath.
  • in-mem implementations for catalog-related stores was moved into :extensions:catalog:federated-catalog-cache
  • in-mem implementations for identityhub store and did document store were moved into :extensions:iam:decentralized-identity:identity-did-core

Linked Issue(s)

Closes #1130

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)

@codecov-commenter
Copy link

Codecov Report

Merging #1223 (16f5313) into main (9436ebf) will increase coverage by 0.14%.
The diff coverage is 44.44%.

@@             Coverage Diff              @@
##               main    #1223      +/-   ##
============================================
+ Coverage     58.94%   59.08%   +0.14%     
- Complexity     2815     2818       +3     
============================================
  Files           713      706       -7     
  Lines         15634    15612      -22     
  Branches       1049     1049              
============================================
+ Hits           9215     9224       +9     
+ Misses         5996     5966      -30     
+ Partials        423      422       -1     
Impacted Files Coverage Δ
...actdefinition/InMemoryContractDefinitionStore.java 78.57% <ø> (ø)
...tiationstore/InMemoryContractNegotiationStore.java 88.33% <ø> (ø)
...core/defaults/policystore/InMemoryPolicyStore.java 100.00% <ø> (ø)
...ector/catalog/directory/InMemoryNodeDirectory.java 60.00% <ø> (ø)
...tor/catalog/store/InMemoryFederatedCacheStore.java 100.00% <ø> (ø)
...aceconnector/iam/did/IdentityDidCoreExtension.java 67.64% <0.00%> (-4.23%) ⬇️
...or/iam/did/hub/store/InMemoryIdentityHubStore.java 84.84% <ø> (ø)
...nector/iam/did/store/InMemoryDidDocumentStore.java 68.57% <0.00%> (ø)
...connector/spi/system/injection/ProviderMethod.java 81.25% <0.00%> (-5.42%) ⬇️
...nector/core/defaults/DefaultServicesExtension.java 33.33% <33.33%> (ø)
... and 6 more

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 9436ebf...16f5313. Read the comment docs.

@paullatzelsperger paullatzelsperger force-pushed the feature/1130_default_implementations_inmem branch 2 times, most recently from c652931 to b1e71a5 Compare April 28, 2022 15:55
launchers/ids-connector/README.md Outdated Show resolved Hide resolved
@juliapampus juliapampus added this to In progress in Connector via automation Apr 29, 2022
@paullatzelsperger paullatzelsperger force-pushed the feature/1130_default_implementations_inmem branch from b94ad6b to cf5fb14 Compare April 29, 2022 08:03
Connector automation moved this from In progress to Review in progress Apr 29, 2022
@paullatzelsperger paullatzelsperger force-pushed the feature/1130_default_implementations_inmem branch from bbbc1df to 81f3c06 Compare April 29, 2022 16:46
@bscholtes1A bscholtes1A merged commit 0da15e1 into eclipse-edc:main Apr 30, 2022
Connector automation moved this from Review in progress to Done Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Connector
  
Done
Development

Successfully merging this pull request may close these issues.

Story: use in-memory implementations by default
5 participants