Repository navigation
Modernization integration: Java 21 / Spring Boot 3.5.16 / DGS 10 / Next 15 + regression suite (do not merge yet) - #232
Open
devin-ai-integration[bot] wants to merge 37 commits into
Conversation
… CI gate, dependency diff and compile report
…, graphql, JacksonCustomizations, api tests - api/**: javax.* -> jakarta.* (servlet, validation); WebSecurityConfig rewritten as a SecurityFilterChain bean (WebSecurityConfigurerAdapter removed in Spring Security 6); CustomizeExceptionHandler.handleMethodArgumentNotValid takes HttpStatusCode. - graphql/**: Joda DateTime -> Instant getters + Util.formatTimestamp; GraphQLCustomizeExceptionHandler implements handleException(..) -> CompletableFuture (DataFetcherExceptionHandler.onException removed in graphql-java 2x). - JacksonCustomizations: Instant serializer emitting yyyy-MM-dd'T'HH:mm:ss.SSSZ (UTC) in place of the Joda DateTime serializer. - api tests: Joda -> Instant fixtures; selenium BasePage uses Duration for WebDriverWait. The REST / GraphQL sessions own these files; drop this commit if theirs supersede it.
…a.validation, MyBatis InstantHandler, regression tests - Article/Comment/ArticleData/CommentData timestamps are java.time.Instant (UTC); Util.now() truncates to millis; DateTimeCursor keeps the epoch-millis wire format. - InstantHandler (@MappedTypes(Instant.class)) replaces DateTimeHandler, writing/reading TIMESTAMP columns with a UTC Calendar exactly as before so existing SQLite rows and the textual V2 seed data read back unchanged. - DefaultJwtService on the JJWT 0.12 builder/parser API (subject/expiration/signWith, parser().verifyWith(key).build().parseSignedClaims); key = hmacShaKeyFor(secret UTF-8). - application/** validation on jakarta.validation. - New tests: transaction commit/rollback, unique constraints, read-service round trips, JWT expiry/tamper/wrong-key/none-alg, InstantHandler unit + DB round trip, timestamp JSON format, cursor parsing + pagination boundaries.
…urity 6 - api/**: javax.servlet/javax.validation -> jakarta.* - WebSecurityConfig: WebSecurityConfigurerAdapter -> SecurityFilterChain bean (lambda DSL, csrf disabled, cors with existing CorsConfigurationSource, stateless sessions, HttpStatusEntryPoint(401), identical authorizeHttpRequests rules, JwtTokenFilter before UsernamePasswordAuthenticationFilter) - CustomizeExceptionHandler: HttpStatusCode signature for Spring 6 - JacksonCustomizations: add java.time.Instant serializer producing ISO-8601 UTC millis with Z (same as Joda ISODateTimeFormat.dateTime().withZoneUTC()); Joda serializer kept until the time session removes Joda - API tests: @MockBean -> @MockitoBean - New regression tests: SecurityRegressionTest, ValidationRegressionTest, CorsAndHeadersRegressionTest, TimestampSerializationRegressionTest
…hql/infrastructure/selenium Needed only so the api test suite compiles and runs on Boot 3.5; the owning sessions' PRs supersede these: - application/**: javax.validation -> jakarta.validation - graphql/UserMutation: jakarta.validation - graphql/exception/GraphQLCustomizeExceptionHandler: DGS 10 handleException API - infrastructure/service/DefaultJwtService: JJWT 0.12 parser/builder API - selenium/pages/BasePage: Selenium 4 WebDriverWait(Duration)
…ping PageInfo, Spotless target) - generateJava.typeMapping PageInfo -> graphql.relay.PageInfo: the datafetchers build graphql.relay.PageInfo; DGS codegen 8 otherwise generates io.spring.graphql.types.PageInfo and compileJava fails with incompatible types. - spotless.java.target = 'src/**/*.java': with Gradle 8 the rootDir fileTree makes ':spotlessJava' read build/ outputs of compileJava/test/jacocoTestReport, so './gradlew clean test spotlessCheck' fails validation (implicit_dependency). For the orchestrator to reconcile centrally.
…ta namespace, SecurityFilterChain, JJWT 0.12 parser/key API, Spring 6 HttpStatusCode, Selenium Duration wait)
… regression suite - GraphQLCustomizeExceptionHandler: async handleException, jakarta.validation, TypedGraphQLError builders - Generated io.spring.graphql.types.PageInfo replaces graphql.relay.PageInfo in connections - GraphQLTimeFormat: ISO-8601 UTC millis formatter accepting Instant/Date/legacy getMillis types - Dedicated Jackson converter for /graphql (REST ObjectMapper has UNWRAP_ROOT_VALUE) - SecurityUtil/me/updateUser tolerate null Authentication; feed/updateUser -> UNAUTHENTICATED - Comment.article resolves CommentData from map local context - 59 GraphQL tests: schema contract, queries, mutations, auth, validation, error mapping, pagination, HTTP /graphql + /graphiql
…tion manifest - DGS codegen typeMapping PageInfo -> graphql.relay.PageInfo (datafetchers return graphql.relay.DefaultPageInfo; DGS 10 codegen otherwise emits its own io.spring.graphql.types.PageInfo and compileJava fails) - Spotless target 'src/**/*.java' instead of a root fileTree: Gradle 8 fails 'clean test spotlessCheck' with an implicit-dependency validation error (spotlessJava vs compileJava/generateJava/test outputs) - TEMPORARY: re-add joda-time (2.14.0) because core/application/infrastructure on the integration branch still import org.joda.time until the persistence/time session's PR lands; drop this line at that merge
… GraphQL branch compiles until the java.time migration merges
…the same invocation as generateJava/test (Gradle 8 implicit-dependency validation)
Spring Security 6 applies the filter chain to ERROR dispatches by default. @ResponseStatus exceptions (NoAuthorizationException 403, ResourceNotFoundException 404) are rendered via response.sendError -> ERROR dispatch to /error, which anyRequest().authenticated() turned into a 401 at runtime (MockMvc does not perform the error dispatch, so the existing tests could not see it). dispatcherTypeMatchers(ERROR).permitAll() restores the 403/404 responses; API rules are otherwise unchanged.
…C text
- ArticleMapper.update now writes updated_at (was changed in memory only)
- InstantHandler writes 'yyyy-MM-dd HH:mm:ss.SSS' UTC text so app rows sort and
cursor-compare consistently with the textual seed rows from datetime('now');
reads stay backward compatible (text with/without fraction, ISO offset text,
legacy epoch-millis integers, java.sql types)
- Tests: handler unit + DB round-trip (storage type, ordering, cursor compare,
updatedAt persistence); make JWT tampered-signature test deterministic
Central reconciliation: dropped temporary joda-time dependency and Joda DateTimeSerializer (owner: persistence); WebSecurityConfig, JacksonCustomizations, BasePage taken from REST branch; DefaultJwtService from persistence branch; TimestampSerializationRegressionTest legacy-format check now uses the recorded Joda output.
Central reconciliation: graphql/** taken from GraphQL branch (generated types.PageInfo, so the DGS codegen PageInfo typeMapping was removed); WebSecurityConfig, DefaultJwtService, BasePage and build.gradle (Spotless target, no Joda) kept from the integration branch.
…itize markdown, add ESLint 9 + Vitest tooling
…, bump vitest to 5.x
…validate article caches after create/update/delete
…ialization/unit), Selenium critical path, regression.yml
… fixtures, DGS 10 introspection split, MOCK web env for rollback test)
…ion, markdown, session, route smoke) under frontend/__tests__/regression
…kend/frontend regression tests
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Author
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
Integration branch for the full modernization of the RealWorld app from Java 11 / Spring Boot 2.6.3 / Gradle 7.4 / Next 9 to Java 21 / Spring Boot 3.5.16 / Gradle 8.14.6 / Next 15, plus a cross-cutting regression suite. Opened for review only — do not merge to
mainyet. Six child PRs were merged into this branch in order (#226 platform/build → #227 REST/security → #228 persistence/JWT/time → #229 GraphQL/DGS → #230 frontend → #231 regression suite), with the full gate run after each merge (docs/modernization/integration/MERGE-LOG.md). The complete before/after report isdocs/modernization/REPORT.md.Final verification on this branch (head of PR)
Baseline
main: 68 tests, 33.2% coverage (CI skipped the JaCoCo gate), frontend untested,npm audit109 vulns (10 critical). Now: 384 + 151 tests, gate enforced in CI,npm audit7 dev-only findings (0 critical; seefrontend/AUDIT.md).Key migration points (details in
docs/modernization/REPORT.md§6)target 'src/**/*.java'— Gradle 8 rejects the old rootfileTree), JaCoCo 0.8.13 with exclusions for DGS codegen output only (io/spring/graphql/{types,client}/**,DgsConstants*). CI runs the full gate on JDK 21 plus a Node 22 frontend job.javax.*→jakarta.*;WebSecurityConfigurerAdapter→@Bean SecurityFilterChain(lambda DSL,requestMatchers).Authorization: Token <jwt>preserved. AddeddispatcherTypeMatchers(DispatcherType.ERROR).permitAll()— Spring Security 6 otherwise filters the servlet ERROR dispatch and turned@ResponseStatus403/404 into 401 at runtime.java.time.Instant(UTC, millis) across domain, DTOs, cursor pagination (wire format unchanged) and Jackson (InstantSerializer, same…SSSZoutput as before).DateTimeHandler→InstantHandlerwriting canonical UTC text so app rows and seed rows sort/compare consistently. JJWT 0.12.6 (Keys.hmacShaKeyFor,verifyWith/parseSignedClaims); invalid/expired/tampered tokens →Optional.empty(). MyBatis starter 3.0.4, sqlite-jdbc 3.50.3.0, Flyway 11 (Boot-managed).ArticleMapper.updatenow persistsupdated_at(pre-existing defect).graphql-dgs-spring-graphql-starter, codegen 8.7.0 (generatedtypes.PageInfo), asyncDataFetcherExceptionHandler.handleException, GraphiQL at/graphiql?path=/graphql.dangerouslySetInnerHTML; ESLint 9 flat config, Vitest 5 + Testing Library with coverage thresholds; Node>=22..devin/blueprint.yamland.agents/skills/*updated for Java 21 / Node 22.Known pre-existing behaviours left unchanged (documented, tests pin current contract)
POST /users/loginbad credentials → 422{"message"}(not{"errors"});POST /usersreturns 201 whileRegisterFormchecks for 200; GraphQLupdateUserunauthenticated error envelope;getPageInfoshows no pages whentotal < limit.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/b94b7b39f5564da89955af6f9aaa39bb
Open in Devin Desktop: https://partner-workshops.devinenterprise.com/desktop/session/b94b7b39f5564da89955af6f9aaa39bb?variant=devin
Requested by: @mbatchelor81