Repository navigation
Move junit to test scope and bump it to 4.13.2 - #262
Open
deepika-lalwani123 wants to merge 1 commit into
Open
deepika-lalwani123 wants to merge 1 commit into
deepika-lalwani123 wants to merge 1 commit into
Conversation
The root POM declared junit 4.12 in <dependencies> with no scope, so
every module, including delta-api and the delta-app system artifact,
got junit 4.12 and hamcrest-core 1.3 at compile scope. Image scanning
of gcr.io/cdapio/cdap reports
/opt/cdap/master/artifacts/delta-app-*.jar/lib/junit-4.12.jar, and
delta-api passes junit 4.12 on to the delta plugins (mysql and
datastream plugin jars also package junit-4.12.jar).
junit is now test scope in the root POM. delta-test is a test-utility
library whose mocks in src/main use JUnit (MockTableAssessor), so it
declares junit itself at compile scope; users of delta-test still get
junit transitively.
Versions:
- junit 4.12 (compile, root pom) -> 4.13.2 (test scope, junit.version);
delta-test declares junit ${junit.version} at compile scope
Bugs: b/578455300 closes once database-delta DBD-1 and datastream
DS-1 also land (they stop pulling junit from delta-api 0.9.0).
Risk: very low. No code change. Only consumers that relied on
delta-api to provide junit at compile scope are affected; delta-test
users keep it.
Testing: JDK 8. mvn -T 4 clean install: BUILD SUCCESS, Checkstyle 0
violations, 101 unit tests pass (delta-api, delta-proto, delta-app
incl. DeltaWorkerTest, PipelineDBStoreTest, AssessmentHandlerTest).
mvn dependency:tree -Dincludes=junit,org.hamcrest: delta, delta-api,
delta-proto and delta-app show only junit:4.13.2:test; delta-test shows
junit:4.13.2:compile. unzip -l delta-app/target/delta-app-*.jar shows
no junit or hamcrest under lib/ (6 lib jars).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move junit to test scope and bump it to 4.13.2
Repo: data-integrations/delta
Commit: c2c939c
Part of the CVE fixes for the CDAP 6.11.2 patch release (container image scanning of gcr.io/cdapio/cdap).
The root POM declared junit 4.12 in with no scope, so
every module, including delta-api and the delta-app system artifact,
got junit 4.12 and hamcrest-core 1.3 at compile scope. Image scanning
of gcr.io/cdapio/cdap reports
/opt/cdap/master/artifacts/delta-app-*.jar/lib/junit-4.12.jar, and
delta-api passes junit 4.12 on to the delta plugins (mysql and
datastream plugin jars also package junit-4.12.jar).
junit is now test scope in the root POM. delta-test is a test-utility
library whose mocks in src/main use JUnit (MockTableAssessor), so it
declares junit itself at compile scope; users of delta-test still get
junit transitively.
Versions:
delta-test declares junit ${junit.version} at compile scope
The junit 4.12 findings close once data-integrations/database-delta-plugins#300
and data-integrations/datastream-delta-plugins#155 also land (they stop
pulling junit from delta-api 0.9.0).
Risk: very low. No code change. Only consumers that relied on
delta-api to provide junit at compile scope are affected; delta-test
users keep it.
Testing: JDK 8. mvn -T 4 clean install: BUILD SUCCESS, Checkstyle 0
violations, 101 unit tests pass (delta-api, delta-proto, delta-app
incl. DeltaWorkerTest, PipelineDBStoreTest, AssessmentHandlerTest).
mvn dependency:tree -Dincludes=junit,org.hamcrest: delta, delta-api,
delta-proto and delta-app show only junit:4.13.2:test; delta-test shows
junit:4.13.2:compile. unzip -l delta-app/target/delta-app-*.jar shows
no junit or hamcrest under lib/ (6 lib jars).