Repository navigation
Upgrade Spring Boot to 2.7.18 (DGS 5.6.2, MyBatis starter 2.3.2, sqlite-jdbc 3.49.1.0) - #1252
devin-ai-integration[bot] wants to merge 8 commits into
Conversation
…sqlite-jdbc 3.49.1.0 Co-Authored-By: joel.oshea <joel.oshea@cognition.ai>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
Note
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
✅ Devin Review: No Issues Found
Devin Review analyzed this PR and found no bugs or issues to report.
Custom reviewers
…26-24734 fixes Co-Authored-By: joel.oshea <joel.oshea@cognition.ai>
…1264) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: joel.oshea <joel.oshea@cognition.ai>
… REST Assured 5.5.7) (#1265) * Apply OpenRewrite UpgradeSpringBoot_3_5 recipe (rewrite-spring via rewrite-recipe-bom 3.37.0) Co-Authored-By: joel.oshea <joel.oshea@cognition.ai> * Finish Boot 3.5 upgrade by hand: DGS 10.6.0, MyBatis 3.0.5, Boot-managed REST Assured 5.5.7, sqlite-jdbc 3.54.1.0, permit ERROR dispatch, unwrapped JSON for /graphql Co-Authored-By: joel.oshea <joel.oshea@cognition.ai> * Override Boot-managed Jackson (2.21.7) and Tomcat (10.1.59) to patch releases that fix new advisories Co-Authored-By: joel.oshea <joel.oshea@cognition.ai> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: joel.oshea <joel.oshea@cognition.ai>
There was a problem hiding this comment.
Note
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
Devin Review found 3 findings. Devin's session did not pick them up; all 3 findings are left for you to triage below.
| 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.5' | ||
| implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter:10.6.0' |
There was a problem hiding this comment.
🟡 Legacy GraphQL routes no longer work
Replacing graphql-dgs-spring-boot-starter drops GET query execution and the schema JSON endpoint. GET /graphql requests with JSON bodies return 405; authenticated GET /schema.json requests return 404. Existing query clients and schema tooling lose these routes.
Learn more
DGS 5.6.2 registered DgsRestController.graphql without an HTTP method restriction and enabled DgsRestSchemaJsonController by default. Spring Boot 3.5.16's GraphQlWebMvcAutoConfiguration.graphQlRouterFunction executes GraphQL only for POST requests and explicitly returns 405 for GET requests. It does not register the old schema JSON endpoint. The catch-all authentication rule in securityFilterChain means the schema endpoint regression is observable with an authenticated request; anonymous requests remain unauthorized.
Example: A GET request to /graphql with Content-Type: application/json and body {"query":"{ tags }"} previously executed the query and now returns 405. A valid JWT holder requesting /schema.json previously received the schema and now receives 404.
Recommended fix: Provide compatibility routes for existing GET query requests and schema JSON discovery, retaining authentication on schema discovery. Restrict any GET execution adapter to query operations. Add HTTP integration tests because the current smoke checks exercise GraphQL only through POST.
Was this helpful? React with 👍 or 👎 to provide feedback.
…aphql, empty error locations, trailing slashes) (#1266) * Restore baseline GraphQL and REST behaviour on Boot 3: application/graphql bodies, empty error locations, trailing-slash URLs Co-Authored-By: joel.oshea <joel.oshea@cognition.ai> * Convert raw application/graphql bodies on /graphql/ too Co-Authored-By: joel.oshea <joel.oshea@cognition.ai> * Match the baseline content type for empty application/graphql bodies Co-Authored-By: joel.oshea <joel.oshea@cognition.ai> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: joel.oshea <joel.oshea@cognition.ai>
There was a problem hiding this comment.
Note
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
Devin Review found 1 finding. It is left for you to triage in Devin Review.
… (expires 2027-02-15) (#1269) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: joel.oshea <joel.oshea@cognition.ai>
There was a problem hiding this comment.
Devin Review found 3 findings. All 3 findings are left for you to triage below.
Custom reviewers
| plugins { | ||
| id 'org.springframework.boot' version '2.6.15' | ||
| id 'io.spring.dependency-management' version '1.0.15.RELEASE' | ||
| id 'org.springframework.boot' version '3.5.16' |
There was a problem hiding this comment.
👁️ TD Information Security: P2 — Known-critical Spring MVC dependency introduced
The org.springframework.boot upgrade introduces spring-webmvc 6.2.19, affected by critical CVE-2026-47890, violating the Dependencies rule. Exploitation requires SSE with view fragments. Current endpoints do not implement that feature.
Devin left this for you to triage: spring-webmvc 6.2.19 comes from the stacked Boot 3.5.16 squash-merge (#1265), and #1269 added a time-boxed Snyk ignore for it. I've been told not to push to this branch. If it ships, a critical CVE stays on the dependency graph under a Snyk exception. I recommend the security owner (Joel) confirms the ignore or that #1265's owner pins a fixed spring-webmvc if one exists.
View in Devin Review · Custom reviewer
Was this helpful? React with 👍 or 👎 to provide feedback.
| if (query.isEmpty()) { | ||
| response.setStatus(HttpServletResponse.SC_BAD_REQUEST); | ||
| response.setContentType(MediaType.APPLICATION_JSON_VALUE); | ||
| response.getWriter().write("Invalid GraphQL request - no request body was provided"); | ||
| return; |
There was a problem hiding this comment.
⏱️ TD API Contracts: Empty GraphQL requests return malformed errors
For an empty application/graphql request, GraphQLRawQueryFilter returns plain text labeled application/json. TD CONTRACT §4 requires application/problem+json with a domain code and correlationId; return that shape instead.
Devin left this for you to triage: GraphQLRawQueryFilter comes from the stacked regression-fix PR (#1266), not #1252's own commits, and I've been told not to push to this branch. If it ships, an empty application/graphql request gets plain text labelled application/json instead of the problem+json contract. I recommend #1266's owner either returns problem+json or records it as an accepted difference against the smoke baseline.
View in Devin Review · Custom reviewer
Was this helpful? React with 👍 or 👎 to provide feedback.
…-core 10.1.59) (#1270) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: joel.oshea <joel.oshea@cognition.ai>
|
Merged #1270 into this branch as aadb35c. It pins Tomcat to 10.1.62 ( Checks on head aadb35c: build passed, smoke passed, |
…xes (expire 2027-02-15) (#1271) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: joel.oshea <joel.oshea@cognition.ai>
| .requestMatchers( | ||
| ant(HttpMethod.GET, "/articles/**"), | ||
| ant(HttpMethod.GET, "/profiles/**"), | ||
| ant(HttpMethod.GET, "/tags")) |
There was a problem hiding this comment.
[warning] The public tag list works at /tags but now returns "unauthorized" at /tags/, even though the new trailing-slash filter makes the other /…/ URLs work. Clients that add a trailing slash will see the tag list refuse them, and the smoke baseline records this 401 as expected. Make the public rules also match the trailing-slash form, or strip the slash before security runs.
Technical details
Security matchers use AntPathRequestMatcher on the raw path, and UrlHandlerFilter is ordered after the security chain. TrailingSlashTest asserts 401 for /tags/ and smoke baseline rest.tags.trailing-slash records 401. Before the upgrade, MVC-aware matchers treated /tags/ the same as /tags. The same mismatch can affect /articles/feed/ and other rules.
Was this review helpful? React with 👍 or 👎 to share your feedback.
Summary
Plan step
s2.2: move the build from Spring Boot 2.6.15 to 2.7.18 on JDK 17.org.springframework.bootio.spring.dependency-managementmybatis-spring-boot-starter(+-test)graphql-dgs-spring-boot-startersqlite-jdbcext['tomcat.version'])Changes worth knowing about:
ext['graphql-java.version'] = '19.11': Boot 2.7 manages graphql-java 18.5, but DGS 5.6.2 needs[19.11, 20).federation-graphql-java-supportis pinned to 2.1.1 withdependencyManagement. DGS 5.x declares it as the range[2.0, 2.2), and with that range Gradle 8.14 fails to resolvecompileClasspathwith "Corrupt serialized resolution result".ext['tomcat.version'] = '9.0.124': Tomcat 9.0.83, the version Boot 2.7.18 ships, is affected by CVE-2025-31650, CVE-2025-31651 and CVE-2026-24734.ext['rest-assured.version'] = '4.5.1'because Boot 2.7.18 already manages 4.5.1.GraphQLCustomizeExceptionHandlernow overrideshandleException(returns aCompletableFuture) and delegates toDefaultDataFetcherExceptionHandler.handleException. It used to override the deprecatedonException. Error mapping is unchanged.spring-boot-properties-migrator(runtimeOnly) and checked it was on the runtime classpath during the smoke run. It reported no renamed or removed properties, so neither properties file changed. It has been removed again.Verification (JDK 17)
buildandsmokeare green: run 43941415265../gradlew clean spotlessCheck test: 68 tests in 20 classes, 0 failures, 0 errors and 0 skipped, which matchesdocs/upgrade/baseline.md.-Xlint:deprecation -Xlint:removal. The only remaining warning isWebSecurityConfigurerAdapter, which is deprecated in Spring Security 5.7 and handled in the next step. The earlieronExceptionwarning is fixed.scripts/smoke/run.sh: "Smoke check passed: 75 calls recorded … Responses match baseline". The baseline was not regenerated and there are no accepted differences.Known issue:
security/snykfailsI can't see the Snyk report without a login. I ran an OSV scan of the runtime classpath, base vs this branch: 23 advisories are fixed and 2 new ones remain. Neither of the 2 has an open-source fix on the 2.7 / 5.7 lines, and both go away with the Boot 3 phase:
spring-boot-autoconfigure2.7.18, Artemis auto-configuration, which this app doesn't use (fixed in 3.5.15 / 4.0.7).Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/b943b2fcee25482fa82dfbb81c628cc6
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/b943b2fcee25482fa82dfbb81c628cc6?variant=devin
Requested by: @joeloshea-cog
👀 3 findings for you to triage · Follow Devin's work