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

[WOR-1212] Update workbenchLibs version. #2503

Merged
merged 9 commits into from
Aug 25, 2023
Merged

[WOR-1212] Update workbenchLibs version. #2503

merged 9 commits into from
Aug 25, 2023

Conversation

cahrens
Copy link
Contributor

@cahrens cahrens commented Aug 24, 2023

Ticket: https://broadworkbench.atlassian.net/browse/WOR-1212

My initial goal was just to update to the newest workbench libs version so it was using the Rawls model version specified in #2500, but this change became more complicated because a lot of 3rd party libraries were updated recently in workbench libs.

Given that we would eventually need to tackle this update, I figured it was worth sorting through the various issues now.


PR checklist

  • Include the JIRA issue number in the PR description and title
  • Make sure Swagger is updated if API changes
    • ...and Orchestration's Swagger too!
  • If you changed anything in model/, then you should publish a new official rawls-model and update rawls-model in Orchestration's dependencies.
  • Get two thumbsworth of PR review
  • Verify all tests go green, including CI tests
  • Squash commits and merge to develop (branches are automatically deleted after merging)
  • Inform other teams of any substantial changes via Slack and/or email

@cahrens cahrens changed the title Try updating workbenchLibs versions (WOR-1212). [WOR-1212] Try updating workbenchLibs versions. Aug 24, 2023
@cahrens
Copy link
Contributor Author

cahrens commented Aug 24, 2023

jenkins retest

@@ -15,8 +15,7 @@ object Merging {
case PathList("javax", "ws", "rs", _ @_*) => MergeStrategy.first
case "version.conf" => MergeStrategy.concat
case "logback.xml" => MergeStrategy.first
case x if x.endsWith("kotlin-stdlib.kotlin_module") => MergeStrategy.first
case x if x.endsWith("kotlin-stdlib-common.kotlin_module") => MergeStrategy.first
case x if x.endsWith("kotlin_module") => MergeStrategy.preferProject
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was getting the errors below in the automation build. I decided to just generalize the check, but please let me know if this is a bad approach… I really don't know much the merging strategy.

19:37:59 [info] Built: /working/google/target/scala-2.13/workbench-google-assembly-0.1-22c0a38-SNAP.jar
19:37:59 [info] Jar hash: e4ba67591bc5301b5203a65e2c6c9e3205e0c770
19:38:31 [info] done compiling
19:38:56 [error] 2 error(s) were encountered during the merge:
19:39:18 [error] 2 error(s) were encountered during the merge:
19:39:18 [error] java.lang.RuntimeException: 
19:39:18 [error] Deduplicate found different file contents in the following:
19:39:18 [error]   Jar name = auto-value-1.10.2.jar, jar org = com.google.auto.value, entry target = META-INF/kotlin-stdlib-jdk7.kotlin_module
19:39:18 [error]   Jar name = kotlin-stdlib-jdk7-1.6.10.jar, jar org = org.jetbrains.kotlin, entry target = META-INF/kotlin-stdlib-jdk7.kotlin_module
19:39:18 [error] Deduplicate found different file contents in the following:
19:39:18 [error]   Jar name = auto-value-1.10.2.jar, jar org = com.google.auto.value, entry target = META-INF/kotlin-stdlib-jdk8.kotlin_module
19:39:18 [error]   Jar name = kotlin-stdlib-jdk8-1.6.10.jar, jar org = org.jetbrains.kotlin, entry target = META-INF/kotlin-stdlib-jdk8.kotlin_module

@cahrens
Copy link
Contributor Author

cahrens commented Aug 25, 2023

jenkins retest

@@ -5,14 +5,14 @@ object Dependencies {

val akkaV = "2.6.8"
val akkaHttpV = "10.2.0"
val jacksonV = "2.14.1"
val jacksonV = "2.15.2"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed to update Jackson because workbenchLibs updated to this version, and we were getting mismatches in automation:

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Scala module 2.14.1 requires Jackson Databind version >= 2.14.0 and < 2.15.0 - Found jackson-databind version 2.15.2

@@ -61,7 +61,7 @@ class AuthDomainGroupRoleSpec extends AnyFreeSpec with WorkspaceFixtures with Gr
AuthDomainMatcher.checkVisibleAndAccessible(projectName, workspaceName, List(groupName))(studentToken)

// remove "student" from billing project
Rawls.billing.removeUserFromBillingProject(projectName, student.email, BillingProjectRole.Owner)(
Rawls.billingV2.removeUserFromBillingProject(projectName, student.email, BillingProjectRole.Owner)(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because the newer version of workbenchLibs no longer has the v1 code. The revert of the v1 API deletion reintroduced Rawls.billing calls in this file.

@@ -7,7 +7,7 @@ import cats.effect.unsafe.implicits.global
import cats.effect.{IO, LiftIO}
import cats.implicits.{
catsSyntaxApplicativeError,
catsSyntaxApply,
catsSyntaxApplyOps,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cats changes required by workbenchLibs updates

@@ -15,8 +15,7 @@ object Merging {
case PathList("javax", "ws", "rs", _ @_*) => MergeStrategy.first
case "version.conf" => MergeStrategy.concat
case "logback.xml" => MergeStrategy.first
case x if x.endsWith("kotlin-stdlib.kotlin_module") => MergeStrategy.first
case x if x.endsWith("kotlin-stdlib-common.kotlin_module") => MergeStrategy.first
case x if x.endsWith("kotlin_module") => MergeStrategy.first
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was getting the errors below in the automation build. I decided to just generalize the check, but please let me know if this is a bad approach… I really don't know much the merging strategy.

19:37:59 [info] Built: /working/google/target/scala-2.13/workbench-google-assembly-0.1-22c0a38-SNAP.jar
19:37:59 [info] Jar hash: e4ba67591bc5301b5203a65e2c6c9e3205e0c770
19:38:31 [info] done compiling
19:38:56 [error] 2 error(s) were encountered during the merge:
19:39:18 [error] 2 error(s) were encountered during the merge:
19:39:18 [error] java.lang.RuntimeException: 
19:39:18 [error] Deduplicate found different file contents in the following:
19:39:18 [error]   Jar name = auto-value-1.10.2.jar, jar org = com.google.auto.value, entry target = META-INF/kotlin-stdlib-jdk7.kotlin_module
19:39:18 [error]   Jar name = kotlin-stdlib-jdk7-1.6.10.jar, jar org = org.jetbrains.kotlin, entry target = META-INF/kotlin-stdlib-jdk7.kotlin_module
19:39:18 [error] Deduplicate found different file contents in the following:
19:39:18 [error]   Jar name = auto-value-1.10.2.jar, jar org = com.google.auto.value, entry target = META-INF/kotlin-stdlib-jdk8.kotlin_module
19:39:18 [error]   Jar name = kotlin-stdlib-jdk8-1.6.10.jar, jar org = org.jetbrains.kotlin, entry target = META-INF/kotlin-stdlib-jdk8.kotlin_module

@cahrens cahrens changed the title [WOR-1212] Try updating workbenchLibs versions. [WOR-1212] Update workbenchLibs version. Aug 25, 2023
@cahrens cahrens marked this pull request as ready for review August 25, 2023 18:16
Copy link
Contributor

@blakery blakery left a comment

Choose a reason for hiding this comment

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

Looks like this was a headache to go through.
Thank you for taking it on.

@cahrens cahrens merged commit 0bdfcad into develop Aug 25, 2023
12 checks passed
@cahrens cahrens deleted the WOR-1188 branch August 25, 2023 18:48
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.

3 participants