Repository navigation
Api service library upgrades - #2211
Merged
Merged
Conversation
ludomikula
force-pushed
the
api-service-library-upgrades
branch
from
November 25, 2026 20:52
2a1456f to
0b3b713
Compare
MongoDB 7.x is the supported minimum, so the server's Spring tests now use the pinned mongo:7.0 image instead of mongo:4.0.28. The MongoDB driver 5.5 that Spring Boot 3.5 brings refuses servers below 4.2, so the tests have to stop depending on 4.0 before Spring Boot is upgraded. Renamed or retargeted tests (counts unchanged: 4 and 13): - ArchiveSnapshotTaskBelow5Test -> ArchiveSnapshotTaskMongo5Test (profile archiveSnapshotMongo5): guard asserts major >= 5, and one test asserts the archive collection is of type timeseries. - DatabaseChangelogMigrationsTest: the two onMongoBelow5 tests now test the >= 5 branch of change set 026 (..._onMongo5AndLater_...). ContainerImages.MONGO_4_0 is removed (no user left). Main code, POMs, YAML, Docker and CI are unchanged. Verified on JDK 17: clean verify green, GATE VIOLATIONS: none, per-module test totals identical to the baseline. Pointing MONGO_IMAGE back at mongo:4.0.28 makes the 6 retargeted tests fail at their >= 5 guard. Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
Spring Boot 3.5.16 brings Spring Framework 6.2, Reactor 2024.0, Jackson 2.21, MongoDB driver 5.5, Spring Data MongoDB 4.5, Byte Buddy 1.17 and Mockito 5.17. Java stays 17. Dependency changes: - BOM 3.2.4 -> 3.5.16; the reactor-core, reactor-test, netty-resolver and mockito-inline pins are removed so the BOM manages them. - The graphqlPlugin and googleSheetsPlugin test pins of spring-boot-starter- webflux 3.0.6 and spring-test 6.0.10 are removed. - springdoc 2.5.0 -> 2.10.0; the legacy springdoc-openapi-webflux-ui 1.8.0 is removed and OpenApiCustomiser becomes OpenApiCustomizer. The sort of tags and paths in the OpenAPI document is now applied (it was not before). - Mongock stays at 5.4.0. The migration history was checked in both directions between the old and the new build: 0 change sets re-run, history unchanged. Code changes the new versions force: - GlobalContextFilter no longer relies on request.mutate() leaking into the original headers (Spring 6.2 does not): a request without X-REQUEST-ID got HTTP 500. The id is resolved once, used for the log context and put into the analytics headers map. New GlobalContextFilterTest covers both cases. - MongoConnectionUriParser ends the authority at the first / or ?, as driver 5.5 does. mongodb://u?x:p?q@h/db?a=1 now has no credentials and no database and is refused with the empty-database error instead of using "db". - Tests: Jackson 2.21 (removed AnnotatedClass.getStaticMethods, new java.time error text, a creator on GetPluginDynamicConfigRequestDTO with a new D3 fixture), driver 5.5 URI verdicts, and no Content-Type on three empty-body 200 responses (Spring 6.2). Behaviour changes to mention in release notes: - Empty-body 200 responses of deleteProfilePhoto, deleteProfilePhotoById and lost-password without an email carry no Content-Type. - Prometheus metric names change (for example *_active_seconds_active_count -> *_count, jvm_gc_overhead_percent -> jvm_gc_overhead, jvm_gc_pause_seconds removed); dashboards need updating. - The OpenAPI document is 3.1.0; health gains an ssl component. Verified on JDK 17: clean verify green, GATE VIOLATIONS: none, heavy-container tests green, smoke start with 13 plugins and health UP, Docker image build. Test totals equal the baseline apart from 3 added tests (GlobalContextFilterTest x2, one MongoConnectionUriParserTest case). Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
…ng Boot 4 Everything here still works on Spring Boot 3.5.16 and is required by the next major version: - pf4j 3.11.0 -> 3.16.1 and pf4j-spring 0.8.0 -> 0.10.0. pf4j-spring 0.10.0 starts the plugins from a jakarta.annotation.PostConstruct method; with 0.8.0 (javax) no plugin would start on Spring Framework 7. pf4j 3.14.1 also fixes a zip path traversal. ServerSettingServiceImpl moves to jakarta.annotation.PostConstruct for the same reason. - @MockBean -> @MockitoBean in three tests. - spring.codec.max-in-memory-size -> spring.http.codecs.max-in-memory-size; CustomWebFluxConfiguration still reads the old key as a fallback, so an operator's setting keeps working. - Actuator: management.endpoints.enabled-by-default and the per-endpoint enabled flags become the access keys (default none; health, metrics and prometheus read-only). The effective behaviour is unchanged. - json-boundary-sites.tsv: attestation hash of CustomWebFluxConfiguration.java, which the gate test computes over the file. Verified on JDK 17: clean verify green, GATE VIOLATIONS: none, test totals identical to the previous build, smoke start with 13 plugins and health UP (0 plugins when the plugins directory is missing), no deprecation warnings for the changed keys at startup. Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
The server and all tests now build and pass on JDK 25 as well as on JDK 17.
The class files stay at version 61 (--release 17), so the Docker images, CI and
the runtime JDK are unchanged.
- maven.compiler.proc=full: javac 23+ no longer runs annotation processors found
on the class path unless asked to; Lombok, the Spring Boot configuration
processor and the Querydsl processor are discovered that way. Without it
lowcoder-sdk does not compile on JDK 25.
- Lombok 1.18.32 -> 1.18.48: 1.18.32 crashes javac 25. lombok.config sets
lombok.jacksonized.jacksonVersion += 2 so @Jacksonized keeps generating for
Jackson 2 without the ambiguity warning.
lombok.copyJacksonAnnotationsToAccessors was tried and left out: with it the
UserProfileView golden loses its isAnonymous/anonymous and isEnabled/enabled
properties (9 contract test failures), without it the JSON equals the
previous output.
- <source>/<target> -> <release> in the root and plugin compiler configuration.
- BlockHound 1.0.8 -> 1.0.19: 1.0.8 cannot start on a JDK 25 runtime
("Java 25 (69) is not supported by the current version of Byte Buddy"), which
only shows with common.block-hound-enable=true.
- ResultSetParserContractTest: JDK 25 words the SerialClob message without the
typo JDK 17 has; the test normalizes it to the pinned text (golden unchanged).
- smtpPlugin pom: comment about the default charset reworded.
Verified: clean verify green on JDK 25 and on JDK 17 with identical per-module
test totals and GATE VIOLATIONS: none; class files are version 61 on both; the
server starts and serves on JDK 17 and JDK 25 (13 plugins, health UP); BlockHound
1.0.19 starts on both, 1.0.8 does not on JDK 25; heavy-container tests green on
JDK 25; Docker image build green.
Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
GlobalExceptionHandler kept the HTTP status of a ResponseStatusException only
for the plugin endpoints. Everywhere else it answered HTTP 500 with the generic
"service is busy" body and logged an ERROR, so an unknown URL (404), a 405, a
413 for a body over the codec limit or a controller's 4xx looked like an
internal failure to clients and monitoring.
A 4xx ResponseStatusException outside the plugin endpoints now keeps its HTTP
status and answers {"code":<status>,"message":<reason phrase>,"success":false},
the shape CustomErrorWebExceptionHandler already writes for a 4xx thrown in a
filter. It is logged as a warning without a stack trace and counted as
BizError.UNSUPPORTED_OPERATION. 5xx ResponseStatusExceptions, other exceptions
and the plugin endpoints are unchanged.
Tests: unit tests for the 4xx, other 4xx and 5xx cases, and contract tests X5
(unmapped path 404), X8 (405), X9 (400, reason not echoed), X10 (503 stays 500)
and X11 (plugin prefix unchanged). The tests that pinned the old behaviour are
updated: the oversized body (413), the flow seat-sync statuses and the unknown
path in the contract test client.
Behaviour changes for release notes: a request to an unknown URL (for example
/api/status/env) answers 404 instead of 500; a body over the codec limit
answers 413; the flow seat-sync 405, 409, 401 and 403 keep their status. The
error-code metric counts these as 5003 instead of 5000.
Verified on JDK 17: clean verify green, GATE VIOLATIONS: none, smoke start with
13 plugins and health UP, unknown paths answer 404.
Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
… of Mongock Mongock has no driver for Spring Data MongoDB 5 (Spring Boot 4) and reaches end of life at the end of 2026. The 29 change sets stay as they are (ids, authors, order and bodies); only their parameter type changes from MongockTemplate to MongoTemplate. - MigrationRunner (an ApplicationRunner, profile !test) takes a lock, reads the history only then, runs the change sets of the registry that have no EXECUTED entry, in order, and writes one history entry per run. - The history stays in the mongockChangeLog collection in Mongock's document format, so the build before this change reads it and runs 0 change sets. Only an EXECUTED entry counts as done: a FAILED entry (kept, with the stack trace) stops the start and the change set runs again at the next start. - MigrationLock is a lease in its own collection (lowcoderMigrationLock): owner, generation and a database-side expiry, renewed by a heartbeat and checked before every change set and every history write. A lost lock stops the run without starting another change set or writing another entry. Properties: lowcoder.migration-lock.lease (default 60 s) and lowcoder.migration-lock.max-wait (default 10 min). - Mongock's dependencies and runner bean are removed. Behaviour changes for release notes: - mongockLock is no longer used. The old and the new build must not start on one database at the same time: the lock does not exclude Mongock. - On a fresh install made by the new runner, the history has the 29 change sets and not Mongock's two system entries; if the old build is started on it later, it adds those two entries and runs no change set. - History writes use the MongoTemplate's default write and read concern, not Mongock's journaled/local settings. Tests: 33 new (runner, lock, registry), including a history captured from the previous build, a removed entry that runs again, a FAILED entry that runs again, two runners at once, a lease renewed during a long change set, and a lock taken away during a change set. Each negative was seen failing on a broken runner. Verified on JDK 17 and JDK 25: clean verify green, GATE VIOLATIONS: none; smoke start on an empty database (29 change sets run, 13 plugins, health UP) and a second start (0 run); the previous build on a database migrated by the new runner and the reverse: 0 change sets run, health UP, history unchanged. Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
Spring Boot 4.1.2 brings Spring Framework 7, Spring Security 7, Spring Data MongoDB 5, MongoDB driver 5.8, Hibernate Validator 9, Jetty 12.1 and Jackson 3. The application JSON stays on Jackson 2. Dependencies and configuration: - BOM 4.1.2; the pins Boot 4 manages or no longer needs are removed; jakarta.el-api stays pinned (6.0.1); springdoc 3.2.0; Sentry moves to sentry-spring-boot-4; spring-boot-starter-security-test in the server module; jackson-datatype-jdk8 in the sdk; a Jetty 12.1 BOM import for WireMock. - spring.data.mongodb.uri and authentication-database move to spring.mongodb.* (with the old keys the application silently connects to localhost:27017); the UUID representation stays java-legacy; spring.data.mongodb.representation. big-decimal: string keeps BigDecimal and BigInteger stored as strings. - server.error.* moves to spring.web.error.*; preferred-json-mapper: jackson2. Code: - Jackson2ClientCodecs puts explicit Jackson 2 codecs on every hand-built WebClient: Spring 7's default codecs prefer Jackson 3 and would write a Jackson 2 JsonNode request body as its bean properties. - HttpHeaders is no longer a Map: HttpHeaderMaps.copyOf takes a snapshot where the code serialized or modified the headers. Removing Cookie or X-Real-IP in the REST and GraphQL executors and the context filter now changes the copy, not the live request headers. - GraphQLExecutor uses exchangeToMono (exchange() is removed). QueryExecutionResult keeps the old query codes for 413, 421 and 422, which Spring 7 renamed. - Spring Security 7 authorization types in the plugin authorization manager and endpoint handler; CustomErrorWebExceptionHandler takes WebProperties; the unused servlet MultipartConfigElement bean is removed; the snapshot list parameters are explicitly optional (Spring 7 no longer inherits @nullable from the interface). Tests: test configuration and fixtures follow the new stack; new tests cover the client codecs per client, the header copy, the HTTP status names, BigDecimal storage against a real MongoDB and a GraphQL connection failure. Behaviour changes for release notes: - Operators must move the MongoDB keys to spring.mongodb.* and the error keys to spring.web.error.*. - HTTP status codes 305, 419 and 420 no longer exist in Spring 7 and take the unknown-status path. - OpenAPI nullable ids, a renamed Prometheus Lettuce metric and the Boot 4 health groups differ; JDK 25 prints dynamic-agent and native-access warnings. Verified on JDK 17 and JDK 25: clean verify green with identical per-module test totals and GATE VIOLATIONS: none; smoke start on both runtimes (13 plugins, health UP, unknown URL 404, migrations run) and 0 plugins when the plugin directory is missing; Docker image build green. Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
Load all 13 shaded plugin jars through the server's pf4j plugin manager and drive each plugin (validate, test connection, query) against real services, with negative cases for a jar without its extension index or plugin id and an empty plugins directory. Add the cases no test reached: MySQL test connection, MongoDB with authentication, SMTP with STARTTLS (pinned smtp4dev image), REST and GraphQL over HTTPS with a self-signed certificate, and the Snowflake driver against a local stand-in. RecordingHttpServer can now serve HTTPS. Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
The root POM and all 14 plugin POMs now emit class file 69; the plugin POMs no longer override the Java level, so they inherit the root value. The maven-enforcer-plugin fails a build early when Maven runs on a JDK older than 25. The api-service and all-in-one images build and run on Java 25, the entrypoint passes --enable-native-access=ALL-UNNAMED (Netty loads a native library), the CodeQL and SonarCloud workflows set up Temurin 25, and the CodeQL action moves to v4 with an explicit build mode per language. The README and the contribution guide name Java 25. Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
Move every JSON use to the tools.jackson packages that Spring Boot 4.1 and Spring Framework 7 ship; only the Jackson annotations stay in com.fasterxml.jackson.annotation. JsonUtils builds the shared mapper with the Jackson 2 defaults (configureForJackson2) plus the settings the contract tests pinned: parameter name detection, default view inclusion, creator visibility ANY, no implicit constructor next to a default one, explicit stream limits, and a naming strategy (LegacyBeanNaming) that keeps the Jackson 2 property names of accessors such as getSQLTypeName. The client codecs are built by JacksonClientCodecs, the server codecs use the production mapper, and the unused Redis JSON serializer bean is gone. The JsonNode, ObjectNode and exception usages follow the Jackson 3 API; the contract fixtures hold the new class and exception names. A java.time value in a node-service query now serializes as an epoch-seconds number instead of failing the call. Claude-Session: https://claude.ai/code/session_015KPtHKPW6LJoxzf4tn8Rtm
The photo delete by id answers an empty body without a Content-Type on Spring 6.2. A form login that matches an account only by e-mail is refused with USER_LOGIN_ID_EXIST, so the Google-then-form login test now expects the refusal and an unchanged account. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
AssertJ 3.13.2 to 3.27.7, GreenMail 2.0.1 to 2.1.15, WireMock 3.6.0 to 3.13.2, jetty-ee10-bom 12.1.14 to 12.1.15. A clean build is needed once: AssertJ changed the signature of containsExactlyInAnyOrder, so test classes compiled against 3.13.2 fail with NoSuchMethodError. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
…sql drivers commons-text 1.15.0, commons-io 2.22.0, commons-collections4 4.6.0, guava 33.8.0-jre (both poms), mustache 0.9.14, querydsl-mongodb 5.1.0, jgrapht 1.5.3, java-jwt 4.6.2, MySQL connector 8.0.33, jakarta.mail 2.0.2, PostgreSQL driver 42.7.15, ojdbc11 23.26.4.0.0, sentry-spring-boot-4 8.66.0, springdoc 3.2.1. Source changes the new versions need: MapUtils.getString(map, key, null) is ambiguous in commons-collections4 4.6.0 (the two-argument form answers null as well), and Guava no longer brings javax.annotation, so ReloadableCache uses the errorprone CheckReturnValue. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
compiler 3.16.0, surefire and failsafe 3.6.1, jar 3.5.1, shade 3.6.2, assembly 3.8.0, jarsigner 3.1.0, antrun 3.2.0, dependency 3.11.0, enforcer 3.7.0, license 2.9.0, JaCoCo 0.8.16. mvn clean test passes (3526 tests) and mvn -DskipTests clean package builds the shaded plugin jars. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
Passay 2 moved its classes to org.passay.data, org.passay.generate and org.passay.rule and builds the generator with the length and the rules. RandomPasswordGeneratorConfig keeps its output (10 characters, 3 lower case, 3 upper case, 3 digits) and now has a test. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
The Redis plugin needed three adaptations to Jedis 8: - a user name without a password in the URI is refused with an IllegalArgumentException (before: an ArrayIndexOutOfBoundsException), still mapped to REDIS_URL_ERROR; the exact class is matched so that a NumberFormatException (a bad port) stays raw; - Jedis splits the raw user info before decoding, so a colon in the user name now works (the test and the doc comment of RedisUriUtils.getUriAuth no longer state it as a limit); - the pool is a commons-pool2 GenericObjectPool, so the test reads its settings directly. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
google-api-client 2.9.2, google-oauth-client-jetty 1.39.0, google-auth-library-oauth2-http 1.58.0. The three are one stack and are updated together. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
The driver reports a boolean property as True/False instead of true/false; MssqlConnectorUrlTest normalises that when it reads the properties back. The URL the plugin builds is unchanged. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
The 0.11 driver differs from 0.3 in four ways the plugin needed to follow: - it refuses unknown connection properties, so the MySQL properties characterEncoding and useUnicode are no longer set (the HTTP interface is UTF-8); - it does not support execute(String, int), so non-prepared statements run without RETURN_GENERATED_KEYS; - it connects lazily, so the data source is checked with one SELECT 1 when it is created, which keeps a wrong password, a closed port and https against an HTTP port reported as DATASOURCE_ARGUMENT_ERROR; the plugin tests against a real ClickHouse server pass again. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
JWTUtils uses the new builder and parser API with the same key (the bytes of the configured secret) and HS256 stated explicitly, so API-key tokens signed before the update keep validating; a test holds a token signed by jjwt 0.11.5. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
The release passes the same contract tests as the snapshot. The snapshot pin needed the local-repo directory, three local_libs repository entries and a separate copy step in the server pom; they are removed, and the release is copied with the other libraries. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
mysql:mysql-connector-java ended at 8.0.33 and is relocated to com.mysql:mysql-connector-j. The driver class is unchanged; the plugin tests, 23 of them against a real MySQL server, pass. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
…oTest The runner's start-up job writes the super-admin user and organisation in a fire-and-forget subscription, which can land after the test's collection wipe and break the count assertions. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
…ors from the test log Exclude android-json (pulled in by spring-boot-starter-test through jsonassert) so org.json.JSONObject exists once on the test class path. The two Mongo tests that mock the plugin client now return a definition without params instead of no definition, which logged an error for every datasource they read. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
Add a smoke spec that checks the OpenAPI document is served anonymously and that the Swagger UI page renders operations of that document (the newer Swagger UI draws only the blocks near the viewport, so the rendered blocks are checked against the document instead of counted). Fix the app list page object: match the New button by its exact name (the sidebar News button matched a substring) and click the Upload wrapper of the Import item, which covers the text. Pin the page clock of the npm calendar test inside the week of the fixture's events, whose delete icon is the only SVG it draws. Re-pin LC-DL10 to the answers for apps of a deleted workspace, which are now marked DELETED. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
…lick The carousel sets its slides' height after it mounts, so react-slick resizes the slider once on every load and, 50 ms later, cancels the pending end of a slide that is already running, which is the change event. A click inside that window moved the slide but lost the event (17 of 80 runs). The test now waits for the slides' height and a named settle time, carries a defect annotation, and the README records the lost event as a candidate. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
The confirm click of LC-AK04 returns while the DELETE is still in flight, and the reload that followed aborted it; when the abort reached the server first, the key stayed (15 of 100 runs). The test now waits for the row to leave the list, which the card does only after the server answered. Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
Its failure was the test reloading the page while its DELETE was in flight, not a defect of the client or the server; after the fix it passes 40 of 40 and the file gate 80 of 80 in the default run. FIXED_ON_BRANCH is empty now, the unit spec and the README counts follow (default run 862 tests, 13 quarantined). Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb
ludomikula
force-pushed
the
api-service-library-upgrades
branch
from
November 26, 2026 15:09
9aa7dfc to
35ab76e
Compare
|
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.




Proposed changes
Upgrade java and all libraries to latest stable version.
Types of changes
What types of changes does your code introduce to Lowcoder?
Put an
xin the boxes that apply.Checklist
You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help!
This is simply a reminder of what we are going to look for before merging your code.
Put an
xin the boxes that apply.Further comments
n/a