Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: '11'
java-version: '21'
- uses: actions/cache@v4
with:
path: |
Expand Down
32 changes: 16 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
plugins {
id 'org.springframework.boot' version '2.6.3'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
id 'java'
id "com.netflix.dgs.codegen" version "5.0.6"
id "com.diffplug.spotless" version "6.2.1"
}

version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
targetCompatibility = '11'
sourceCompatibility = '21'
targetCompatibility = '21'

spotless {
java {
Expand All @@ -35,25 +35,25 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-hateoas'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.2'
implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter:4.9.21'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3'
implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter:8.1.1'
Copy link
Author

Choose a reason for hiding this comment

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

🔴 DGS codegen plugin 5.0.6 is incompatible with DGS runtime 8.1.1

The DGS runtime was bumped from 4.9.21 to 8.1.1, but the com.netflix.dgs.codegen plugin was left at version 5.0.6. DGS codegen 5.x generates code targeting the DGS 4.x/5.x API surface, while DGS 8.x has a significantly different API (including the move to Jakarta EE namespaces and updated DGS annotations/types).

Root Cause and Impact

At build.gradle:5, the codegen plugin remains at 5.0.6, while at build.gradle:39 the runtime was updated to 8.1.1. The DGS codegen plugin generates Java source files (into build/generated) that import and use DGS framework classes. When the codegen plugin version doesn't match the runtime version, the generated code references classes/methods that don't exist in the runtime, causing compilation failures.

For example, codegen 5.x may generate code importing from com.netflix.graphql.dgs packages with class signatures matching DGS 4.x/5.x, but DGS 8.x has restructured these packages. The codegen plugin needs to be updated to version 6.x+ (e.g., 6.1.0 or later) to generate code compatible with DGS 8.1.1.

This is a separate issue from the javax.*jakarta.* migration mentioned in the PR description — even after that migration, the generated DGS code will fail to compile due to this version mismatch.

Prompt for agents
In build.gradle, update the DGS codegen plugin version at line 5 from 5.0.6 to a version compatible with DGS runtime 8.1.1. The codegen plugin should be updated to at least version 6.x (e.g., 6.1.0 or 6.2.1) to generate code that is compatible with the DGS 8.x runtime API. Change line 5 from:
    id "com.netflix.dgs.codegen" version "5.0.6"
to something like:
    id "com.netflix.dgs.codegen" version "6.2.1"
Verify the exact compatible version by checking the Netflix DGS compatibility matrix.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

implementation 'org.flywaydb:flyway-core'
implementation 'io.jsonwebtoken:jjwt-api:0.11.2'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.2',
'io.jsonwebtoken:jjwt-jackson:0.11.2'
implementation 'joda-time:joda-time:2.10.13'
implementation 'org.xerial:sqlite-jdbc:3.36.0.3'
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3',
'io.jsonwebtoken:jjwt-jackson:0.12.3'
implementation 'joda-time:joda-time:2.12.5'
implementation 'org.xerial:sqlite-jdbc:3.44.1.0'

compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

testImplementation 'io.rest-assured:rest-assured:4.5.1'
testImplementation 'io.rest-assured:json-path:4.5.1'
testImplementation 'io.rest-assured:xml-path:4.5.1'
testImplementation 'io.rest-assured:spring-mock-mvc:4.5.1'
testImplementation 'io.rest-assured:rest-assured:5.4.0'
testImplementation 'io.rest-assured:json-path:5.4.0'
testImplementation 'io.rest-assured:xml-path:5.4.0'
testImplementation 'io.rest-assured:spring-mock-mvc:5.4.0'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter-test:2.2.2'
testImplementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter-test:3.0.3'
}

tasks.named('test') {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading