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

Centralized all dependencies in TrafficCapture #605

Merged
merged 26 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
919b83c
Create versioons property for all shared dependencies
peternied Apr 23, 2024
acd42f8
Add centralized traffic capture dependencies project
peternied Apr 30, 2024
303782d
Remove all specific version references
peternied Apr 30, 2024
f3d5672
Merge from main
peternied Apr 30, 2024
6e05cd1
Fix missing missing log4j bom reference
peternied Apr 30, 2024
7876810
Resolve testCompile related failures
peternied Apr 30, 2024
bd7f76a
Fix CVE-2024-30171 by updating bouncycastle from 1.74 to 1.78
peternied May 1, 2024
1c3be04
Merge remote-tracking branch 'origin/main' into centralized-dependencies
peternied May 1, 2024
73da977
Remove BOM references
peternied May 1, 2024
af4d7e6
Uniform reference type on dependenices
peternied May 1, 2024
ea2ac5e
Clean up the dependencies
peternied May 1, 2024
8c040bb
Move opentelemetry-sdk-testing into the same group with the other OTL…
peternied May 1, 2024
3394ebd
Merge branch 'main' into centralized-dependencies
peternied May 2, 2024
8c2bdae
Allow unsafe access for netty on jdk11 platform
peternied May 2, 2024
a2df582
Revert "Allow unsafe access for netty on jdk11 platform"
peternied May 2, 2024
ead6d8e
Upload traffic capture test reports
peternied May 2, 2024
7249bb3
Add back info message to Run Tests with Coverage since its stalling
peternied May 2, 2024
1f5891b
Remove constraints from proxy server build
peternied May 3, 2024
55181e9
Upgrade log4j from 2.20.0 to 2.23.1
peternied May 3, 2024
c8f80ff
Switch to implementation so transitive dependencies aren't included
peternied May 4, 2024
f051735
Merge remote-tracking branch 'origin/main' into centralized-dependencies
peternied May 9, 2024
d9ba33e
Fix usage of protobuf
peternied May 9, 2024
f74e186
Small fixes
peternied May 9, 2024
6692086
Switch depedencies to API type so they are applied in test cases as well
peternied May 9, 2024
162bea9
Fix replaying failing to start up
peternied May 10, 2024
38cfe19
exclude netty from security plugin
peternied May 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/gradle-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ jobs:
env:
OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED: ''

- uses: actions/upload-artifact@v4
if: always()
with:
name: traffic-capture-test-reports
path: |
./TrafficCapture/*/build/reports/

- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
1 change: 1 addition & 0 deletions TrafficCapture/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'jacoco'
id 'org.owasp.dependencycheck' version '8.2.1'
id 'io.freefair.lombok' version '8.6' apply false
peternied marked this conversation as resolved.
Show resolved Hide resolved
}

allprojects {
Expand Down
36 changes: 14 additions & 22 deletions TrafficCapture/captureKafkaOffloader/build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@

plugins {
id 'org.opensearch.migrations.java-library-conventions'
id("io.freefair.lombok") version "8.0.1"
id 'io.freefair.lombok'
}

repositories {
mavenCentral()
}

dependencies {
api project(":trafficCaptureDependencies")
implementation project(':captureOffloader')
implementation project(':coreUtilities')
implementation group: 'com.google.protobuf', name:'protobuf-java', version:'3.22.2'
api group:'io.netty', name:'netty-buffer', version: '4.1.100.Final'
implementation group: 'org.projectlombok', name:'lombok', version:'1.18.26'
implementation group: 'org.apache.kafka', name:'kafka-clients', version:'3.6.0'
implementation group: 'org.slf4j', name:'slf4j-api', version:'2.0.7'
implementation group: 'software.amazon.msk', name:'aws-msk-iam-auth', version:'2.0.3'
implementation group: 'com.google.protobuf', name:'protobuf-java'
api group:'io.netty', name:'netty-buffer'
implementation group: 'org.projectlombok', name:'lombok'
implementation group: 'org.apache.kafka', name:'kafka-clients'
implementation group: 'org.slf4j', name:'slf4j-api'
implementation group: 'software.amazon.msk', name:'aws-msk-iam-auth'

testImplementation project(':captureProtobufs')
testImplementation testFixtures(project(path: ':coreUtilities'))
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl', version: '2.20.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.6.1'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '4.6.1'
testImplementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl'
testImplementation group: 'org.mockito', name: 'mockito-core'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter'
testImplementation group: 'org.slf4j', name: 'slf4j-api'
}


configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'io.netty') {
details.useVersion '4.1.100.Final'
}
}
}
21 changes: 11 additions & 10 deletions TrafficCapture/captureOffloader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

plugins {
id 'org.opensearch.migrations.java-library-conventions'
id("io.freefair.lombok") version "8.0.1"
id 'io.freefair.lombok'
id 'java-test-fixtures'
}

Expand All @@ -20,21 +20,22 @@ sourceSets {
}
}
dependencies {
api group: 'io.netty', name: 'netty-buffer', version: '4.1.100.Final'
api project(":trafficCaptureDependencies")
api group: 'io.netty', name: 'netty-buffer'

implementation project(':captureProtobufs')
implementation project(':coreUtilities')
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.22.2'
implementation group: 'org.projectlombok', name: 'lombok', version: '1.18.26'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
implementation group: 'com.google.protobuf', name: 'protobuf-java'
implementation group: 'org.projectlombok', name: 'lombok'
implementation group: 'org.slf4j', name: 'slf4j-api'

testImplementation project(':coreUtilities')
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl', version: '2.20.0'
testImplementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl'
testImplementation group: 'org.slf4j', name: 'slf4j-api'

testFixturesImplementation project(':captureProtobufs')
testFixturesImplementation project(':coreUtilities')
testFixturesImplementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.22.2'
testFixturesImplementation group: 'com.google.protobuf', name: 'protobuf-java'
}
3 changes: 2 additions & 1 deletion TrafficCapture/captureProtobufs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ repositories {
}

dependencies {
api "com.google.protobuf:protobuf-java:3.22.2"
api project(":trafficCaptureDependencies")
api "com.google.protobuf:protobuf-java"
}

protobuf {
Expand Down
41 changes: 10 additions & 31 deletions TrafficCapture/coreUtilities/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,65 +18,44 @@ buildscript {

plugins {
id 'org.opensearch.migrations.java-library-conventions'
// id "com.github.spotbugs" version "4.7.3"
// id 'checkstyle'
id "io.freefair.lombok" version "8.0.1"
id 'io.freefair.lombok'
id 'java'
id 'java-test-fixtures'
}

//spotbugs {
// includeFilter = new File(rootDir, 'config/spotbugs/spotbugs-include.xml')
//}

//checkstyle {
// toolVersion = '10.12.3'
// configFile = new File(rootDir, 'config/checkstyle/checkstyle.xml')
// System.setProperty('checkstyle.cache.file', String.format('%s/%s',
// buildDir, 'checkstyle.cachefile'))
//}

repositories {
mavenCentral()
}

dependencies {
api platform("io.opentelemetry:opentelemetry-bom:1.34.1")
api project(":trafficCaptureDependencies")
peternied marked this conversation as resolved.
Show resolved Hide resolved

implementation project(':captureProtobufs')

implementation "com.google.protobuf:protobuf-java:3.22.2"
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
implementation "com.google.protobuf:protobuf-java"
implementation group: 'org.slf4j', name: 'slf4j-api'

testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl'

// Log4j
implementation(platform("org.apache.logging.log4j:log4j-bom:2.21.1"))
implementation group: 'org.apache.logging.log4j', name: 'log4j-api'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core'
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl', version: '2.20.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl'

// OpenTelemetry core
api group: 'io.opentelemetry', name: 'opentelemetry-api'
api group: 'io.opentelemetry', name: 'opentelemetry-sdk'
implementation group: 'io.opentelemetry', name: 'opentelemetry-exporter-otlp'
implementation group: 'io.opentelemetry.semconv', name: 'opentelemetry-semconv', version: '1.23.1-alpha'
implementation group: 'io.opentelemetry.semconv', name: 'opentelemetry-semconv'

testFixturesApi group: 'io.opentelemetry', name: 'opentelemetry-api'
testFixturesApi group: 'io.opentelemetry', name: 'opentelemetry-sdk'
testFixturesApi group: 'io.opentelemetry', name: 'opentelemetry-sdk-testing'
testFixturesImplementation platform("io.opentelemetry:opentelemetry-bom:1.34.1")
testFixturesImplementation group: 'io.opentelemetry', name: 'opentelemetry-api'
testFixturesImplementation group: 'io.opentelemetry', name: 'opentelemetry-sdk-testing'
testFixturesImplementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
}

configurations.all {
resolutionStrategy {
force 'com.squareup.okio:okio-jvm:3.4.0'
}
testFixturesImplementation group: 'org.slf4j', name: 'slf4j-api'
}

tasks.named('test') {
Expand Down
26 changes: 13 additions & 13 deletions TrafficCapture/nettyWireLogging/build.gradle
peternied marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@

plugins {
id 'org.opensearch.migrations.java-library-conventions'
id("io.freefair.lombok") version "8.0.1"
id 'io.freefair.lombok'
}

dependencies {
implementation platform("io.netty:netty-bom:4.1.100.Final")
api project(":trafficCaptureDependencies")

implementation project(':captureOffloader')
implementation project(':coreUtilities')
api group: 'io.netty', name: 'netty-buffer', version: '4.1.100.Final'
api group: 'io.netty', name: 'netty-codec-http', version: '4.1.108.Final'
api group: 'io.netty', name: 'netty-handler', version: '4.1.100.Final'
api group: 'io.netty', name: 'netty-buffer'
api group: 'io.netty', name: 'netty-codec-http'
api group: 'io.netty', name: 'netty-handler'

implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
implementation group: 'org.slf4j', name: 'slf4j-api'

testImplementation project(':captureProtobufs')
testImplementation group: 'com.google.guava', name: 'guava', version: '32.0.1-jre'
testImplementation group: 'com.google.protobuf', name: 'protobuf-java', version:'3.22.2'
testImplementation group: 'com.google.guava', name: 'guava'
testImplementation group: 'com.google.protobuf', name: 'protobuf-java'
testImplementation group: 'io.opentelemetry', name: 'opentelemetry-sdk-testing'
testImplementation group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.2.1'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.20.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl', version: '2.20.0'
testImplementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
testImplementation group: 'org.apache.httpcomponents.client5', name: 'httpclient5'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl'
testImplementation group: 'org.slf4j', name: 'slf4j-api'

testImplementation testFixtures(project(path: ':testUtilities'))
testImplementation testFixtures(project(path: ':coreUtilities'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ buildscript {
}

plugins {
id("io.freefair.lombok") version "8.0.1"
id 'io.freefair.lombok'
}

dependencies {
implementation project(':replayerPlugins:jsonMessageTransformers:jsonMessageTransformerInterface')

implementation group: 'io.burt', name: 'jmespath-core', version: '0.6.0'
implementation group: 'org.slf4j', name:"slf4j-api", version:"2.0.7"
implementation group: 'io.burt', name: 'jmespath-core'
implementation group: 'org.slf4j', name:"slf4j-api"

testImplementation project(':trafficReplayer')
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-api', version:'5.9.3'
testRuntimeOnly group:'org.junit.jupiter', name:'junit-jupiter-engine', version:'5.x.x'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-api'
testRuntimeOnly group:'org.junit.jupiter', name:'junit-jupiter-engine'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ buildscript {
}

plugins {
id "io.freefair.lombok" version "8.0.1"
id 'io.freefair.lombok'
}

dependencies {
implementation project(':replayerPlugins:jsonMessageTransformers:jsonMessageTransformerInterface')
implementation project(':replayerPlugins:jsonMessageTransformers:jsonJMESPathMessageTransformer')

implementation group: 'io.burt', name: 'jmespath-core', version: '0.6.0'
implementation group: 'io.burt', name: 'jmespath-core'

testImplementation project(':trafficReplayer')
testImplementation testFixtures(project(path: ':testUtilities'))
testImplementation testFixtures(project(path: ':trafficReplayer'))

testImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.15.0'
testImplementation group: 'io.netty', name: 'netty-all', version: '4.1.100.Final'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-api', version:'5.9.3'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-params', version:'5.9.3'
testImplementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
testRuntimeOnly group:'org.junit.jupiter', name:'junit-jupiter-engine', version:'5.x.x'
testImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
testImplementation group: 'io.netty', name: 'netty-all'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-api'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-params'
testImplementation group: 'org.slf4j', name: 'slf4j-api'
testRuntimeOnly group:'org.junit.jupiter', name:'junit-jupiter-engine'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ buildscript {
}

plugins {
id("io.freefair.lombok") version "8.0.1"
id 'io.freefair.lombok'
}

dependencies {
implementation project(':replayerPlugins:jsonMessageTransformers:jsonMessageTransformerInterface')

implementation group: 'com.bazaarvoice.jolt', name: 'jolt-core', version: '0.1.7'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.15.0'
implementation group: 'org.slf4j', name:"slf4j-api", version:"2.0.7"
implementation group: 'com.bazaarvoice.jolt', name: 'jolt-core'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
implementation group: 'org.slf4j', name:"slf4j-api"

testImplementation project(':trafficReplayer')
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-api', version:'5.9.3'
testRuntimeOnly group:'org.junit.jupiter', name:'junit-jupiter-engine', version:'5.x.x'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-api'
testRuntimeOnly group:'org.junit.jupiter', name:'junit-jupiter-engine'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

plugins {
id "io.freefair.lombok" version "8.0.1"
id 'io.freefair.lombok'
}

dependencies {
Expand All @@ -19,12 +19,12 @@ dependencies {
testImplementation testFixtures(project(path: ':testUtilities'))
testImplementation testFixtures(project(path: ':trafficReplayer'))

testImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.15.0'
testImplementation group: 'io.netty', name: 'netty-all', version: '4.1.100.Final'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-api', version:'5.9.3'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-params', version:'5.9.3'
testImplementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7'
testRuntimeOnly group:'org.junit.jupiter', name:'junit-jupiter-engine', version:'5.x.x'
testImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
testImplementation group: 'io.netty', name: 'netty-all'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-api'
testImplementation group: 'org.junit.jupiter', name:'junit-jupiter-params'
testImplementation group: 'org.slf4j', name: 'slf4j-api'
testRuntimeOnly group:'org.junit.jupiter', name:'junit-jupiter-engine'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ buildscript {
plugins {
id 'org.opensearch.migrations.java-library-conventions'
id 'org.owasp.dependencycheck' version '8.2.1'
id "io.freefair.lombok" version "8.0.1"
id 'io.freefair.lombok'
}

repositories {
mavenCentral()
}

dependencies {
api project(":trafficCaptureDependencies")
}

tasks.named('test') {
Expand Down
Loading
Loading