Upgrade dependencies to reduce downstream conflicts
- Dominant language
- Scala
- Stars
- 6.8k
- Forks
- 1.2k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 2
Description
There are some libraries that use older akka related libraries and this causes downstream (e.g., runtimes repos) to fail during the build step. Several of these dependencies can be resolved by removing unused artifacts (e.g., #5131) but not all.
In particular these two import older version of akka-http (10.1.10) and should be updated:
- akka-grpc-runtime_2.12:0.7.2
- com.lightbend.akka:akka-stream-alpakka-s3_2.12:1.1.2
As a workaround for downstream projects once PR #5130 is merged: apply the following patch:
### add explicit dependencies to `tests/build.gradle`:
```patch
+gradle.ext.akka_http = [version : '10.2.4']
diff --git a/tests/build.gradle b/tests/build.gradle
index 1ae5a4b..b300fa0 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -37,6 +37,8 @@ dependencies {
compile "org.scala-lang:scala-library:${gradle.scala.version}"
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
+ implementation group: 'com.typesafe.akka', name: "akka-http2-support_${gradle.scala.depVersion}", version: "${gradle.akka_http.version}"
+ implementation group: 'com.typesafe.akka', name: "akka-http-xml_${gradle.scala.depVersion}", version: "${gradle.akka_http.version}"
}
```
### declare some variables in `settings.grade`
```patch
diff --git a/settings.gradle b/settings.gradle
index 9af38c8..1d50fa6 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -29,6 +29,7 @@ gradle.ext.openwhisk = [
gradle.ext.scala = [
version: '2.12.7',
+ depVersion : '2.12',
```
Without the PR, you also to apply the same to these libraries:
- `akka-cluster-metrics`
- `akka-discovery`
- `akka-protobuf`
- `akka-remote`
- `akka-cluster`
- `akka-distributed-data`
- `akka-cluster-tools`
```patch
diff --git a/tests/build.gradle b/tests/build.gradle
index 1ae5a4b..9df67dd 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -37,6 +37,15 @@ dependencies {
compile "org.scala-lang:scala-library:${gradle.scala.version}"
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
+ implementation group: 'com.typesafe.akka', name: "akka-http2-support_${gradle.scala.depVersion}", version: "${gradle.akka_http.version}"
+ implementation group: 'com.typesafe.akka', name: "akka-http-xml_${gradle.scala.depVersion}", version: "${gradle.akka_http.version}"
+ implementation group: 'com.typesafe.akka', name: "akka-discovery_${gradle.scala.depVersion}", version: "${gradle.akka.version}"
+ implementation group: 'com.typesafe.akka', name: "akka-protobuf_${gradle.scala.depVersion}", version: "${gradle.akka.version}"
+ implementation group: 'com.typesafe.akka', name: "akka-remote_${gradle.scala.depVersion}", version: "${gradle.akka.version}"
+ implementation group: 'com.typesafe.akka', name: "akka-cluster-metrics_${gradle.scala.depVersion}", version: "${gradle.akka.version}"
+ implementation group: 'com.typesafe.akka', name: "akka-cluster_${gradle.scala.depVersion}", version: "${gradle.akka.version}"
+ implementation group: 'com.typesafe.akka', name: "akka-cluster-tools_${gradle.scala.depVersion}", version: "${gradle.akka.version}"
+ implementation group: 'com.typesafe.akka', name: "akka-distributed-data_${gradle.scala.depVersion}", version: "${gradle.akka.version}"
}
```
and an additional variable is needed in `settings.gradle`
```patch
diff --git a/settings.gradle b/settings.gradle
index 9af38c8..838ba1f 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -29,6 +29,7 @@ gradle.ext.openwhisk = [
gradle.ext.scala = [
version: '2.12.7',
+ depVersion : '2.12',
compileFlags: ['-feature', '-unchecked', '-deprecation', '-Xfatal-warnings', '-Ywarn-unused-import']
]
@@ -36,3 +37,6 @@ gradle.ext.scalafmt = [
version: '1.5.0',
config: new File(rootProject.projectDir, '.scalafmt.conf')
]
+
+gradle.ext.akka = [version : '2.6.12']
+gradle.ext.akka_http = [version : '10.2.4']
```
Contributor guide
Research direction
Start with settings.gradle and tests/build.gradle, then inspect the listed Akka-related dependency declarations and the workaround associated with PR #5130. Verify that the specified Akka HTTP and Akka modules resolve to the intended versions without older transitive conflicts, and confirm the downstream build no longer fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100