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

TSPS-134 Upgrade to Spring Boot 3 and TCL 0.1.9 #61

Merged
merged 6 commits into from
Mar 15, 2024

Conversation

mmorgantaylor
Copy link
Collaborator

@mmorgantaylor mmorgantaylor commented Mar 14, 2024

Description

This PR upgrades TSPS to Spring Boot 3, which involved a few other changes:

  • upgrade to terra-common-lib 0.1.9
  • upgrade other terra service client libraries to jakarta versions
  • note that the new version of Leo's listAppsV2 endpoint doesn't accept a creatorRoleSpecifier, so we removed it, as we weren't using that functionality anyway
  • remove spotbugs (following other services, since we use SonarCloud)
  • convert LeonardoServerConfiguration from a record to a class, because we were getting an error "Non-canonical record constructor must delegate to another constructor" and converting to a class fixed it
  • update the implementation of EmbeddedDataSource for testing based on this

Jira Ticket

https://broadworkbench.atlassian.net/browse/TSPS-134

@mmorgantaylor mmorgantaylor marked this pull request as ready for review March 14, 2024 19:08
handle duplicate job id error

add logging for cbas steps - debugging

still wip

new cbas client

more WIP debugging tests

WIP

WIP

working! pre-cleanup

some cleanup, re-implement spotbugs

trying to get spotbugs to work

remove spotbugs!

cleanup
@mmorgantaylor mmorgantaylor force-pushed the TSPS-134_mma_sb3_round2 branch from db45338 to 5a4277e Compare March 14, 2024 19:21
Copy link
Collaborator

@jsotobroad jsotobroad left a comment

Choose a reason for hiding this comment

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

this is great, id love to hear how you fixed the embedded database issues

Also i wonder if we can use the trace stuff in other clients too (to do in another ticket)

@@ -46,11 +46,6 @@ jobs:
- name: Build the test harness and, by dependency, the service library
run: ./gradlew --build-cache build -x test

- name: Upload spotbugs results
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we remove this because its covered by sonarqube?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, a bunch of other services took this out because sonarqube covers these checks. (noted in PR description)

languageVersion = JavaLanguageVersion.of(17)
}
}
// removing the java toolchain gets rid of a warning about using a deprecated API:
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we want to keep this comment w/o the code its referring to? Not sure it'll make sense without it (would probably ok just getting rid of everything).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah yeah I left this here so we could talk about it more - this is something i'm not sure about

@@ -1,12 +1,19 @@
dependencies {
api 'org.springframework.boot:spring-boot-starter-json'
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we really need spring boot for our client to be created? That seems a bit odd to me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

don't think we do! nice catch

// https://stackoverflow.com/questions/76706612/standard-commons-logging-discovery-in-action-with-spring-jcl
// resolves "Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts"
configureEach {
exclude group: 'commons-logging', module: 'commons-logging'
Copy link
Collaborator

Choose a reason for hiding this comment

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

would it be worth removing this specifically from each dependency instead of doing it for all our dependencies?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

probably yes... i was being lazy because when i took it out of the dependency i expected, it didn't get rid of the warning. i'll work on this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

offline conversation: leave as-is for now

implementation "org.broadinstitute.dsde.workbench:sam-client_2.13:0.1-5a5bf28"
implementation "org.broadinstitute.dsde.workbench:leonardo-client_2.13:1.3.6-22ee00b"
implementation "org.databiosphere:workspacedataservice-client-okhttp-jakarta:0.2.115-20240227.195850-1"
implementation "bio.terra:cbas-client:0.0.199"
implementation "bio.terra:terra-resource-buffer-client:0.4.3-SNAPSHOT"
Copy link
Collaborator

Choose a reason for hiding this comment

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

just noticing this is in here, what is this and does it not need to be updated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nice catch, we don't use this - I think I added it by mistake when adding Stairway a while ago. will remove

@@ -30,7 +32,7 @@ private ApiClient getApiClient() {
var okHttpClientWithTracing =
this.okHttpClient
.newBuilder()
.addInterceptor(new OkHttpClientTracingInterceptor(Tracing.getTracer()))
.addInterceptor(new OkHttpClientTracingInterceptor(openTelemetry))
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we do this for wds as well? i believe they also use okHttp to make their client

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

definitely we can - are you ok if that goes in the tracing ticket (TSPS-107) rather than this PR?

.exceptionSerializer(new StairwayExceptionSerializer(objectMapper)));
}

/** Retrieves Job Result specifying the result class type. */
@Traced
@WithSpan
Copy link
Collaborator

Choose a reason for hiding this comment

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

are there any docs we can link to like in the readme to explain this tracing stuff?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

probably Doug's blog post (which is linked in the tracing ticket), or stuff that's linked in it. do you want me to add that documentation in this PR?

@@ -61,6 +66,13 @@ spring:
url: ${env.db.host}/${env.db.pipelines.name}
username: ${env.db.pipelines.user}

jpa:
# set the following to true to enable SQL logging in JPA
show-sql: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

awesome thanks for the debugging switches!

Copy link
Collaborator

@jsotobroad jsotobroad left a comment

Choose a reason for hiding this comment

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

nice this is awesome!!

Copy link

@mmorgantaylor mmorgantaylor merged commit eb070a9 into main Mar 15, 2024
12 checks passed
@mmorgantaylor mmorgantaylor deleted the TSPS-134_mma_sb3_round2 branch March 15, 2024 15:37
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.

2 participants