Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Allow loading extra modules for a Service #320

Merged
merged 9 commits into from Sep 8, 2020
Merged

Allow loading extra modules for a Service #320

merged 9 commits into from Sep 8, 2020

Conversation

mspringare
Copy link
Contributor

@mspringare mspringare commented Sep 1, 2020

Add possibility to specify extra set of modules that will always be loaded

@codecov
Copy link

codecov bot commented Sep 1, 2020

Codecov Report

Merging #320 into 1.x will increase coverage by 0.14%.
The diff coverage is 81.81%.

Impacted file tree graph

@@             Coverage Diff              @@
##                1.x     #320      +/-   ##
============================================
+ Coverage     71.73%   71.87%   +0.14%     
- Complexity      665      667       +2     
============================================
  Files           135      136       +1     
  Lines          2848     2852       +4     
  Branches        166      166              
============================================
+ Hits           2043     2050       +7     
+ Misses          766      763       -3     
  Partials         39       39              
Impacted Files Coverage Δ Complexity Δ
...src/main/java/com/spotify/apollo/core/Service.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...main/java/com/spotify/apollo/core/ServiceImpl.java 91.46% <90.00%> (+1.46%) 35.00 <5.00> (+2.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 62897d1...40fdb4d. Read the comment docs.

allModules = Sets.union(modules, ImmutableSet.copyOf(ServiceLoader.load(ApolloModule.class)));
} else {
allModules = modules;
return Sets.union(allModules, ImmutableSet.copyOf(ServiceLoader.load(ApolloModule.class)));
Copy link
Contributor

Choose a reason for hiding this comment

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

We're not doing the deduping against the modules loaded visa ServiceLoader, but I guess that's ok :)

@toweroy toweroy changed the title Extra modules Allow loading extra modules for a Service Sep 8, 2020
@klaraward klaraward merged commit 0fbdb79 into 1.x Sep 8, 2020
@klaraward klaraward deleted the extraModules branch September 8, 2020 11:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants