Upgrade to Java 17 and update dependencies#567
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Upgrade to Java 17 and update dependencies#567devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
Co-Authored-By: vanessa.salas <vanessa.salas@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades
build.gradleto target Java 17 and bumps core plugins and dependencies:sourceCompatibility/targetCompatibility→172.6.3→2.7.18io.spring.dependency-management1.0.11.RELEASE→1.0.15.RELEASEcom.diffplug.spotless6.2.1→6.22.0mybatis-spring-boot-starter(+ test starter)2.2.2→2.3.2graphql-dgs-spring-boot-starter4.9.21→5.5.1io.jsonwebtokenJJWT0.11.2→0.11.5org.xerial:sqlite-jdbc3.36.0.3→3.42.0.0io.rest-assured:*4.5.1→5.3.2--add-opensJVM args to thetesttask for Java 17 module encapsulation.Deviations from the requested spec (needed to get
./gradlew clean buildgreen):com.netflix.dgs.codegenplugin: requested5.6.8does not exist on Maven Central (the 5.x line jumps from 5.4.x to 5.12.x). Used5.12.4instead.graphql-javato18.5, but DGS 5.5.1 requires[19.2, 20)and fails at runtime withNoSuchMethodErrorinFederation.java. Added aresolutionStrategyforcinggraphql-java:19.2.rest-assured-commonandspring-commonsto4.5.1, causing aNoSuchMethodErrorinParamConfigat runtime. Added aresolutionStrategyforcing allio.rest-assured:*artifacts to5.3.2.PageInfotypeMapping: DGS codegen 5.12.4 now generates aPageInfotype from the schema, but the existingArticleDatafetcher/CommentDatafetchercode usesgraphql.relay.PageInfo(viaDefaultPageInfo). AddedtypeMapping = ["PageInfo": "graphql.relay.PageInfo"]to thegenerateJavatask so the generated connections keep usinggraphql.relay.PageInfo. This avoids touching the datafetcher source code.spotlessApplyreformattedDefaultJwtServiceTest.java(unavoidable under the new Spotless version)../gradlew clean buildpasses locally on Java 17 (all 68 tests green).Review & Testing Checklist for Human
com.netflix.dgs.codegenversion substitution (5.12.4instead of the requested-but-nonexistent5.6.8) is acceptable, or specify a different version.resolutionStrategy.eachDependencyoverrides (graphql-java:19.2,io.rest-assured:*:5.3.2). These were added to resolve transitive version conflicts between the Spring Boot 2.7 BOM and DGS 5.5.1 / rest-assured 5.3.2. Make sure forcing these versions doesn't conflict with any other requirements you have in mind.typeMappingadded to thegenerateJavatask. It's the least-invasive way to preserve the existinggraphql.relay.PageInfousage, but an alternative would be to rewrite the datafetchers to use the generatedio.spring.graphql.types.PageInfo../gradlew bootRun, then hit/tags, register/login via REST (POST /users,POST /users/login), create an article, and exercise the GraphQL endpoint (/graphiql) — especially paginated queries (articles,feed) since they touch the upgraded DGS +PageInfoplumbing..github/workflows/gradle.yml) still pins Java 11; CI will need Java 17 to build after this PR (not changed here, intentionally out of scope — flagging so you can update it alongside this change).Notes
clean/buildGradle warning aboutspotlessJavamissing implicit task dependencies is pre-existing and unrelated to this upgrade.Link to Devin session: https://app.devin.ai/sessions/e2be5da860b24acc915d6e640607dc9f
Requested by: @vanessasalas-cog