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

[master] Upgrade dependencies to fix CI cron build #11081

Merged
merged 19 commits into from Jan 18, 2022

Conversation

mkurz
Copy link
Member

@mkurz mkurz commented Dec 30, 2021

Fixes #10971

Currently cron builds fail with:

[error] this can be overridden using libraryDependencySchemes or evictionErrorLevel
[error] (update) found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error] 
[error] 	* org.scala-lang.modules:scala-java8-compat_2.13:1.0.0 (early-semver) is selected over 0.9.1
[error] 	    +- com.typesafe.play:play-framework_2.13:2.8.1+1391-7eb9d1f1+20211230-1736 (depends on 1.0.0)
[error] 	    +- com.typesafe.akka:akka-actor_2.13:2.6.18           (depends on 1.0.0)
[error] 	    +- org.scala-lang.modules:scala-java8-compat_2.13:0.9.1 (depends on 0.9.1)

That is because of following combination:

  • The master branch uses sbt 1.5+ already, which (in contrast to sbt <1.5) fails if it detects major version conflicts
  • The cron build uses the latest akka snaphot which depends on scala-java8-compat 1.x, however Play depends on 0.x

Pull request builds did not fail however because they don't use the latest akka snapshot, but akka version 2.6.14, which did not yet depend on scala-java8-compat 1.x but still on 0.x.
Also cron builds for the 2.8.x branch did not fail because 2.8.x still is on sbt 1.3.13.

So the solution is we just need to upgrade scala-java8-compat to 1.0.2. And not just in Play, but also in play-ws, which luckily was done by Renato with play-ws 2.1.6 already: playframework/play-ws#620 (That was probably because he experienced the same problem when running the scripted tests with sbt 1.5.x when he upgraded akka for the Play 2.8.11 release: https://app.travis-ci.com/github/playframework/playframework/jobs/549889172#L8473).
So basically the problem was solved for the 2.8.11 release already anyway.

I originally tried to fix this in #10969 four month ago, however back then I somehow got lost and also tried to upgrade scala-parser-combinators and also tried to bump play-ws, twirl and interplay to their next major versions, which actually isn't necessary. Looks like I just got confused.

@@ -9,8 +9,8 @@ play.server {
SO_KEEPALIVE = true
TCP_NODELAY = true
TCP_FASTOPEN_CONNECT = true
"io.netty.channel.ChannelOption#TCP_FASTOPEN" = 3
Copy link
Member Author

Choose a reason for hiding this comment

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

Because the cron build for the master branch was broken since month, it never reported that this scripted test actually is broken, also see #11076 (comment)

@mkurz
Copy link
Member Author

mkurz commented Jan 4, 2022

Blocked by akka/akka#30871 unfortunately.

@mkurz
Copy link
Member Author

mkurz commented Jan 7, 2022

Will hopefully be unblocked by akka/akka#31046

@@ -29,7 +29,7 @@ install: jabba install $(jabba ls-remote "adopt@~1.$TRAVIS_JDK.0-0" --latest=pat
stages:
- validations
- test
- cron-test-sbt-1.5.x
- test-sbt-1.6.x
Copy link
Member Author

Choose a reason for hiding this comment

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

IMHO we should run the scripted test for each pr build, not just daily, to catched errors as early as possible. Actually that is what we did until we dropped Scala 2.12: https://github.com/playframework/playframework/pull/10956/files#diff-6ac3f79fc25d95cd1e3d51da53a4b21b939437392578a35ae8cd6d5366ca5485L82
So probably I just forgot to change that back then.

workspaces:
use: published-local
- name: "Run scripted tests (c) for sbt 1.6.x and Scala 2.13.x"
script: scripts/test-scripted $SCRIPTED_SBT_1_6 $TEST_SCALA_2_13 'play-sbt-plugin/*3of3'
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -7,16 +7,16 @@ import Keys._
import buildinfo.BuildInfo

object Dependencies {
val akkaVersion: String = sys.props.getOrElse("akka.version", "2.6.14")
val akkaHttpVersion = sys.props.getOrElse("akka.http.version", "10.1.14")
val akkaVersion: String = sys.props.getOrElse("akka.version", "2.6.18+21-4fb7bd9b-SNAPSHOT")
Copy link
Member Author

Choose a reason for hiding this comment

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

Only temporary, let's use this akka snapshot because it contains akka/akka#31046 to unblock this PR.

public WSRequest setDisableUrlEncoding(boolean disableUrlEncoding) {
return converter.apply(request.setDisableUrlEncoding(disableUrlEncoding));
}

Copy link
Member Author

Choose a reason for hiding this comment

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

These methods were added as part of playframework/play-ws#552

"handle '/pat/resources/BodhiApplication?where={%22name%22:%22hsdashboard%22}' as a valid URI" in makeRequest(
"/pat/resources/BodhiApplication?where={%22name%22:%22hsdashboard%22}"
) {
case (endpoint, response) => {
response.body.string must_=== """/pat/resources/BodhiApplication?where={"name":"hsdashboard"}"""
}
}
*/
Copy link
Member Author

@mkurz mkurz Jan 17, 2022

Choose a reason for hiding this comment

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

For now I disable these it tests, because they are breaking after upgrading to akka-http 10.2.x.
To move on lets fix that later, opened #11113

@@ -30,6 +30,7 @@ object ScriptedTools extends AutoPlugin {

override def projectSettings: Seq[Def.Setting[_]] = Def.settings(
resolvers += Resolver.sonatypeRepo("releases"), // sync BuildSettings.scala
resolvers += Resolver.sonatypeRepo("snapshots"),
Copy link
Member Author

@mkurz mkurz Jan 18, 2022

Choose a reason for hiding this comment

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

We can remove that one later, see #11114. It's needed so scripted tests can fetch the akka snapshot.

@@ -3,7 +3,7 @@
# --- !Ups

CREATE TABLE users (
id bigint(20) NOT NULL AUTO_INCREMENT,
id bigint GENERATED BY DEFAULT AS IDENTITY,
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@octonato octonato left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot merged commit 7c3954f into playframework:master Jan 18, 2022
@mkurz mkurz deleted the version_bumps branch January 18, 2022 11:49
raboof added a commit to raboof/akka that referenced this pull request Mar 17, 2022
This partially reverts akka#31046, but not the changes there that were
needed to unblock playframework/playframework#11081
raboof added a commit to raboof/akka that referenced this pull request Mar 17, 2022
This partially reverts akka#31046, but not the changes there that were
needed to unblock playframework/playframework#11081
raboof added a commit to akka/akka that referenced this pull request Mar 18, 2022
This partially reverts #31046, but not the changes there that were
needed to unblock playframework/playframework#11081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

failed: nightly build failed because of binary incompatible sbt check
2 participants