-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2061 +/- ##
=============================================
- Coverage 57.73% 57.67% -0.07%
- Complexity 4076 4128 +52
=============================================
Files 754 755 +1
Lines 37256 37262 +6
Branches 4031 4031
=============================================
- Hits 21511 21491 -20
- Misses 14310 14340 +30
+ Partials 1435 1431 -4
Continue to review full report at Codecov.
|
444c1f7
to
141cfc6
Compare
|
||
// This is used for cleaning up the POM. | ||
toBeShaded | ||
compile.extendsFrom(toBeShaded) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the difference between shadow
, explicitShadow
, and toBeShaded
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. It's a bit messy:
shadow
refers to dependencies that we expect to be available on the classpath at runtime, if one is running with the shadow JAR.compile
refers to dependencies needed at compile time.explicitShadow
is a thing we use to mean "needed at both compile time and runtime-with-shadow-JAR" - the shadow configuration doesn't automatically inherit fromcompile
. Usually this is for dependencies we are not shading. If not we have to write each dependency twice.toBeShaded
is purely for readability (I find 'compile' meaning 'not in the shadow jar at runtime' pretty unintuitive, especially since normal runtime inherits from compile). This would be functionally unchanged if we just usedcompile
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably document this somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've integrated the above into the feign project's build.gradle.
The AtlasDbHttpClients -> AtlasDbFeignTargetFactory changes look good. Is the reason for that change that we want to contain all shaded feign references to that project? |
@nziebart Yep. Dealing with shaded classes outside a place where it's shaded is OK in Gradle, but Idea will complain horribly - see GradleUp/shadow#264 and https://youtrack.jetbrains.com/issue/IDEA-163411. We could have just shaded it in the projects they already are in (that's client, config and tests-shared) but I prefer this arrangement, mainly for 2 reasons:
Also I always found it a bit strange that a lot of the http stuff was in a project called config, so I think sticking it in its own project makes sense, and was something worth doing as part of this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Of course, provided we made sure that internal products pass their tests with some reasonable effort -- will discuss offline.
Goals (and why): (copypasted from Shade Feign I: #2054)
Shade Feign, so that several internal products (including shopping and blob store) will not explode from dependency conflicts. In the current state this is largely an outline of how I intend to implement this across Feign-using AtlasDB projects.
Implementation Description (bullets):
Much simpler than Shade Feign I.
atlasdb-feign
that absorbs all the HTTP things.AtlasDbHttpClients
is unchanged.Concerns (what feedback would you like?):
atlasdb-feign
now. Referencing the shaded jar is unfortunately less pleasant than I hoped - IntelliJ IDEA unable to resolve classes of project dependency shadow jar GradleUp/shadow#264 and https://youtrack.jetbrains.com/issue/IDEA-163411atlasdb-service-server
's tests are a little janky, but I didn't feel like exposing a customRetryer
other than ourFailoverFeignTarget
for the feign target factory.Where should we start reviewing?:
atlasdb-feign/build.gradle
Priority (whenever / two weeks / yesterday): ASAP, release blocking
This change is