From c9e7003b3d7f3b594e0821c81792ad96cc830f1a Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 19 Nov 2026 23:49:05 +0100 Subject: [PATCH 01/40] test: run the server tests on MongoDB 7.0 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 --- .../sdk/contract/ContainerImages.java | 5 +- .../lowcoder/api/common/TestContainers.java | 12 +++-- .../DatabaseChangelogMigrationsTest.java | 53 +++++++++++++------ ...ava => ArchiveSnapshotTaskMongo5Test.java} | 48 ++++++++++------- .../runner/task/ArchiveSnapshotTaskTest.java | 4 +- 5 files changed, 77 insertions(+), 45 deletions(-) rename server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/{ArchiveSnapshotTaskBelow5Test.java => ArchiveSnapshotTaskMongo5Test.java} (83%) diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ContainerImages.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ContainerImages.java index d53fe8805..abec2da1b 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ContainerImages.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ContainerImages.java @@ -22,10 +22,7 @@ */ public final class ContainerImages { - /** The server's tests: the line of the embedded mongod they ran against before (4.0.2). */ - public static final String MONGO_4_0 = - "mongo:4.0.28@sha256:4ca81c89ad08f4cfa9906005126112bffe8fb363800466ef5e50f6238f6f6af1"; - /** mongoPlugin's container tests. */ + /** The MongoDB container of lowcoder-server's Spring tests ({@code TestContainers}) and of mongoPlugin's container tests. */ public static final String MONGO_7_0 = "mongo:7.0@sha256:d5b3ca8c3f3cdce78d44870dc0871b76d5235e9b2ad4ea6bea5d1fbff8027703"; public static final String REDIS_7_2 = diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/common/TestContainers.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/common/TestContainers.java index 8a45c8a88..2a15e0a87 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/common/TestContainers.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/common/TestContainers.java @@ -21,14 +21,18 @@ * *

Limits: the tests need a running Docker daemon; without one the first context fails to start with Testcontainers' * "Could not find a valid Docker environment". MongoDB runs as a single-node replica set (how {@link MongoDBContainer} - * starts it), where the embedded mongod was standalone; the module's whole suite passed against it (1117 unit and 93 - * integration tests, 2026-10-04), which shows no test depends on the difference, not that none ever could. + * starts it), where the embedded mongod was standalone; the module's whole suite passed against it on MongoDB 7.0 + * (3285 tests with 5 skipped, plus the 2 of UsAsciiDefaultCharsetTest, {@code mvn clean verify}, 2026-11-19), + * which shows no test depends on the difference, not that none ever could. */ public final class TestContainers { - /** MongoDB 4.0, the line of the embedded mongod the tests ran against before (4.0.2); pinned by digest. */ + /** + * MongoDB 7.0, pinned by digest: 7.x is the supported minimum of self-hosted installs (decision D2 of + * BOOT4-JDK25-p0-index-plan.md), and the MongoDB driver 5.5 of Spring Boot 3.5 refuses servers below 4.2. + */ static final DockerImageName MONGO_IMAGE = - DockerImageName.parse(ContainerImages.MONGO_4_0).asCompatibleSubstituteFor("mongo"); + DockerImageName.parse(ContainerImages.MONGO_7_0).asCompatibleSubstituteFor("mongo"); static final DockerImageName REDIS_IMAGE = DockerImageName.parse(ContainerImages.REDIS_7_2); static final int REDIS_PORT = 6379; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/DatabaseChangelogMigrationsTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/DatabaseChangelogMigrationsTest.java index ab30b944e..cbcdf2f2d 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/DatabaseChangelogMigrationsTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/DatabaseChangelogMigrationsTest.java @@ -56,10 +56,11 @@ * manual re-run; the tests that run a changeset twice describe what such a re-run does, not something the application * does by itself. * - *

The container is {@code mongo:4.0.28}, so {@code addTimeSeriesSnapshotHistory} takes its {@code < 5} ({@code $out}) - * branch; its {@code >= 5} branch is not reachable here and stays uncovered. {@link ArchiveSnapshotTask} runs once at + *

The container is {@code mongo:7.0}, so {@code addTimeSeriesSnapshotHistory} takes its {@code >= 5} branch (a + * time-series archive, filled with inserts); its {@code < 5} ({@code $out}) branch is not reachable here and stays + * uncovered. {@link ArchiveSnapshotTask} runs once at * context start (initialDelay 0) against the same collections; the test waits for the scheduler thread to go idle before it - * seeds anything. The task's archival itself is tested by ArchiveSnapshotTaskTest and ArchiveSnapshotTaskBelow5Test (L2-11b). + * seeds anything. The task's archival itself is tested by ArchiveSnapshotTaskTest and ArchiveSnapshotTaskMongo5Test (L2-11b). */ @SpringBootTest(classes = ServerApplication.class) @ActiveProfiles("databaseChangelog") @@ -91,6 +92,7 @@ public class DatabaseChangelogMigrationsTest { private static final String FIRST_VERSION_TAG = "1.0.0"; private static final int KEEP_DAYS_TOLERANCE_DAYS = 1; private static final int MONGO_TIME_SERIES_MAJOR = 5; + private static final String TIME_SERIES_TYPE = "timeseries"; private static final String SCHEDULER_THREAD = "scheduling-1"; private static final Duration ARCHIVE_WAIT = Duration.ofSeconds(60); @@ -340,12 +342,12 @@ public void deleteOldSuperAdmin_aSingleSuperAdminStays() { assertThat(byId(USER, only)).isNotNull(); } - // ---------------------------------------------------------------- 026 time-series snapshot history (MongoDB < 5) + // ---------------------------------------------------------------- 026 time-series snapshot history (MongoDB 5 and later) @Test - public void addTimeSeriesSnapshotHistory_onMongoBelow5_movesOnlySnapshotsOlderThanTheKeepDuration() { - assertThat(mongoMajorVersion()).as("the container's MongoDB major version (the < 5 branch is the one that runs)") - .isLessThan(MONGO_TIME_SERIES_MAJOR); + public void addTimeSeriesSnapshotHistory_onMongo5AndLater_movesOnlySnapshotsOlderThanTheKeepDuration() { + assertThat(mongoMajorVersion()).as("the container's MongoDB major version (the >= 5 branch is the one that runs)") + .isGreaterThanOrEqualTo(MONGO_TIME_SERIES_MAJOR); Instant oldEnough = Instant.now().minus(commonConfig.getQuery().getAppSnapshotKeepDuration() + KEEP_DAYS_TOLERANCE_DAYS, java.time.temporal.ChronoUnit.DAYS); Instant recent = Instant.now().minus(1, java.time.temporal.ChronoUnit.DAYS); ObjectId oldOne = new ObjectId(); @@ -367,25 +369,37 @@ public void addTimeSeriesSnapshotHistory_onMongoBelow5_movesOnlySnapshotsOlderTh } /** - * On MongoDB below 5 the changeset moves the old snapshots with {@code $out}, which replaces the target collection: - * what the time-series collection held before the run is gone afterwards, and a run with nothing to move empties it. - * Pinned as observed (a manual re-run only: Mongock runs the changeset once per database). + * On MongoDB 5 and later the changeset creates the archive as a time-series collection when it is missing, and it + * moves the old snapshots with inserts, which add to the target: what the archive held before the run stays, and a run + * with nothing to move leaves it as it is. (A manual re-run only: Mongock runs the changeset once per database.) */ @Test - public void addTimeSeriesSnapshotHistory_onMongoBelow5_outReplacesWhatTheTargetHeld() { + public void addTimeSeriesSnapshotHistory_onMongo5AndLater_createsATimeSeriesArchive_andKeepsWhatTheTargetHeld() { + assertThat(mongoMajorVersion()).as("the container's MongoDB major version (the >= 5 branch is the one that runs)") + .isGreaterThanOrEqualTo(MONGO_TIME_SERIES_MAJOR); Instant oldEnough = Instant.now().minus(commonConfig.getQuery().getAppSnapshotKeepDuration() + KEEP_DAYS_TOLERANCE_DAYS, java.time.temporal.ChronoUnit.DAYS); - db.getCollection(SNAPSHOT_TS).insertOne(snapshot(new ObjectId(), "archived-earlier", oldEnough)); - db.getCollection(SNAPSHOT).insertOne(snapshot(new ObjectId(), "moved-now", oldEnough)); + db.getCollection(SNAPSHOT_TS).drop(); + db.getCollection(SNAPSHOT).insertOne(snapshot(new ObjectId(), "moved-first", oldEnough)); changelog.addTimeSeriesSnapshotHistory(mongock, commonConfig); + String type = collectionType(SNAPSHOT_TS); List afterFirst = applicationIds(SNAPSHOT_TS); - log.info("{}after first run: {}", TAG, afterFirst); - assertThat(afterFirst).as("the earlier archive row is replaced").containsExactly("moved-now"); + log.info("{}archive type={} after first run: {}", TAG, type, afterFirst); + assertThat(type).as("type of " + SNAPSHOT_TS + " as listCollections reports it after the changeset created it") + .isEqualTo(TIME_SERIES_TYPE); + assertThat(afterFirst).as("the old snapshot is in the new archive").containsExactly("moved-first"); + db.getCollection(SNAPSHOT).insertOne(snapshot(new ObjectId(), "moved-second", oldEnough)); changelog.addTimeSeriesSnapshotHistory(mongock, commonConfig); - assertThat(applicationIds(SNAPSHOT_TS)).as("a run with nothing to move empties the archive").isEmpty(); + assertThat(applicationIds(SNAPSHOT_TS)).as("the earlier archive row stays and the new one is added") + .containsExactlyInAnyOrder("moved-first", "moved-second"); + + changelog.addTimeSeriesSnapshotHistory(mongock, commonConfig); + + assertThat(applicationIds(SNAPSHOT_TS)).as("a run with nothing to move leaves the archive as it is") + .containsExactlyInAnyOrder("moved-first", "moved-second"); } // ---------------------------------------------------------------- helpers of the changelog @@ -448,6 +462,13 @@ private List collectionNames() { return db.listCollectionNames().into(new ArrayList<>()); } + /** The {@code type} listCollections reports for the collection: {@code collection} or {@code timeseries}. */ + private String collectionType(String name) { + Document info = db.listCollections().filter(new Document("name", name)).first(); + assertThat(info).as("listCollections entry of " + name).isNotNull(); + return info.getString("type"); + } + private static List indexNames(MongoCollection collection) { return collection.listIndexes().into(new ArrayList<>()).stream().map(d -> d.getString("name")).collect(Collectors.toList()); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskBelow5Test.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskMongo5Test.java similarity index 83% rename from server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskBelow5Test.java rename to server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskMongo5Test.java index 12826ba5b..66b95f9ad 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskBelow5Test.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskMongo5Test.java @@ -35,33 +35,35 @@ import lombok.extern.slf4j.Slf4j; /** - * {@link ArchiveSnapshotTask} against a real MongoDB below 5 (the test container {@code mongo:4.0.28}), where the archive - * collection is a regular collection. + * {@link ArchiveSnapshotTask} against a real MongoDB 5 or later (the test container {@code mongo:7.0}), where the archive + * collection is a time-series collection. * - *

Profile {@code archiveSnapshotBelow5}: a context and database ({@code lowcoder_test_}) of its own. The task is + *

Profile {@code archiveSnapshotMongo5}: a context and database ({@code lowcoder_test_}) of its own. The task is * scheduled with initialDelay 0 and fires once at context start (thread {@value #SCHEDULER_THREAD}); the class waits, * bounded, for that thread to be idle before it seeds anything, and then calls {@code archive()} itself, so the test * decides when the task runs. The daily re-run is a day away and cannot fire during a test. * - *

BF-065 (formerly pinned under D-6, plan §9 row "ArchiveSnapshotTask's pipeline for MongoDB < 5": the server rejected - * the per-document aggregate and nothing was archived): see {@link #threeOldSnapshotsAreArchivedBF065}. + *

BF-065 (formerly pinned under D-6, plan §9 row "ArchiveSnapshotTask's pipeline for MongoDB < 5": on a server below 5 the + * per-document aggregate was rejected and nothing was archived; the task now inserts on every version): see + * {@link #threeOldSnapshotsAreArchivedBF065}. * - *

Not covered: a MongoDB 5 or later with its time-series archive (the container is 4.x; the task runs the same inserts - * there), failed inserts, failed deletes and cursor failures (covered with mocks by {@code ArchiveSnapshotTaskTest}; a real - * server cannot be made to fail them here). + *

Not covered: a MongoDB below 5 with its regular-collection archive (the container is 7.x; the task runs the same + * inserts there, and that server is below the supported minimum), failed inserts, failed deletes and cursor failures + * (covered with mocks by {@code ArchiveSnapshotTaskTest}; a real server cannot be made to fail them here). */ @SpringBootTest(classes = ServerApplication.class) -@ActiveProfiles("archiveSnapshotBelow5") +@ActiveProfiles("archiveSnapshotMongo5") @TestInstance(TestInstance.Lifecycle.PER_CLASS) @Slf4j -public class ArchiveSnapshotTaskBelow5Test { +public class ArchiveSnapshotTaskMongo5Test { - private static final String TAG = "[ArchiveSnapshotTaskBelow5Test] "; + private static final String TAG = "[ArchiveSnapshotTaskMongo5Test] "; private static final String SNAPSHOT = "applicationHistorySnapshot"; private static final String SNAPSHOT_TS = "applicationHistorySnapshotTS"; private static final String SCHEDULER_THREAD = "scheduling-1"; private static final Duration SCHEDULER_WAIT = Duration.ofSeconds(60); private static final int TIME_SERIES_MAJOR = 5; + private static final String TIME_SERIES_TYPE = "timeseries"; private static final long OLD_EXTRA_DAYS = 1; private static final String FAILED = "Failed"; private static final String TO_ARCHIVE = "Total documents to archive: "; @@ -133,22 +135,28 @@ private List applicationIds(String collection) { .map(d -> d.getString("applicationId")).collect(Collectors.toList()); } - private void assertBelow5() { + private void assertMongo5AndLater() { Document buildInfo = db.runCommand(new Document("buildInfo", 1)); int major = Integer.parseInt(buildInfo.getString("version").split("\\.")[0]); - assertThat(major).as("MongoDB major version of the container (below 5: the archive is a regular collection)") - .isLessThan(TIME_SERIES_MAJOR); + assertThat(major).as("MongoDB major version of the container (5 or later: the archive is a time-series collection)") + .isGreaterThanOrEqualTo(TIME_SERIES_MAJOR); + } + + private String collectionType(String name) { + Document info = db.listCollections().filter(new Document("name", name)).first(); + assertThat(info).as("listCollections entry of " + name).isNotNull(); + return info.getString("type"); } /** * BF-065 (formerly pinned as plan §9 row "ArchiveSnapshotTask's pipeline for MongoDB < 5": mongo:4.0.28 rejected the * per-document aggregate, each old snapshot failed and stayed, and nothing was archived): the three old snapshots are - * inserted into the archive, with their {@code _id} as the field {@code id} and their content unchanged, and deleted + * inserted into the archive, a time-series collection on this server, with their {@code _id} as the field {@code id} and their content unchanged, and deleted * from the snapshot collection. The recent snapshot is not selected. */ @Test public void threeOldSnapshotsAreArchivedBF065() { - assertBelow5(); + assertMongo5AndLater(); ObjectId a = new ObjectId(); ObjectId b = new ObjectId(); ObjectId c = new ObjectId(); @@ -170,6 +178,8 @@ oldA, snapshot(b, "app-b", old().minusSeconds(60)), snapshot(c, "app-c", old().m assertThat(messages().stream().filter(m -> m.startsWith(FAILED))).isEmpty(); assertThat(source).as("only the recent snapshot stays").containsExactly("app-recent"); assertThat(target).as("the old ones are archived").containsExactlyInAnyOrder("app-a", "app-b", "app-c"); + assertThat(collectionType(SNAPSHOT_TS)).as("type of " + SNAPSHOT_TS + " as listCollections reports it") + .isEqualTo(TIME_SERIES_TYPE); expectedA.remove("_id"); archivedA.remove("_id"); expectedA.put("id", a); @@ -178,7 +188,7 @@ oldA, snapshot(b, "app-b", old().minusSeconds(60)), snapshot(c, "app-c", old().m @Test public void theRecentSnapshotStaysUnchanged() { - assertBelow5(); + assertMongo5AndLater(); ObjectId recent = new ObjectId(); Document recentDoc = snapshot(recent, "app-recent", Instant.now().minus(1, ChronoUnit.DAYS)); db.getCollection(SNAPSHOT).insertMany(List.of(recentDoc, snapshot(new ObjectId(), "app-old", old()))); @@ -196,7 +206,7 @@ public void theRecentSnapshotStaysUnchanged() { */ @Test public void aRowAlreadyInTheTarget_isKept_andTheNewOnesAreAdded() { - assertBelow5(); + assertMongo5AndLater(); db.getCollection(SNAPSHOT_TS).insertOne(snapshot(new ObjectId(), "archived-earlier", old())); db.getCollection(SNAPSHOT).insertMany(List.of(snapshot(new ObjectId(), "app-1", old()), snapshot(new ObjectId(), "app-2", old()))); @@ -210,7 +220,7 @@ public void aRowAlreadyInTheTarget_isKept_andTheNewOnesAreAdded() { @Test public void emptySource_writesNothing() { - assertBelow5(); + assertMongo5AndLater(); db.getCollection(SNAPSHOT_TS).insertOne(snapshot(new ObjectId(), "archived-earlier", old())); db.getCollection(SNAPSHOT).insertOne(snapshot(new ObjectId(), "app-recent", Instant.now().minus(1, ChronoUnit.DAYS))); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskTest.java index 3b8686268..7d57f7bcd 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/task/ArchiveSnapshotTaskTest.java @@ -45,8 +45,8 @@ * context start, racing the test that started it (plan §2.3); calling it here makes its coverage deterministic. * *

What a mock can and cannot show: that the task no longer asks the server's version and always copies with inserts - * (BF-065) is asserted here; that a real MongoDB below 5 accepts those inserts and keeps what was archived before is - * shown against mongo:4.0.28 by {@code ArchiveSnapshotTaskBelow5Test}. + * (BF-065) is asserted here; that a real MongoDB 5 or later accepts those inserts into its time-series archive and keeps what was + * archived before is shown against mongo:7.0 by {@code ArchiveSnapshotTaskMongo5Test}. */ @ExtendWith(MockitoExtension.class) class ArchiveSnapshotTaskTest { From bac5be2999f1e363401df3adf8c8a8f0456cde25 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Fri, 20 Nov 2026 08:23:18 +0100 Subject: [PATCH 02/40] build: upgrade Spring Boot from 3.2.4 to 3.5.16 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 --- .../api-service/lowcoder-dependencies/pom.xml | 21 +--- server/api-service/lowcoder-domain/pom.xml | 5 - .../googleSheetsPlugin/pom.xml | 1 - .../lowcoder-plugins/graphqlPlugin/pom.xml | 2 - .../mongo/model/MongoConnectionUriParser.java | 20 ++-- .../mongo/MongoPluginValidateConfigTest.java | 10 +- .../model/MongoConnectionUriParserTest.java | 38 +++++-- server/api-service/lowcoder-sdk/pom.xml | 1 - .../sdk/contract/JacksonAnnotationGuard.java | 1 - .../resources/json-contract/tree-text/E13.txt | 2 +- server/api-service/lowcoder-server/pom.xml | 10 -- .../api/OpenAPIDocsConfiguration.java | 4 +- .../framework/filter/GlobalContextFilter.java | 11 +- .../endpoint/UserEndpointsContractTest.java | 11 +- .../filter/GlobalContextFilterTest.java | 101 ++++++++++++++++++ ...o.GetPluginDynamicConfigRequestDTO.D3.json | 42 ++++++++ 16 files changed, 201 insertions(+), 79 deletions(-) create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/filter/GlobalContextFilterTest.java create mode 100644 server/api-service/lowcoder-server/src/test/resources/json-contract/types/org.lowcoder.domain.plugin.client.dto.GetPluginDynamicConfigRequestDTO.D3.json diff --git a/server/api-service/lowcoder-dependencies/pom.xml b/server/api-service/lowcoder-dependencies/pom.xml index 30e2b5281..d0399579c 100644 --- a/server/api-service/lowcoder-dependencies/pom.xml +++ b/server/api-service/lowcoder-dependencies/pom.xml @@ -34,7 +34,7 @@ org.springframework.boot spring-boot-dependencies - 3.2.4 + 3.5.16 pom import @@ -144,12 +144,6 @@ 0.7.0 - - io.projectreactor - reactor-core - 3.6.4 - - org.pf4j pf4j-spring @@ -233,22 +227,11 @@ 6.0.0 - - io.projectreactor - reactor-test - 3.6.4 - org.apache.httpcomponents httpclient 4.5.14 - - org.mockito - mockito-inline - 5.2.0 - test - jakarta.validation jakarta.validation-api @@ -257,7 +240,7 @@ org.springdoc springdoc-openapi-starter-webflux-ui - 2.5.0 + 2.10.0 diff --git a/server/api-service/lowcoder-domain/pom.xml b/server/api-service/lowcoder-domain/pom.xml index 28c739174..91af974aa 100644 --- a/server/api-service/lowcoder-domain/pom.xml +++ b/server/api-service/lowcoder-domain/pom.xml @@ -251,11 +251,6 @@ reactor-test test - - org.mockito - mockito-inline - test - org.mockito mockito-core diff --git a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml index e50a0dbe6..26c1b637a 100644 --- a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml @@ -61,7 +61,6 @@ org.springframework.boot spring-boot-starter-webflux - 3.0.6 test diff --git a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml index c99123a1c..245eca959 100644 --- a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml @@ -90,13 +90,11 @@ org.springframework.boot spring-boot-starter-webflux - 3.0.6 test org.springframework spring-test - 6.0.10 test diff --git a/server/api-service/lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/model/MongoConnectionUriParser.java b/server/api-service/lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/model/MongoConnectionUriParser.java index 0144e134f..d7dd53fb3 100644 --- a/server/api-service/lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/model/MongoConnectionUriParser.java +++ b/server/api-service/lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/model/MongoConnectionUriParser.java @@ -17,19 +17,19 @@ public final class MongoConnectionUriParser { * - mongodb+srv://user:pass@some-url/some-db... * - mongodb://user:pass@some-url:port,some-url:port,.../some-db... * - It has been grouped like this: (mongodb+srv://)(user):(pass)@(some-url)/(some-db...)?(params...) - * - User and password are matched only in the authority, before the first / (CREDENTIAL_PART), as the driver reads - * them (driver 4.11: the authority ends at the first /, so a ? before it belongs to the credentials): a : and a later - * @ in the path or the options are not credentials (BF-060: they were, and the database was lost or another one was - * taken). The URIs this changes are exactly those where the credentials were taken across a /; each is now read with - * the / ending the authority, or is invalid when that leaves no host (mongodb:///:p@h/db). The host list - * (HOST_LIST_PART) ends at the first / or ?, as before. + * - User and password are matched only in the authority, which ends at the first / or ? (CREDENTIAL_PART), as the + * driver reads it (driver 5.5): a : and a later @ in the path or the options are not credentials (BF-060: they were, + * and the database was lost or another one was taken), and neither is a ? with what follows it. So + * mongodb://u?x:p?q@h/db?a=1 is host u, no credentials, no database and the options x:p?q@h/db?a=1, which is how the + * driver reads it. The URIs this changes are exactly those where the credentials were taken across a / or a ?; each + * is now read with that / or ? ending the authority, or is invalid when that leaves no host (mongodb:///:p@h/db). + * The host list (HOST_LIST_PART) ends at the first / or ?, as before. * - Limits: this is a split, not the driver's check. A URI the driver refuses can still match: an unencoded /, : or @ - * in the credentials (mongodb://u:p/ss@h/db is read as host u:p, database ss@h/db), options without a / before the ?, - * or a / in the database name. The driver refuses such a URI when it connects. + * in the credentials (mongodb://u:p/ss@h/db is read as host u:p, database ss@h/db), or a / in the database name. The driver refuses such a URI when it connects. * - * ^(mongodb(?:\+srv)?:\/\/)(?:([^\/]+):([^\/]+)@)?([^\/\?]+)\/?([^\?]+)?\??(.+)?$ + * ^(mongodb(?:\+srv)?:\/\/)(?:([^\/\?]+):([^\/\?]+)@)?([^\/\?]+)\/?([^\?]+)?\??(.+)?$ */ - private static final String CREDENTIAL_PART = "[^/]+"; + private static final String CREDENTIAL_PART = "[^/?]+"; private static final String HOST_LIST_PART = "[^/?]+"; diff --git a/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoPluginValidateConfigTest.java b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoPluginValidateConfigTest.java index 4d7e3b058..54baf70a3 100644 --- a/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoPluginValidateConfigTest.java +++ b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoPluginValidateConfigTest.java @@ -45,21 +45,21 @@ public class MongoPluginValidateConfigTest { /** * NEW-20: connection strings {@code MONGO_URL_REGEX} matches and the driver refuses, one per reason - an authority * read as host {@code u:p} with a non-numeric port (BF-060's split case), a database holding '/' or ' ', options - * without the leading '/', an option without '=', an SRV host carrying a port, a username without a password, a + * after a '?' in the credentials, an option without '=', an SRV host carrying a port, a username without a password, a * port that is not a number and one out of range, an unknown read preference, an unknown auth mechanism, and an * unenclosed IPv6 literal. Both tests below assert the driver's verdict case by case, so this list pins the * parsing decisions of whichever driver the classpath resolves rather than a stable MongoDB URI specification. */ static final List DRIVER_REFUSED_URIS = List.of( - "mongodb://u:p/ss@h/db", "mongodb://h/db/x", "mongodb://h?x=1", "mongodb://localhost?x=1", + "mongodb://u:p/ss@h/db", "mongodb://h/db/x", "mongodb://u?x:p?q@h/db", "mongodb://localhost/db?x", "mongodb://h/db?x", "mongodb+srv://h:27017/db", "mongodb://u@h/db", "mongodb://h:notaport/db", "mongodb://h:99999/db", "mongodb://h/db?readPreference=bogus", "mongodb://h/a b", "mongodb://u:p@h/db?authMechanism=NOPE", "mongodb://[::1/db"); - /** NEW-20: connection strings that look malformed and the driver accepts; the last two are BF-060's cases. */ + /** NEW-20: connection strings that look malformed and the driver accepts; the last two are BF-060's case and an options part without the leading '/' (the authority ends at the '?'). */ static final List DRIVER_ACCEPTED_URIS = List.of( "mongodb://h/db#frag", "mongodb://h,/db", "mongodb://h/db?ssl=notabool", "mongodb://h/db?w=x=y", - "mongodb://realhost/db?appName=a:b@other", "mongodb://u?x:p?q@h/db"); + "mongodb://realhost/db?appName=a:b@other", "mongodb://h?x=1"); /** NEW-55: host-field values the driver refuses once the connection string is built around them. */ static final List DRIVER_REFUSED_HOSTS = List.of("h:notaport", "[::1", "h:99999"); @@ -110,7 +110,7 @@ public void aUriWithAnEmptyAuthorityIsInvalidBF060() { * NEW-20: a connection string the regex matches but the driver's own parser refuses is now reported, instead of * saving and failing later on connect. Each case asserts three things in order: that the regex accepts it, so the * check that fires is the driver one and not {@code isValid}; that the driver refuses it, so the expectation is the - * driver's own verdict and not a list copied from a probe; and the resulting code. `mongodb://localhost?x=1` also + * driver's own verdict and not a list copied from a probe; and the resulting code. `mongodb://localhost/db?x` also * pins the choice of code: a loopback host inside a refused URI gives the URL code alone, because a refused string * yields no hosts for the loopback check to see. * diff --git a/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/model/MongoConnectionUriParserTest.java b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/model/MongoConnectionUriParserTest.java index a711ad5cf..5d2c370c4 100644 --- a/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/model/MongoConnectionUriParserTest.java +++ b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/model/MongoConnectionUriParserTest.java @@ -24,7 +24,7 @@ * ({@code getParsedDatabase}, used at lines 189, 212, 307 and 365). A misread therefore shows as a wrong or missing database * name, not as a wrong host. * - *

Limits: string handling, no server; the driver (the module's, 4.11) is used only to read the database it would connect + *

Limits: string handling, no server; the driver (the module's, 5.5) is used only to read the database it would connect * with (BF-060 agreement test); the client form carries a copy of the regex as it was before BF-060, which accepts every * URI this one accepts (mongoDatasourceForm.tsx:53-55), not tested here. */ @@ -122,9 +122,9 @@ public void invalidStringsAreRejectedAndGiveNoParts() { /** * BF-060 (formerly pinned as the plan section 9 row "MongoConnectionUriParser reads a `:`...`@` in the query string as - * credentials"): the credentials are matched only before the first {@code /}, so a {@code :} and a later {@code @} - * in the options stay in the options, while a {@code ?} before the first {@code /} stays in the credentials, as the - * driver reads it. {@code mongodb://realhost/db?appName=a:b@other} has host + * credentials"): the credentials are matched only in the authority, which ends at the first {@code /} or {@code ?}, so + * a {@code :} and a later {@code @} in the options stay in the options, and a {@code ?} ends the authority, as the + * driver (5.5) reads it. {@code mongodb://realhost/db?appName=a:b@other} has host * {@code realhost} and database {@code db} (it lost its database before), and {@code mongodb://h/db?appName=a:b@c/other} * has database {@code db} (it gave {@code other}); the driver reads the same database (driver agreement test below). */ @@ -141,26 +141,44 @@ public void aColonAndAnAtSignInTheOptionsStayInTheOptionsBF060() { String withCredentials = "mongodb://u:p@h/db?appName=a:b@c"; assertEquals(expected(PLAIN_HEAD, "u", "p", "h", "db", "appName=a:b@c"), parts(withCredentials), "real credentials are still read"); - assertEquals(expected(PLAIN_HEAD, "u?x", "p?q", "h", "db", "a=1"), parts("mongodb://u?x:p?q@h/db?a=1"), "a ? before the first / is in the credentials"); + assertEquals(expected(PLAIN_HEAD, null, null, "u", null, "x:p?q@h/db?a=1"), parts("mongodb://u?x:p?q@h/db?a=1"), + "the authority ends at the first ?, so u is the host and x:p?q@h/db?a=1 are the options, not credentials"); } /** - * BF-060: for every URI the MongoDB driver accepts, the database the parser gives is the one the driver connects with - * ({@code ConnectionString.getDatabase}): the database that the structure and the queries use is the URI's. The driver - * is the module's own (4.11), so a driver upgrade that reads the authority differently fails here: 5.5 ends the authority - * at a {@code ?}, reads no database from {@code mongodb://u?x:p?q@h/db?a=1} and refuses {@code mongodb://?u:p@h/db}. + * BF-060: for every URI the MongoDB driver accepts and reads a database from, the database the parser gives is the one + * the driver connects with ({@code ConnectionString.getDatabase}): the database that the structure and the queries use + * is the URI's. */ @Test public void theDatabaseIsTheOneTheDriverReadsBF060() { for (String uri : List.of("mongodb://realhost/db?appName=a:b@other", "mongodb://h/db?appName=a:b@c/other", "mongodb://u:p@h:27017/db?x=y", "mongodb+srv://u:p@cluster0.example.net/db?retryWrites=true", "mongodb://us%40er:p%3Aw%40rd@h/db", "mongodb://h1:1,h2:2/db?replicaSet=rs0", - "mongodb://u:p@h/db?authSource=admin&appName=x:y@z", "mongodb://u?x:p?q@h/db?a=1", "mongodb://?u:p@h/db")) { + "mongodb://u:p@h/db?authSource=admin&appName=x:y@z")) { String driverDatabase = new com.mongodb.ConnectionString(uri).getDatabase(); System.out.println("[MongoConnectionUriParserTest] " + uri + " driver database " + driverDatabase); assertEquals(driverDatabase, MongoConnectionUriParser.parseDatabaseFrom(uri), uri); } } + /** + * BF-060, driver 5.5: the authority ends at the first {@code ?}, so {@code mongodb://u?x:p?q@h/db?a=1} is host + * {@code u} with no database for the driver. The parser reads it the same way and refuses it with the empty-database + * error, instead of reading credentials {@code u?x:p?q} and the database {@code db}. + */ + @Test + public void aQuestionMarkInTheCredentialsEndsTheAuthorityAsForTheDriverBF060() { + String uri = "mongodb://u?x:p?q@h/db?a=1"; + com.mongodb.ConnectionString driver = new com.mongodb.ConnectionString(uri); + System.out.println("[MongoConnectionUriParserTest] " + uri + " driver hosts " + driver.getHosts() + " database " + driver.getDatabase()); + assertEquals(List.of("u"), driver.getHosts(), "the driver reads the host up to the first ?"); + assertNull(driver.getDatabase(), "the driver reads no database from " + uri); + + PluginException thrown = assertThrows(PluginException.class, () -> MongoConnectionUriParser.parseDatabaseFrom(uri)); + assertEquals(DATASOURCE_ARGUMENT_ERROR, thrown.getError()); + assertEquals("MONGODB_DATABASE_EMPTY", thrown.getMessageKey(), "the parser reads no database either, as the driver does"); + } + /** * Observation, no section 9 row: a user name without a password has no {@code :} to match the credentials group, so * {@code mongodb://user@h/db} is read as host {@code user@h} with no user. The database is still right and the driver gets diff --git a/server/api-service/lowcoder-sdk/pom.xml b/server/api-service/lowcoder-sdk/pom.xml index 8d41876d6..5e6473864 100644 --- a/server/api-service/lowcoder-sdk/pom.xml +++ b/server/api-service/lowcoder-sdk/pom.xml @@ -161,7 +161,6 @@ io.netty netty-resolver - 4.1.109.Final io.projectreactor.netty diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuard.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuard.java index 851bdf6ca..ee27315bb 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuard.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuard.java @@ -92,7 +92,6 @@ public static List occurrences(ObjectMapper mapper, Class type) { add(type, CLASS_MEMBER, classAnnotations(config, annotatedClass), seen, result); annotatedClass.fields().forEach(field -> add(type, field.getFullName(), annotations(field.getAllAnnotations()), seen, result)); annotatedClass.memberMethods().forEach(method -> addWithParameters(type, method, seen, result)); - annotatedClass.getStaticMethods().forEach(method -> addWithParameters(type, method, seen, result)); annotatedClass.getFactoryMethods().forEach(method -> addWithParameters(type, method, seen, result)); annotatedClass.getConstructors().forEach(constructor -> addWithParameters(type, constructor, seen, result)); if (annotatedClass.getDefaultConstructor() != null) { diff --git a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/tree-text/E13.txt b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/tree-text/E13.txt index 04a1951d3..874fa30f2 100644 --- a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/tree-text/E13.txt +++ b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/tree-text/E13.txt @@ -1,2 +1,2 @@ production {"decimal":1.10,"instant":0.0} -toString {"decimal":1.10,"instant":"[ERROR: (com.fasterxml.jackson.databind.exc.InvalidDefinitionException) Java 8 date/time type `java.time.Instant` not supported by default: add Module \"com.fasterxml.jackson.datatype:jackson-datatype-jsr310\" to enable handling]"} +toString {"decimal":1.10,"instant":"[ERROR: (com.fasterxml.jackson.databind.exc.InvalidDefinitionException) Java 8 date/time type `java.time.Instant` not supported by default: add Module \"com.fasterxml.jackson.datatype:jackson-datatype-jsr310\" to enable handling (or disable `MapperFeature.REQUIRE_HANDLERS_FOR_JAVA8_TIMES`)]"} diff --git a/server/api-service/lowcoder-server/pom.xml b/server/api-service/lowcoder-server/pom.xml index 4a95d9f37..39f17552c 100644 --- a/server/api-service/lowcoder-server/pom.xml +++ b/server/api-service/lowcoder-server/pom.xml @@ -93,11 +93,6 @@ org.springdoc springdoc-openapi-starter-webflux-ui - - org.springdoc - springdoc-openapi-webflux-ui - 1.8.0 - io.projectreactor.tools blockhound @@ -165,11 +160,6 @@ io.projectreactor reactor-tools - - org.mockito - mockito-inline - test - org.mockito mockito-core diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/OpenAPIDocsConfiguration.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/OpenAPIDocsConfiguration.java index 877dd4fc2..a898c4a3a 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/OpenAPIDocsConfiguration.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/OpenAPIDocsConfiguration.java @@ -12,7 +12,7 @@ import io.swagger.v3.oas.models.servers.ServerVariables; import io.swagger.v3.oas.models.tags.Tag; import org.lowcoder.sdk.config.CommonConfig; -import org.springdoc.core.customizers.OpenApiCustomiser; +import org.springdoc.core.customizers.OpenApiCustomizer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; @@ -135,7 +135,7 @@ private Server createCustomServer() { * Customizes the OpenAPI spec at runtime to sort tags and paths. */ @Bean - public OpenApiCustomiser sortOpenApiSpec() { + public OpenApiCustomizer sortOpenApiSpec() { return openApi -> { // Sort tags alphabetically if (openApi.getTags() != null) { diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/GlobalContextFilter.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/GlobalContextFilter.java index fe00a0065..402c4df8b 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/GlobalContextFilter.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/GlobalContextFilter.java @@ -98,7 +98,8 @@ private Map buildContextMap(ServerWebExchange serverWebExchange, .collect(toMap(v -> v.getKey().substring((MDC_HEADER_PREFIX.length())), Map.Entry::getValue)); contextMap.put(VISITOR_ID, visitorId); contextMap.put(CLIENT_IP, NetworkUtils.getRemoteIp(serverWebExchange)); - contextMap.put(REQUEST_ID_LOG, getOrCreateRequestId(request)); + String requestId = getOrCreateRequestId(request); + contextMap.put(REQUEST_ID_LOG, requestId); contextMap.put(REQUEST_PATH, request.getPath().pathWithinApplication().value()); contextMap.put(REQUEST, request); contextMap.put(REQUEST_METHOD, ofNullable(request.getMethod()).map(HttpMethod::name).orElse("")); @@ -113,17 +114,13 @@ private Map buildContextMap(ServerWebExchange serverWebExchange, //Analytics related fields MultiValueMap headers = writableHttpHeaders(request.getHeaders()); headers.remove("Cookie"); + headers.addIfAbsent(REQUEST_ID_HEADER, requestId); contextMap.put(HEADERS, headers); return contextMap; } - @SuppressWarnings("ConstantConditions") private String getOrCreateRequestId(final ServerHttpRequest request) { - if (!request.getHeaders().containsKey(REQUEST_ID_HEADER)) { - request.mutate().header(REQUEST_ID_HEADER, generate()).build(); - } - - return request.getHeaders().get(REQUEST_ID_HEADER).get(0); + return ofNullable(request.getHeaders().getFirst(REQUEST_ID_HEADER)).orElseGet(() -> generate()); } @Override diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/UserEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/UserEndpointsContractTest.java index eb8ae5b8d..9ef665ed8 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/UserEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/UserEndpointsContractTest.java @@ -488,14 +488,15 @@ void uploadProfilePhotoById_targetSuperAdminVisitorSuperAdmin_allowed() { /** * {@code deleteProfilePhoto} maps the service's {@code Mono} to a {@code ResponseView}, which never happens: - * the answer is HTTP 200 with a JSON {@code Content-Type} and an empty body, not an envelope (O21). + * the answer is HTTP 200 with an empty body and no {@code Content-Type}, not an envelope (O21). Spring Framework 6.1 + * still set the JSON type of the body it would have written; 6.2 sets none for an empty body. */ @Test void deleteProfilePhoto() { Mockito.when(userService.deleteProfilePhoto(VISITOR)).thenReturn(Mono.empty()); try (ContractTestClient client = client()) { EntityExchangeResult result = CONTRACT.exchange(client, "deleteProfilePhoto", Map.of(), null); - EndpointContract.assertEmptyResponse(result, HttpStatus.OK, MediaType.APPLICATION_JSON); + EndpointContract.assertEmptyResponse(result, HttpStatus.OK, NO_CONTENT_TYPE); Mockito.verify(userService).deleteProfilePhoto(VISITOR); } } @@ -508,7 +509,7 @@ void deleteProfilePhotoById() { Mockito.when(userService.deleteProfilePhoto(member)).thenReturn(Mono.empty()); try (ContractTestClient client = client()) { EntityExchangeResult result = CONTRACT.exchange(client, "deleteProfilePhotoById", Map.of(), null, ORG_ID, USER_ID); - EndpointContract.assertEmptyResponse(result, HttpStatus.OK, MediaType.APPLICATION_JSON); + EndpointContract.assertEmptyResponse(result, HttpStatus.OK, NO_CONTENT_TYPE); Mockito.verify(userService).deleteProfilePhoto(member); } } @@ -700,12 +701,12 @@ void lostPassword() { } } - /** A blank email: the controller answers an empty {@code Mono}, so HTTP 200, JSON, with an empty body (O21). */ + /** A blank email: the controller answers an empty {@code Mono}, so HTTP 200 with an empty body and no {@code Content-Type} (O21). */ @Test void lostPasswordWithoutEmail() { try (ContractTestClient client = client()) { EntityExchangeResult result = CONTRACT.exchange(client, "lostPassword", Map.of(), "{\"userEmail\": \"" + BLANK + "\"}"); - EndpointContract.assertEmptyResponse(result, HttpStatus.OK, MediaType.APPLICATION_JSON); + EndpointContract.assertEmptyResponse(result, HttpStatus.OK, NO_CONTENT_TYPE); Mockito.verifyNoInteractions(userApiService); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/filter/GlobalContextFilterTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/filter/GlobalContextFilterTest.java new file mode 100644 index 000000000..721259912 --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/filter/GlobalContextFilterTest.java @@ -0,0 +1,101 @@ +package org.lowcoder.api.framework.filter; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.concurrent.atomic.AtomicReference; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.lowcoder.api.contract.support.ContractTestClient; +import org.lowcoder.api.framework.view.ResponseView; +import org.lowcoder.domain.organization.model.MemberRole; +import org.lowcoder.domain.organization.model.OrgMember; +import org.lowcoder.sdk.constants.GlobalContext; +import org.springframework.http.ResponseEntity; +import org.springframework.util.MultiValueMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import reactor.core.publisher.Mono; + +/** + * Tests of the request id handling of {@link GlobalContextFilter}, through the request stack of {@link ContractTestClient} + * (production filter, codecs and handler mapping). The probe controller records what the filter wrote into the Reactor + * context: the log context's {@code requestId} and the analytics {@code headers} map. + */ +class GlobalContextFilterTest { + + private static final String REQUEST_ID_HEADER = "X-REQUEST-ID"; + private static final String CLIENT_REQUEST_ID = "client-request-1"; + private static final String COOKIE_HEADER = "Cookie"; + + /** What the probe saw in the Reactor context of the request. */ + private record Seen(String requestId, MultiValueMap headers) { + } + + private static final AtomicReference SEEN = new AtomicReference<>(); + + @BeforeEach + void reset() { + SEEN.set(null); + } + + @RestController + static class ContextProbeController { + @GetMapping("/probe/context") + public Mono>> context() { + return Mono.deferContextual(ctx -> { + SEEN.set(new Seen(ctx.get(GlobalContext.REQUEST_ID_LOG), ctx.get(GlobalContext.HEADERS))); + return Mono.just(ResponseEntity.ok(ResponseView.success("fine"))); + }); + } + } + + private static ContractTestClient harness() { + return ContractTestClient.builder() + .controller(ContextProbeController.class) + .visitor("user-1", OrgMember.builder().orgId("org-1").userId("user-1").role(MemberRole.MEMBER).build()) + .build(); + } + + /** + * A request without X-REQUEST-ID is answered normally (it failed with HTTP 500 when the id was looked up in the + * original headers after a discarded {@code mutate()}), and the generated id is the context's requestId and the + * X-REQUEST-ID value of the analytics headers. + */ + @Test + void withoutRequestIdHeader_theRequestIsAnsweredAndAnIdIsGeneratedIntoContextAndHeaders() { + try (ContractTestClient client = harness()) { + client.web().get().uri("/probe/context").header(COOKIE_HEADER, "LOWCODE_TOKEN=secret").exchange() + .expectStatus().isOk(); + + Seen seen = SEEN.get(); + System.out.println("[GlobalContextFilterTest] no client id -> requestId '" + seen.requestId() + "', headers " + + seen.headers().keySet()); + assertThat(seen.requestId()).as("requestId in the log context").isNotBlank(); + assertThat(seen.headers().get(REQUEST_ID_HEADER)) + .as("X-REQUEST-ID of the analytics headers must be the generated requestId") + .containsExactly(seen.requestId()); + assertThat(seen.headers()).as("the cookie is still removed from the analytics headers") + .doesNotContainKey(COOKIE_HEADER); + } + } + + /** A request with X-REQUEST-ID keeps the client's value in the context's requestId and in the analytics headers. */ + @Test + void withRequestIdHeader_theClientValueIsKeptInContextAndHeaders() { + try (ContractTestClient client = harness()) { + client.web().get().uri("/probe/context").header(REQUEST_ID_HEADER, CLIENT_REQUEST_ID).exchange() + .expectStatus().isOk(); + + Seen seen = SEEN.get(); + System.out.println("[GlobalContextFilterTest] client id -> requestId '" + seen.requestId() + "', headers " + + seen.headers().get(REQUEST_ID_HEADER)); + assertThat(seen.requestId()).as("requestId in the log context must be the client's value") + .isEqualTo(CLIENT_REQUEST_ID); + assertThat(seen.headers().get(REQUEST_ID_HEADER)) + .as("X-REQUEST-ID of the analytics headers must be the client's value, unchanged") + .containsExactly(CLIENT_REQUEST_ID); + } + } +} diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/types/org.lowcoder.domain.plugin.client.dto.GetPluginDynamicConfigRequestDTO.D3.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/types/org.lowcoder.domain.plugin.client.dto.GetPluginDynamicConfigRequestDTO.D3.json new file mode 100644 index 000000000..cf9221d38 --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/types/org.lowcoder.domain.plugin.client.dto.GetPluginDynamicConfigRequestDTO.D3.json @@ -0,0 +1,42 @@ +{ + "dataSourceId" : { + "absent" : { + "class" : "null", + "value" : "null" + }, + "null" : { + "class" : "null", + "value" : "null" + } + }, + "pluginName" : { + "absent" : { + "class" : "null", + "value" : "null" + }, + "null" : { + "class" : "null", + "value" : "null" + } + }, + "path" : { + "absent" : { + "class" : "null", + "value" : "null" + }, + "null" : { + "class" : "null", + "value" : "null" + } + }, + "dataSourceConfig" : { + "absent" : { + "class" : "null", + "value" : "null" + }, + "null" : { + "class" : "null", + "value" : "null" + } + } +} \ No newline at end of file From 55a0700da77a7d9803d3ef4a2f4682033ec9d159 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Fri, 20 Nov 2026 09:24:10 +0100 Subject: [PATCH 03/40] build: remove the deprecated Spring Boot 3.4/3.5 usages ahead of Spring 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 --- server/api-service/lowcoder-dependencies/pom.xml | 4 ++-- .../service/ServerSettingServiceImpl.java | 2 +- .../configuration/CustomWebFluxConfiguration.java | 2 +- .../src/main/resources/application-debug.yaml | 5 +++-- .../src/main/resources/application.yaml | 14 ++++++++------ .../authentication/EmailBackfillEndToEndTest.java | 4 ++-- .../api/contract/ServerCodecGuardTest.java | 2 +- .../datasource/DatasourceRepositoryMongoTest.java | 6 +++--- .../TokenBasedConnectionRepositoryMongoTest.java | 6 +++--- .../boundary-sites/json-boundary-sites.tsv | 2 +- 10 files changed, 25 insertions(+), 22 deletions(-) diff --git a/server/api-service/lowcoder-dependencies/pom.xml b/server/api-service/lowcoder-dependencies/pom.xml index d0399579c..94c3d961b 100644 --- a/server/api-service/lowcoder-dependencies/pom.xml +++ b/server/api-service/lowcoder-dependencies/pom.xml @@ -48,7 +48,7 @@ org.pf4j pf4j - 3.11.0 + 3.16.1 @@ -147,7 +147,7 @@ org.pf4j pf4j-spring - 0.8.0 + 0.10.0 diff --git a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/serversetting/service/ServerSettingServiceImpl.java b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/serversetting/service/ServerSettingServiceImpl.java index 64e1847ab..a627b78ac 100644 --- a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/serversetting/service/ServerSettingServiceImpl.java +++ b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/serversetting/service/ServerSettingServiceImpl.java @@ -10,7 +10,7 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; import java.util.*; import java.util.stream.Collectors; import java.util.stream.StreamSupport; diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java index 4cd19f89d..3a3b353b8 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java @@ -26,7 +26,7 @@ @Configuration public class CustomWebFluxConfiguration extends DelegatingWebFluxConfiguration { - @Value("${spring.codec.max-in-memory-size:20MB}") + @Value("${spring.http.codecs.max-in-memory-size:${spring.codec.max-in-memory-size:20MB}}") private String codecMaxInMemorySize = "20MB"; @Bean diff --git a/server/api-service/lowcoder-server/src/main/resources/application-debug.yaml b/server/api-service/lowcoder-server/src/main/resources/application-debug.yaml index 5d0c8d5c3..1ae6f1b5d 100644 --- a/server/api-service/lowcoder-server/src/main/resources/application-debug.yaml +++ b/server/api-service/lowcoder-server/src/main/resources/application-debug.yaml @@ -8,8 +8,9 @@ spring: main: allow-bean-definition-overriding: false allow-circular-references: false - codec: - max-in-memory-size: 20MB + http: + codecs: + max-in-memory-size: 20MB webflux: base-path: / mail: diff --git a/server/api-service/lowcoder-server/src/main/resources/application.yaml b/server/api-service/lowcoder-server/src/main/resources/application.yaml index 97b7d6f70..74962cb33 100644 --- a/server/api-service/lowcoder-server/src/main/resources/application.yaml +++ b/server/api-service/lowcoder-server/src/main/resources/application.yaml @@ -17,8 +17,9 @@ spring: main: allow-bean-definition-overriding: false allow-circular-references: false - codec: - max-in-memory-size: 20MB + http: + codecs: + max-in-memory-size: 20MB webflux: base-path: / mail: @@ -111,7 +112,8 @@ springdoc: management: endpoints: - enabled-by-default: false + access: + default: none web: base-path: "/api/status" exposure: @@ -120,11 +122,11 @@ management: health: show-details: never show-components: always - enabled: true + access: read-only metrics: - enabled: true + access: read-only prometheus: - enabled: true + access: read-only health: mail: enabled: false diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/EmailBackfillEndToEndTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/EmailBackfillEndToEndTest.java index 0f36acf4d..74b3cdd44 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/EmailBackfillEndToEndTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/EmailBackfillEndToEndTest.java @@ -34,7 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.mockito.ArgumentCaptor; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.test.context.ActiveProfiles; @@ -72,7 +72,7 @@ public class EmailBackfillEndToEndTest { @Autowired private OrgMemberService orgMemberService; /** Replaces the SMTP sender; no other case of this class requests a password reset mail. */ - @MockBean + @MockitoBean private EmailCommunicationService emailCommunicationService; private static final Duration RESET_TOKEN_LIFETIME = Duration.ofHours(12); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ServerCodecGuardTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ServerCodecGuardTest.java index e5cab6fd5..b97433c09 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ServerCodecGuardTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ServerCodecGuardTest.java @@ -38,7 +38,7 @@ class ServerCodecGuardTest { private static final String OBJECT_MAPPER_BEAN_NAME = "objectMapper"; - /** E7: {@code spring.codec.max-in-memory-size} defaults to 20MB ({@code CustomWebFluxConfiguration.java:29-30}). */ + /** E7: {@code spring.http.codecs.max-in-memory-size} defaults to 20MB ({@code CustomWebFluxConfiguration.java:29-30}). */ static final int SERVER_MAX_IN_MEMORY_SIZE = 20 * 1024 * 1024; /** E3: Jackson's defaults, which {@code JsonUtils} does not override. */ private static final int MAX_NESTING_DEPTH = 1000; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/DatasourceRepositoryMongoTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/DatasourceRepositoryMongoTest.java index 9ed55cad5..9ed7a8c95 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/DatasourceRepositoryMongoTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/DatasourceRepositoryMongoTest.java @@ -23,7 +23,7 @@ import org.lowcoder.sdk.util.IDUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.data.mongodb.core.ReactiveMongoTemplate; import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Query; @@ -50,9 +50,9 @@ class DatasourceRepositoryMongoTest { private static final String JS_TYPE = "someJsPlugin"; private static final String BROKEN_TYPE = "brokenPlugin"; - @MockBean + @MockitoBean private DatasourceMetaInfoService datasourceMetaInfoService; - @MockBean + @MockitoBean private DatasourcePluginClient datasourcePluginClient; @Autowired private DatasourceRepository repository; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/TokenBasedConnectionRepositoryMongoTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/TokenBasedConnectionRepositoryMongoTest.java index d9b0fcd50..4843634f5 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/TokenBasedConnectionRepositoryMongoTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/TokenBasedConnectionRepositoryMongoTest.java @@ -24,7 +24,7 @@ import org.lowcoder.sdk.util.IDUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.data.mongodb.core.ReactiveMongoTemplate; import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Query; @@ -80,9 +80,9 @@ public void doDecrypt(Function decryptFunc) { } } - @MockBean + @MockitoBean private DatasourceMetaInfoService datasourceMetaInfoService; - @MockBean + @MockitoBean private DatasourcePluginClient datasourcePluginClient; @Autowired private TokenBasedConnectionRepository repository; diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv b/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv index 46d880f6b..182f5f5e9 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv @@ -223,7 +223,7 @@ lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/Mo lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:0 import test:node-service sha256=c94453e304c1445c; OBJECT_MAPPER (:61) is used only at :138, a listed site lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java:0 import test:jwt-claims sha256=5869011927b2fe4f; objectMapper (:9) is used only at :33, a listed site lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java:0 import test:marketplace-render sha256=fa0b872f2c0cea8b; the mapper of :34 is used only at :115, a listed site; SerializationFeature is its configuration lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java##import#1 -lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:0 import test:server-codec-guard sha256=8add23907fd09443; Jackson uses are :34, :49, :51, all listed sites lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:0 import test:server-codec-guard sha256=ecf32a99e3566ae1; Jackson uses are :34, :49, :51, all listed sites lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:0 import test:api-flow sha256=4a4195c176c865b8; the mapper of :82 is used only at :83, a listed site lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java:0 import test:subscription-relay sha256=0ad6f8dd9c9447c3; JsonNode is the request body and the answer's data (server codec) and the relay answer of the listed :202; JsonNodeFactory builds the empty library (:124-126); request members are read with path/asText/asBoolean/hasNonNull/isArray/size (:54, :61, :76, :79-81, :85, :89-90, :92) and put into the payload as nodes (:86), encoded at the listed :202; the relay answer is read with path/isEmpty/asBoolean/isArray/asText/equals (:145, :154-161); no toString/toPrettyString/String.valueOf/concatenation on a node lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java:0 import test:subscription-relay sha256=4955235aa695f2f7; the relay answer, decoded at the listed :83, is written with JsonNode.toString() (:70, Jackson's internal default mapper) and answered as text through ApiFlowController.java:71 lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java##import#1 From fa9cb5e2a5b8eb5840716a01909667ee7b4a1962 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Fri, 20 Nov 2026 10:13:49 +0100 Subject: [PATCH 04/40] build: build and test on JDK 25 (bytecode stays Java 17) 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. - / -> 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 --- server/api-service/lombok.config | 3 +++ server/api-service/lowcoder-dependencies/pom.xml | 4 ++-- server/api-service/lowcoder-plugins/pom.xml | 3 +-- server/api-service/lowcoder-plugins/smtpPlugin/pom.xml | 3 ++- .../sdk/plugin/common/sql/ResultSetParserContractTest.java | 6 +++++- server/api-service/pom.xml | 6 ++++-- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/server/api-service/lombok.config b/server/api-service/lombok.config index 4190a3ac9..fd318f44f 100644 --- a/server/api-service/lombok.config +++ b/server/api-service/lombok.config @@ -6,3 +6,6 @@ lombok.copyableAnnotations += org.springframework.context.annotation.Lazy # Mark Lombok-generated methods with @lombok.Generated, which JaCoCo leaves out of coverage (T11.1) lombok.addLombokGeneratedAnnotation = true + +# Since Lombok 1.18.44 @Jacksonized asks which Jackson to generate for; keep generating for Jackson 2 without the warning +lombok.jacksonized.jacksonVersion += 2 diff --git a/server/api-service/lowcoder-dependencies/pom.xml b/server/api-service/lowcoder-dependencies/pom.xml index 94c3d961b..257a1fd5b 100644 --- a/server/api-service/lowcoder-dependencies/pom.xml +++ b/server/api-service/lowcoder-dependencies/pom.xml @@ -60,7 +60,7 @@ org.projectlombok lombok - 1.18.32 + 1.18.48 @@ -218,7 +218,7 @@ io.projectreactor.tools blockhound - 1.0.8.RELEASE + 1.0.19.RELEASE diff --git a/server/api-service/lowcoder-plugins/pom.xml b/server/api-service/lowcoder-plugins/pom.xml index 9c6abe265..ebacdf59e 100644 --- a/server/api-service/lowcoder-plugins/pom.xml +++ b/server/api-service/lowcoder-plugins/pom.xml @@ -192,8 +192,7 @@ maven-compiler-plugin 3.13.0 - ${java.version} - ${java.version} + ${java.version} -parameters diff --git a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml index e2ec9c50a..1d9c29fe5 100644 --- a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml @@ -101,7 +101,8 @@ maven-antrun-plugin org.apache.maven.plugins diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/common/sql/ResultSetParserContractTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/common/sql/ResultSetParserContractTest.java index c7f3702a6..1b3da56e0 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/common/sql/ResultSetParserContractTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/common/sql/ResultSetParserContractTest.java @@ -70,6 +70,9 @@ public class ResultSetParserContractTest { static final Instant INSTANT = Instant.parse("2024-02-29T13:14:15.123Z"); static final byte[] BYTES = {0, 1, (byte) 0xFF, 'a'}; static final String TEXT = "žluťoučký kůň 🐎"; + /** The JDK's own message of {@code SerialClob.getAsciiStream}: JDK 17 spells it with the typo, JDK 25 without it. */ + static final String CLOB_MESSAGE_FIXED_BY_NEWER_JDK = "SerialClob cannot return the CLOB value"; + static final String CLOB_MESSAGE_PINNED = "SerialClob cannot return a the CLOB value"; private static final GoldenJson GOLDEN = GoldenJson.forModule(); private static TimeZone defaultZone; @@ -104,7 +107,8 @@ public void leafValuesAsPinned() throws SQLException { Map report = new LinkedHashMap<>(); report.put(COLUMNS_KEY, perColumn); report.put(ROW_KEY, QueryResults.report(QueryExecutionResult.success(rows))); - String actual = ConfigBinding.write(report); + String actual = ConfigBinding.write(report) + .replace(CLOB_MESSAGE_FIXED_BY_NEWER_JDK, CLOB_MESSAGE_PINNED); System.out.println("[ResultSetParserContractTest] " + rows.size() + " row, " + perColumn.size() + " columns\n" + actual); GOLDEN.assertJson(REPORT, actual); } diff --git a/server/api-service/pom.xml b/server/api-service/pom.xml index e5874a0a2..549775010 100644 --- a/server/api-service/pom.xml +++ b/server/api-service/pom.xml @@ -15,6 +15,9 @@ 17 ${java.version} ${java.version} + + full true true true @@ -140,8 +143,7 @@ maven-compiler-plugin 3.13.0 - ${java.version} - ${java.version} + ${java.version} -parameters From 3ad08dcb05dfdb76a661c56d588660931b02a58d Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Fri, 20 Nov 2026 10:33:40 +0100 Subject: [PATCH 05/40] fix: answer a client error ResponseStatusException with its own status 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":,"message":,"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 --- .../exception/GlobalExceptionHandler.java | 26 +++++- .../api/contract/PayloadBoundsTest.java | 14 +-- .../ApiFlowEndpointsContractTest.java | 38 +++++--- .../error/ErrorCasesContractTest.java | 90 +++++++++++++++++-- .../support/ContractTestClientTest.java | 3 +- .../exception/GlobalExceptionHandlerTest.java | 37 +++++++- .../errors/X10.controller-503.json | 1 + .../errors/X5.unmapped-path.json | 2 +- .../errors/X8.controller-405.json | 1 + .../errors/X9.controller-400.json | 1 + 10 files changed, 181 insertions(+), 32 deletions(-) create mode 100644 server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X10.controller-503.json create mode 100644 server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X8.controller-405.json create mode 100644 server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X9.controller-400.json diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/GlobalExceptionHandler.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/GlobalExceptionHandler.java index 5b6579e08..0a2abef49 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/GlobalExceptionHandler.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/GlobalExceptionHandler.java @@ -38,6 +38,8 @@ @ControllerAdvice public class GlobalExceptionHandler { + private static final String CLIENT_ERROR_LOG_FORMAT = "client error {} for {}: {}"; + private final Logger mainLog = LoggerFactory.getLogger(getClass()); private final Logger queryErrorLog = LoggerFactory.getLogger("queryError"); @@ -148,9 +150,29 @@ public Mono> catchResponseStatusException(ResponseStatusExceptio return Mono.just(error(bizError.getBizErrorCode(), e.getMessage() + " - path: " + exchange.getRequest().getPath())); }); - } else { - return catchException(e, exchange); } + if (e.getStatusCode().is4xxClientError()) { + return catchClientError(e, exchange); + } + return catchException(e, exchange); + } + + /** + * A 4xx {@link ResponseStatusException} outside the plugin endpoints (an unmatched route, a 405, a controller's 4xx) + * keeps its HTTP status and answers it as the code, like {@code CustomErrorWebExceptionHandler} does for a 4xx; it is + * a client error, so it is logged as a warning and counted as {@link BizError#UNSUPPORTED_OPERATION}, the existing + * client-error code. A 5xx {@link ResponseStatusException} is not covered: it answers the generic 500. + */ + private Mono> catchClientError(ResponseStatusException e, ServerWebExchange exchange) { + BizError bizError = BizError.UNSUPPORTED_OPERATION; + int httpStatus = e.getStatusCode().value(); + exchange.getResponse().setStatusCode(e.getStatusCode()); + return Mono.defer(() -> { + apiPerfHelper.perf(bizError, exchange.getRequest().getPath()); + mainLog.warn(CLIENT_ERROR_LOG_FORMAT, httpStatus, exchange.getRequest().getPath(), e.getMessage()); + HttpStatus status = HttpStatus.resolve(httpStatus); + return Mono.just(error(httpStatus, status != null ? status.getReasonPhrase() : String.valueOf(httpStatus))); + }); } @ExceptionHandler diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadBoundsTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadBoundsTest.java index b1ac62694..57fb96703 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadBoundsTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadBoundsTest.java @@ -32,9 +32,9 @@ /** * Codec-limit test of docs/API_PAYLOAD_TEST_PLAN.md §4.8 (E7): the server's JSON decoder buffers at most * {@link ServerCodecGuardTest#SERVER_MAX_IN_MEMORY_SIZE} bytes of a request body. A DSL {@code Map} body of exactly - * that size is decoded through the harness's production codecs; one byte more is rejected, today by - * {@code GlobalExceptionHandler}'s generic handler as {@code INTERNAL_SERVER_ERROR} (HTTP 500, code 5000, plan §9 O12), - * which the mocked {@code ApiPerfHelper} records. The mapper's own limits are + * that size is decoded through the harness's production codecs; one byte more is rejected, by + * {@code GlobalExceptionHandler}'s client-error handler as HTTP 413 (code 413), which the mocked {@code ApiPerfHelper} + * records as {@code UNSUPPORTED_OPERATION}. The mapper's own limits are * the sdk module's {@code PayloadBoundsTest}; this body stays inside them (strings of {@link #ELEMENT_LENGTH} * characters, padded with whitespace to the exact size), so only the codec limit is reached. * @@ -99,13 +99,15 @@ void codecLimitBodyOfExactlyMaxInMemorySizeIsDecoded() throws IOException { } } + /** The codec's {@code DataBufferLimitException} reaches the handler as a {@code ResponseStatusException(413)}, a client error. */ @Test void codecLimitBodyOneByteOverMaxInMemorySizeIsRejected() throws IOException { Body body = Body.ofSize(ServerCodecGuardTest.SERVER_MAX_IN_MEMORY_SIZE + 1); - BizError error = BizError.INTERNAL_SERVER_ERROR; + BizError error = BizError.UNSUPPORTED_OPERATION; try (ContractTestClient client = client()) { - JsonNode response = post(client, body, HttpStatus.valueOf(error.getHttpErrorCode())); - assertThat(response.path(CODE).intValue()).isEqualTo(error.getBizErrorCode()); + JsonNode response = post(client, body, HttpStatus.PAYLOAD_TOO_LARGE); + assertThat(response.path(CODE).intValue()).as("code is the HTTP status of a client-error ResponseStatusException") + .isEqualTo(HttpStatus.PAYLOAD_TOO_LARGE.value()); assertThat(response.path(SUCCESS).booleanValue()).isFalse(); Mockito.verify(client.bean(ApiPerfHelper.class)) .perf(Mockito.eq(error), Mockito.argThat((RequestPath path) -> path.value().equals(DSL_PATH))); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java index 0c15a5052..b0f27e843 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java @@ -132,9 +132,9 @@ * * *

Every seat-sync test runs on both mounts, {@code /api/flow} through {@link #CONTRACT} and {@code /api/v1/flow} - * through the harness's client, with the same assertions. Each refusal answers HTTP 500 today: the - * {@code ResponseStatusException}s of the seat-sync path reach the global handler's generic branch (NEW-53, see - * {@link #assertStatusExceptionAnsweredAs500NEW53}). + * through the harness's client, with the same assertions. A refusal that is a 4xx {@code ResponseStatusException} + * keeps its status and answers it as the code; the 5xx one (not configured) answers the generic HTTP 500 (see + * {@link #assertStatusExceptionAnswer}). * *

Limits: the controller is a test subclass, so the request reaches {@code flow} through its override, which only * records and redirects; the transport (system proxy, timeout) is WireMock's, not the production one; the answer is @@ -537,7 +537,7 @@ void flowSeatSync(String mount) throws JsonProcessingException { @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) void flowSeatSyncWithAnotherMethod(String mount) throws JsonProcessingException { EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(OTHER_METHOD, orgData(SEAT_ORG_ID))); - assertStatusExceptionAnsweredAs500NEW53(result); + assertStatusExceptionAnswer(result, HttpStatus.METHOD_NOT_ALLOWED); assertNoRelayRequest(); Mockito.verify(sessions, Mockito.never()).getVisitorOrgMember(); Mockito.verify(seats, Mockito.never()).count(anyString()); @@ -576,7 +576,7 @@ static Stream blankSeatSyncMethodsOnBothMounts() { void flowSeatSyncWithoutMethod(String mount, String method) throws JsonProcessingException { EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(method, orgData(SEAT_ORG_ID))); assertThat(decoded().method()).as("decoded seat-sync method").isEqualTo(method); - assertStatusExceptionAnsweredAs500NEW53(result); + assertStatusExceptionAnswer(result, HttpStatus.METHOD_NOT_ALLOWED); assertNoRelayRequest(); Mockito.verify(sessions, Mockito.never()).getVisitorOrgMember(); } @@ -586,7 +586,7 @@ void flowSeatSyncWithoutMethod(String mount, String method) throws JsonProcessin void flowSeatSyncAlreadyRunning(String mount) throws JsonProcessingException { Mockito.when(redis.opsForValue().setIfAbsent(anyString(), anyString(), any(Duration.class))).thenReturn(Mono.just(false)); EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(POST, orgData(SEAT_ORG_ID))); - assertStatusExceptionAnsweredAs500NEW53(result); + assertStatusExceptionAnswer(result, HttpStatus.CONFLICT); assertNoRelayRequest(); Mockito.verify(seats, Mockito.never()).count(anyString()); } @@ -662,7 +662,7 @@ void flowSeatSyncRefused(String mount, SeatSyncRefusal refusal) throws JsonProce case NO_RELAY_TOKEN -> harness(wireMock, BLANK); } EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(POST, data)); - assertStatusExceptionAnsweredAs500NEW53(result); + assertStatusExceptionAnswer(result, thrownBy(refusal)); assertNoRelayRequest(); Mockito.verify(redis.opsForValue(), Mockito.never()).setIfAbsent(anyString(), anyString(), any(Duration.class)); } @@ -740,13 +740,25 @@ private void assertSeatSnapshot(JsonNode snapshot, long before, long after) { } /** - * Pins how a {@code ResponseStatusException} of the seat-sync path reaches the client today: the global handler keeps - * its status only under the plugin path and otherwise answers its generic {@code INTERNAL_SERVER_ERROR}, HTTP 500 - * ({@code GlobalExceptionHandler.java:141-154}, {@code :158-167}). NEW-53, recorded, not fixed: its fix changes this - * one method. + * Pins how a {@code ResponseStatusException} of the seat-sync path reaches the client: the global handler keeps the + * status of a 4xx one and answers it as the code with the status's reason phrase, and answers a 5xx one with its + * generic {@code INTERNAL_SERVER_ERROR}, HTTP 500 ({@code GlobalExceptionHandler#catchResponseStatusException}). */ - private static void assertStatusExceptionAnsweredAs500NEW53(EntityExchangeResult result) { - EndpointContract.assertBizError(result, BizError.INTERNAL_SERVER_ERROR, BizError.INTERNAL_SERVER_ERROR.name()); + private static void assertStatusExceptionAnswer(EntityExchangeResult result, HttpStatus thrown) { + if (thrown.is4xxClientError()) { + EndpointContract.assertResponse(result, thrown, EndpointContract.error(thrown.value(), thrown.getReasonPhrase())); + } else { + EndpointContract.assertBizError(result, BizError.INTERNAL_SERVER_ERROR, BizError.INTERNAL_SERVER_ERROR.name()); + } + } + + /** The status of the {@code ResponseStatusException} the service throws for {@code refusal}. */ + private static HttpStatus thrownBy(SeatSyncRefusal refusal) { + return switch (refusal) { + case NO_SESSION -> HttpStatus.UNAUTHORIZED; + case INVALID_MEMBER, ANOTHER_WORKSPACE, NO_ORG_ID, NO_DATA, ORG_ID_NOT_A_STRING -> HttpStatus.FORBIDDEN; + case NO_HOST_ID, NO_RELAY_TOKEN -> HttpStatus.SERVICE_UNAVAILABLE; + }; } private void assertNoRelayRequest() { diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/error/ErrorCasesContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/error/ErrorCasesContractTest.java index 91ad70bb6..4e32c3b45 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/error/ErrorCasesContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/error/ErrorCasesContractTest.java @@ -43,6 +43,8 @@ import org.springframework.http.MediaType; import org.springframework.http.server.RequestPath; import org.springframework.test.web.reactive.server.EntityExchangeResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.function.server.ServerRequest; import org.springframework.web.server.ResponseStatusException; import org.springframework.web.server.WebFilter; @@ -60,7 +62,7 @@ import static org.assertj.core.api.Assertions.assertThat; /** - * The error cases X1–X7 of docs/API_PAYLOAD_TEST_PLAN.md §5.3, through the production codecs and exception handling + * The error cases X1–X11 of docs/API_PAYLOAD_TEST_PLAN.md §5.3, through the production codecs and exception handling * of the harness (§5.1), against the real controllers with mocked collaborators. * *

* *

X1–X4 assert the status, the {@code code}, {@code success: false} and the {@code message}; X1–X3 also that the @@ -99,6 +102,7 @@ class ErrorCasesContractTest { static final String ERRORS = "errors/"; /** {@code GlobalExceptionHandler}'s locale in the harness: the request's, {@code en_US} by default (§5.1). */ static final Locale REQUEST_LOCALE = Locale.US; + static final String INTERNAL_ERROR_MESSAGE_KEY = "INTERNAL_SERVER_ERROR"; static final String DECODE_MESSAGE_KEY = "INVALID_PARAMETER_PLZ_CHECK"; static final String REASON_PLACEHOLDER = ""; /** {@code catchServerWebInputException}'s reason: {@code ' : .}. */ @@ -189,11 +193,87 @@ void x4BizExceptionFromTheService() throws IOException { } @Test - void x5UnmappedPathIsWrittenByTheGlobalExceptionHandler() throws IOException { + void x5UnmappedPathIsAnswered404ByTheGlobalExceptionHandler() throws IOException { try (ContractTestClient client = ContractTestClient.builder().build()) { EntityExchangeResult result = exchange(client, HttpMethod.GET, UNMAPPED_PATH, null); - assertPinned("X5.unmapped-path", result, HttpStatus.INTERNAL_SERVER_ERROR); - assertWrittenByGlobalExceptionHandler(client, BizError.INTERNAL_SERVER_ERROR, UNMAPPED_PATH); + assertPinned("X5.unmapped-path", result, HttpStatus.NOT_FOUND); + assertThat(new String(result.getResponseBody(), StandardCharsets.UTF_8)) + .as("an unknown URL is a client error, not the generic internal-error message") + .doesNotContain(LocaleUtils.getMessage(REQUEST_LOCALE, INTERNAL_ERROR_MESSAGE_KEY)); + assertWrittenByGlobalExceptionHandler(client, BizError.UNSUPPORTED_OPERATION, UNMAPPED_PATH); + } + } + + /** X8: a controller's 405 keeps its status instead of becoming the generic 500. */ + @Test + void x8ControllerResponseStatus405KeepsItsStatus() throws IOException { + try (ContractTestClient client = ContractTestClient.builder().controller(StatusThrowingController.class).build()) { + EntityExchangeResult result = exchange(client, HttpMethod.GET, StatusThrowingController.METHOD_NOT_ALLOWED_PATH, null); + assertPinned("X8.controller-405", result, HttpStatus.METHOD_NOT_ALLOWED); + assertWrittenByGlobalExceptionHandler(client, BizError.UNSUPPORTED_OPERATION, StatusThrowingController.METHOD_NOT_ALLOWED_PATH); + } + } + + /** X9: a controller's 400 keeps its status; the exception's reason text is not echoed to the client. */ + @Test + void x9ControllerResponseStatus400KeepsItsStatusWithoutEchoingTheReason() throws IOException { + try (ContractTestClient client = ContractTestClient.builder().controller(StatusThrowingController.class).build()) { + EntityExchangeResult result = exchange(client, HttpMethod.GET, StatusThrowingController.BAD_REQUEST_PATH, null); + assertPinned("X9.controller-400", result, HttpStatus.BAD_REQUEST); + assertThat(new String(result.getResponseBody(), StandardCharsets.UTF_8)).doesNotContain(StatusThrowingController.SECRET_REASON); + assertWrittenByGlobalExceptionHandler(client, BizError.UNSUPPORTED_OPERATION, StatusThrowingController.BAD_REQUEST_PATH); + } + } + + /** X10: a 5xx ResponseStatusException is still the generic 500 with the INTERNAL_SERVER_ERROR code and text. */ + @Test + void x10ControllerResponseStatus5xxStillAnswersTheGeneric500() throws IOException { + try (ContractTestClient client = ContractTestClient.builder().controller(StatusThrowingController.class).build()) { + EntityExchangeResult result = exchange(client, HttpMethod.GET, StatusThrowingController.UNAVAILABLE_PATH, null); + assertPinned("X10.controller-503", result, HttpStatus.INTERNAL_SERVER_ERROR); + assertWrittenByGlobalExceptionHandler(client, BizError.INTERNAL_SERVER_ERROR, StatusThrowingController.UNAVAILABLE_PATH); + } + } + + /** X11: under the plugins prefix the exception's status and the PLUGIN_ENDPOINT_ERROR body, with the path, are unchanged. */ + @Test + void x11PluginPrefixKeepsTheStatusAndThePluginEndpointErrorBody() throws IOException { + try (ContractTestClient client = ContractTestClient.builder().controller(StatusThrowingController.class).build()) { + EntityExchangeResult result = exchange(client, HttpMethod.GET, StatusThrowingController.PLUGIN_PATH, null); + String message = assertError(result, HttpStatus.SERVICE_UNAVAILABLE, BizError.PLUGIN_ENDPOINT_ERROR.getBizErrorCode()); + assertThat(message).as("plugin endpoint error text names the exception and the path") + .contains(StatusThrowingController.SECRET_REASON).endsWith(" - path: " + StatusThrowingController.PLUGIN_PATH); + assertWrittenByGlobalExceptionHandler(client, BizError.PLUGIN_ENDPOINT_ERROR, StatusThrowingController.PLUGIN_PATH); + } + } + + /** Throws the {@link ResponseStatusException}s of X8-X11 from a controller, as {@code ApiFlowController} does for 405. */ + @RestController + static class StatusThrowingController { + static final String METHOD_NOT_ALLOWED_PATH = "/api/x8-method-not-allowed"; + static final String BAD_REQUEST_PATH = "/api/x9-bad-request"; + static final String UNAVAILABLE_PATH = "/api/x10-unavailable"; + static final String PLUGIN_PATH = NewUrl.PLUGINS_URL + "/x11-unavailable"; + static final String SECRET_REASON = "x-secret-reason"; + + @GetMapping(METHOD_NOT_ALLOWED_PATH) + Mono methodNotAllowed() { + return Mono.error(new ResponseStatusException(HttpStatus.METHOD_NOT_ALLOWED)); + } + + @GetMapping(BAD_REQUEST_PATH) + Mono badRequest() { + return Mono.error(new ResponseStatusException(HttpStatus.BAD_REQUEST, SECRET_REASON)); + } + + @GetMapping(UNAVAILABLE_PATH) + Mono unavailable() { + return Mono.error(new ResponseStatusException(HttpStatus.SERVICE_UNAVAILABLE, SECRET_REASON)); + } + + @GetMapping(PLUGIN_PATH) + Mono pluginUnavailable() { + return Mono.error(new ResponseStatusException(HttpStatus.SERVICE_UNAVAILABLE, SECRET_REASON)); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/ContractTestClientTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/ContractTestClientTest.java index 3e160d72d..b8a48357e 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/ContractTestClientTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/ContractTestClientTest.java @@ -98,6 +98,7 @@ class ContractTestClientTest { private static final String FORWARDED_FOR_HEADER = "X-Forwarded-For"; private static final String PLUGIN_INFO_CLASS = "org.lowcoder.api.framework.plugin.LowcoderPluginManager$PluginInfo"; /** E9: what the production error handler writes for an unexpected exception. */ + private static final String NOT_FOUND_BODY = "{\"code\":404,\"message\":\"Not Found\",\"success\":false}"; private static final String SERVICE_BUSY_BODY = "{\"code\":5000,\"message\":\"Oops! Service is busy, please try again later.\",\"success\":false}"; // ---- a test controller whose payloads show which mapper and which view the harness applies ---- @@ -249,7 +250,7 @@ void e9ErrorHandlerWritesJsonForUnknownPathsAndFilterFailures() { default -> chain.filter(exchange); }; try (ContractTestClient client = ContractTestClient.builder().webFilter(failing).build()) { - CanonicalJson.assertEquivalent(SERVICE_BUSY_BODY, get(client.web(), UNKNOWN_PATH, HttpStatus.INTERNAL_SERVER_ERROR)); + CanonicalJson.assertEquivalent(NOT_FOUND_BODY, get(client.web(), UNKNOWN_PATH, HttpStatus.NOT_FOUND)); CanonicalJson.assertEquivalent(SERVICE_BUSY_BODY, get(client.web(), FAILING_FILTER_PATH, HttpStatus.INTERNAL_SERVER_ERROR)); CanonicalJson.assertEquivalent("{\"code\":403,\"message\":\"Forbidden\",\"success\":false}", get(client.web(), REJECTING_FILTER_PATH, HttpStatus.FORBIDDEN)); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/GlobalExceptionHandlerTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/GlobalExceptionHandlerTest.java index dfa4f4661..ac4d39c18 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/GlobalExceptionHandlerTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/GlobalExceptionHandlerTest.java @@ -5,6 +5,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import java.lang.reflect.Method; @@ -220,7 +221,7 @@ void serverException_answers500WithTheRawMessage() { verify(apiPerfHelper).perf(BizError.INTERNAL_SERVER_ERROR, exchange.getRequest().getPath()); } - /** Catches plugin endpoint errors losing their status or path, and other paths keeping the exception's status. */ + /** Catches plugin endpoint errors losing their status or path, and the plugin path being untouched by the client-error branch. */ @Test void responseStatusException_underThePluginsPath_keepsItsStatus_andAppendsThePath() { String path = NewUrl.PLUGINS_URL + "/demo/items"; @@ -235,15 +236,43 @@ void responseStatusException_underThePluginsPath_keepsItsStatus_andAppendsThePat verify(apiPerfHelper).perf(BizError.PLUGIN_ENDPOINT_ERROR, exchange.getRequest().getPath()); } + /** Catches a client error outside the plugin endpoints answering 500: the status, the code and the text stay the exception's. */ @Test - void responseStatusException_elsewhere_fallsToTheGeneric500() { + void responseStatusException_elsewhere_with4xx_keepsItsStatusAndAnswersItAsTheCode() { MockServerWebExchange exchange = exchange("/api/orders"); - ResponseView view = body(handler.catchResponseStatusException(new ResponseStatusException(HttpStatus.NOT_FOUND, "x"), exchange), Locale.ENGLISH); + ResponseView view = body(handler.catchResponseStatusException(new ResponseStatusException(HttpStatus.NOT_FOUND, "internal detail"), exchange), Locale.ENGLISH); - assertThat(exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); + assertThat(exchange.getResponse().getStatusCode()).as("HTTP status of a 4xx ResponseStatusException").isEqualTo(HttpStatus.NOT_FOUND); + assertThat(view.getCode()).as("body code").isEqualTo(HttpStatus.NOT_FOUND.value()); + assertThat(view.getMessage()).as("body message is the reason phrase, not the exception's reason").isEqualTo(HttpStatus.NOT_FOUND.getReasonPhrase()); + verify(apiPerfHelper).perf(BizError.UNSUPPORTED_OPERATION, exchange.getRequest().getPath()); + verify(apiPerfHelper, never()).perf(eq(BizError.INTERNAL_SERVER_ERROR), any()); + } + + @Test + void responseStatusException_elsewhere_withAnyOther4xx_keepsItsStatus() { + for (HttpStatus status : new HttpStatus[] {HttpStatus.BAD_REQUEST, HttpStatus.FORBIDDEN, HttpStatus.METHOD_NOT_ALLOWED, HttpStatus.UNSUPPORTED_MEDIA_TYPE, HttpStatus.I_AM_A_TEAPOT}) { + MockServerWebExchange exchange = exchange("/api/orders"); + + ResponseView view = body(handler.catchResponseStatusException(new ResponseStatusException(status), exchange), Locale.ENGLISH); + + assertThat(exchange.getResponse().getStatusCode()).as("status " + status).isEqualTo(status); + assertThat(view.getCode()).as("code of " + status).isEqualTo(status.value()); + assertThat(view.getMessage()).as("message of " + status).isEqualTo(status.getReasonPhrase()); + } + } + + @Test + void responseStatusException_elsewhere_with5xx_fallsToTheGeneric500() { + MockServerWebExchange exchange = exchange("/api/orders"); + + ResponseView view = body(handler.catchResponseStatusException(new ResponseStatusException(HttpStatus.BAD_GATEWAY, "x"), exchange), Locale.ENGLISH); + + assertThat(exchange.getResponse().getStatusCode()).as("a 5xx ResponseStatusException answers the generic 500").isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); assertThat(view.getCode()).isEqualTo(BizError.INTERNAL_SERVER_ERROR.getBizErrorCode()); assertThat(view.getMessage()).isEqualTo(LocaleUtils.getMessage(Locale.ENGLISH, "INTERNAL_SERVER_ERROR")); + verify(apiPerfHelper).perf(BizError.INTERNAL_SERVER_ERROR, exchange.getRequest().getPath()); } /** Catches an unexpected exception leaking its message: the generic localised text is returned. */ diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X10.controller-503.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X10.controller-503.json new file mode 100644 index 000000000..d59b96ea8 --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X10.controller-503.json @@ -0,0 +1 @@ +{"code": 5000, "message": "Oops! Service is busy, please try again later.", "success": false} diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X5.unmapped-path.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X5.unmapped-path.json index d59b96ea8..8d0278faa 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X5.unmapped-path.json +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X5.unmapped-path.json @@ -1 +1 @@ -{"code": 5000, "message": "Oops! Service is busy, please try again later.", "success": false} +{"code": 404, "message": "Not Found", "success": false} diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X8.controller-405.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X8.controller-405.json new file mode 100644 index 000000000..09ccc3a4f --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X8.controller-405.json @@ -0,0 +1 @@ +{"code": 405, "message": "Method Not Allowed", "success": false} diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X9.controller-400.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X9.controller-400.json new file mode 100644 index 000000000..fcf681e5e --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/errors/X9.controller-400.json @@ -0,0 +1 @@ +{"code": 400, "message": "Bad Request", "success": false} From 2378f5cb7c9ee9b97b2ae2b5e311e9fdeaee4403 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Fri, 20 Nov 2026 11:12:46 +0100 Subject: [PATCH 06/40] refactor: run the database migrations with an in-house runner instead 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 --- .../api-service/lowcoder-dependencies/pom.xml | 13 - server/api-service/lowcoder-domain/pom.xml | 24 +- .../domain/configurations/MongoConfig.java | 23 +- .../runner/migrations/DatabaseChangelog.java | 104 ++-- .../migrations/DatabaseChangelogRegistry.java | 78 +++ .../runner/migrations/MigrationException.java | 13 + .../migrations/MigrationFailedException.java | 19 + .../runner/migrations/MigrationHistory.java | 154 ++++++ .../migrations/MigrationHistoryException.java | 9 + .../runner/migrations/MigrationLock.java | 277 ++++++++++ .../migrations/MigrationLockException.java | 13 + .../MigrationLockLostException.java | 16 + .../migrations/MigrationLockSettings.java | 45 ++ .../MigrationLockTimeoutException.java | 9 + .../runner/migrations/MigrationRegistry.java | 34 ++ .../runner/migrations/MigrationRunner.java | 107 ++++ .../runner/migrations/MigrationStep.java | 31 ++ .../job/EmailNormalizationBackfill.java | 6 +- ...onRepositoryImplDuplicateKeyMongoTest.java | 2 +- .../DatabaseChangelogMigrationsTest.java | 98 ++-- .../migrations/MigrationLockMongoTest.java | 153 ++++++ .../migrations/MigrationRegistryTest.java | 124 +++++ .../migrations/MigrationRunnerMongoTest.java | 501 ++++++++++++++++++ .../migrations/MigrationTestDatabase.java | 89 ++++ .../job/EmailNormalizationBackfillTest.java | 10 +- .../job/MigrationJobAddSuperAdminTest.java | 2 +- .../migrations/mongock-5.4.0-history.jsonl | 31 ++ 27 files changed, 1797 insertions(+), 188 deletions(-) create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/DatabaseChangelogRegistry.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationException.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationFailedException.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationHistory.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationHistoryException.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLock.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockException.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockLostException.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockSettings.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockTimeoutException.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationRegistry.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationRunner.java create mode 100644 server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationStep.java create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationLockMongoTest.java create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationRegistryTest.java create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationRunnerMongoTest.java create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationTestDatabase.java create mode 100644 server/api-service/lowcoder-server/src/test/resources/migrations/mongock-5.4.0-history.jsonl diff --git a/server/api-service/lowcoder-dependencies/pom.xml b/server/api-service/lowcoder-dependencies/pom.xml index 257a1fd5b..b0a69b6e4 100644 --- a/server/api-service/lowcoder-dependencies/pom.xml +++ b/server/api-service/lowcoder-dependencies/pom.xml @@ -202,19 +202,6 @@ 2.3.3 - - io.mongock - mongock-bom - 5.4.0 - pom - import - - - io.mongock - mongock-springboot - 5.4.0 - - io.projectreactor.tools blockhound diff --git a/server/api-service/lowcoder-domain/pom.xml b/server/api-service/lowcoder-domain/pom.xml index 91af974aa..000053ca9 100644 --- a/server/api-service/lowcoder-domain/pom.xml +++ b/server/api-service/lowcoder-domain/pom.xml @@ -21,7 +21,7 @@ org.springframework.boot spring-boot-starter-data-mongodb-reactive - + org.springframework.boot spring-boot-starter-data-mongodb @@ -63,28 +63,6 @@ spring-boot-starter-mail - - io.mongock - mongock-springboot - - - com.google.guava - guava - - - javax.inject - javax.inject - - - org.springframework.boot - spring-boot-autoconfigure - - - - - io.mongock - mongodb-springdata-v4-driver - org.projectlombok lombok diff --git a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/configurations/MongoConfig.java b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/configurations/MongoConfig.java index b3adbcbfb..2a0dc816e 100644 --- a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/configurations/MongoConfig.java +++ b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/configurations/MongoConfig.java @@ -1,18 +1,12 @@ package org.lowcoder.domain.configurations; -import com.mongodb.ReadConcern; import com.mongodb.ReadPreference; -import com.mongodb.WriteConcern; -import io.mongock.driver.mongodb.springdata.v4.SpringDataMongoV4Driver; -import io.mongock.runner.springboot.MongockSpringboot; -import io.mongock.runner.springboot.base.MongockApplicationRunner; import jakarta.annotation.PostConstruct; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.lowcoder.domain.user.model.User; import org.lowcoder.sdk.config.MaterialProperties; import org.lowcoder.sdk.models.HasIdAndAuditing; -import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; @@ -27,8 +21,6 @@ import org.springframework.data.mongodb.repository.config.EnableReactiveMongoRepositories; import org.springframework.security.core.context.ReactiveSecurityContextHolder; -import java.util.List; - @Slf4j @Configuration @RequiredArgsConstructor @@ -44,19 +36,6 @@ public void init() { mappingMongoConverter.setMapKeyDotReplacement("##OB_REPLACE##"); } - @Bean - public MongockApplicationRunner mongockApplicationRunner(ApplicationContext springContext, MongoTemplate mongoTemplate) { - SpringDataMongoV4Driver driver = SpringDataMongoV4Driver.withDefaultLock(mongoTemplate); - driver.setWriteConcern(WriteConcern.JOURNALED.withJournal(false)); - driver.setReadConcern(ReadConcern.LOCAL); - - return MongockSpringboot.builder() - .setDriver(driver) - .addMigrationScanPackages(List.of("org.lowcoder.runner.migrations")) - .setSpringContext(springContext) - .buildApplicationRunner(); - } - /** * inject {@link HasIdAndAuditing#setCreatedBy}}/{@link HasIdAndAuditing#setModifiedBy}} for JPA */ @@ -92,7 +71,7 @@ public ReactiveGridFsTemplate reactiveGridFsTemplate(ReactiveMongoDatabaseFactor } /** - * used by mongock + * The blocking template of the database migrations ({@code org.lowcoder.runner.migrations}). */ @Bean public MongoTemplate mongoTemplate(MongoDatabaseFactory mongoDbFactory, MappingMongoConverter mappingMongoConverter) { diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/DatabaseChangelog.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/DatabaseChangelog.java index 11be4aa2f..cc992de50 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/DatabaseChangelog.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/DatabaseChangelog.java @@ -1,8 +1,5 @@ package org.lowcoder.runner.migrations; -import com.github.cloudyrock.mongock.ChangeLog; -import com.github.cloudyrock.mongock.ChangeSet; -import com.github.cloudyrock.mongock.driver.mongodb.springdata.v4.decorator.impl.MongockTemplate; import com.github.f4b6a3.uuid.UuidCreator; import com.mongodb.MongoNamespace; import com.mongodb.client.MongoCollection; @@ -38,11 +35,11 @@ import org.lowcoder.runner.migrations.job.EmailNormalizationBackfill; import org.lowcoder.runner.migrations.job.MigrateAuthConfigJob; import org.lowcoder.sdk.config.CommonConfig; -import org.springframework.context.annotation.Profile; import org.springframework.data.domain.Sort; import org.springframework.data.mongodb.UncategorizedMongoDbException; import org.springframework.data.mongodb.core.CollectionOptions; import org.springframework.data.mongodb.core.DocumentCallbackHandler; +import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.index.CompoundIndexDefinition; import org.springframework.data.mongodb.core.index.Index; import org.springframework.data.mongodb.core.index.IndexOperations; @@ -62,14 +59,16 @@ import static org.lowcoder.domain.util.QueryDslUtils.fieldName; import static org.lowcoder.sdk.util.IDUtils.generate; +/** + * The data migrations. {@link MigrationRunner} runs them in the order {@link DatabaseChangelogRegistry} lists, once per + * database: the {@code id} and {@code author} of each entry there are the keys of the migration history. A change set + * body is never edited after release in a way that changes what a database that ran it holds. + */ @SuppressWarnings("all") @Slf4j -@ChangeLog(order = "001") -@Profile("!test") public class DatabaseChangelog { - @ChangeSet(order = "001", id = "init-indexes", author = "") - public void addInitialIndexes(MongockTemplate mongoTemplate) { + public void addInitialIndexes(MongoTemplate mongoTemplate) { Index updatedAtIndex = makeIndex("updateAt"); ensureIndexes(mongoTemplate, Application.class, @@ -111,58 +110,50 @@ public void addInitialIndexes(MongockTemplate mongoTemplate) { ); } - @ChangeSet(order = "002", id = "add-organization-indexes-v2", author = "") - public void addOrganizationIndexes(MongockTemplate mongoTemplate) { + public void addOrganizationIndexes(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, Organization.class, makeIndex("source", "tpCompanyId").unique().sparse() ); } - @ChangeSet(order = "003", id = "add-serverlog-indexes", author = "") - public void addServerLogIndexes(MongockTemplate mongoTemplate) { + public void addServerLogIndexes(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, ServerLog.class, makeIndex("userId"), makeIndex("createTime") ); } - @ChangeSet(order = "004", id = "add-token-based-connection-indexes", author = "") - public void addDatasourceConnectionIndexes(MongockTemplate mongoTemplate) { + public void addDatasourceConnectionIndexes(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, TokenBasedConnection.class, makeIndex("datasourceId").unique() ); } - @ChangeSet(order = "006", id = "add-org-domain-indexes", author = "") - public void addOrgDomainIndexes(MongockTemplate mongoTemplate) { + public void addOrgDomainIndexes(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, Organization.class, makeIndex("organizationDomain.domain").unique().sparse() ); } - @ChangeSet(order = "008", id = "generate-deployment-id", author = "") - public void generateInstanceId(MongockTemplate mongoTemplate) { + public void generateInstanceId(MongoTemplate mongoTemplate) { mongoTemplate.insert(ServerConfig.builder() .key("deployment.id") .value(generate()) .build()); } - @ChangeSet(order = "009", id = "add-group-type-indexes", author = "") - public void addGroupTypeIndex(MongockTemplate mongoTemplate) { + public void addGroupTypeIndex(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, Group.class, makeIndex("organizationId", "type")); } - @ChangeSet(order = "010", id = "add-event-log-indexes", author = "") - public void addEventLogIndex(MongockTemplate mongoTemplate) { + public void addEventLogIndex(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, EventLog.class, makeIndex("deploymentId", "eventType", "log.applicationId").sparse(), makeIndex("deploymentId", "eventType", "log.userId").sparse() ); } - @ChangeSet(order = "012", id = "add-library-query-indexes", author = "") - public void addLibraryQueryIndex(MongockTemplate mongoTemplate) { + public void addLibraryQueryIndex(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, LibraryQuery.class, makeIndex("organizationId").sparse()); @@ -170,44 +161,37 @@ public void addLibraryQueryIndex(MongockTemplate mongoTemplate) { makeIndex("libraryQueryId").sparse()); } - @ChangeSet(order = "013", id = "update-datasource-idnexes", author = "") - public void updateDatasourceIndex(MongockTemplate mongoTemplate) { + public void updateDatasourceIndex(MongoTemplate mongoTemplate) { dropIndexIfExists(mongoTemplate, Datasource.class, "organization_datasource_compound_index"); ensureIndexes(mongoTemplate, Datasource.class, makeIndex("organizationId", "name").named("organization_datasource_index")); } - @ChangeSet(order = "014", id = "add-material-meta-indexes", author = "") - public void addMaterialMetaIndex(MongockTemplate mongoTemplate) { + public void addMaterialMetaIndex(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, MaterialMeta.class, makeIndex("orgId", "type", "filename").unique()); } - @ChangeSet(order = "015", id = "add-bi-relation-indexes", author = "") - public void addBiRelationIndex(MongockTemplate mongoTemplate) { + public void addBiRelationIndex(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, BiRelation.class, makeIndex("bizType", "sourceId", "relation")); } - @ChangeSet(order = "016", id = "update-user-connections-index", author = "") - public void updateUserConnectionsIndex(MongockTemplate mongoTemplate) { + public void updateUserConnectionsIndex(MongoTemplate mongoTemplate) { dropIndexIfExists(mongoTemplate, User.class, "connections.source_1_connections.rawId_1"); ensureIndexes(mongoTemplate, User.class, makeIndex("connections.source", "connections.rawId").unique().sparse()); } - @ChangeSet(order = "017", id = "migrate-auth-configs", author = "") public void migrateAuthConfigs(MigrateAuthConfigJob migrateAuthConfigJob) { migrateAuthConfigJob.migrateAuthConfig(); } - @ChangeSet(order = "018", id = "complete-auth-type", author = "") public void completeAuthType(CompleteAuthType completeAuthType) { completeAuthType.complete(); } - @ChangeSet(order = "019", id = "add-org-id-index-on-server-log", author = "") - public void addOrgIdIndexOnServerLog(MongockTemplate mongoTemplate) { + public void addOrgIdIndexOnServerLog(MongoTemplate mongoTemplate) { ensureIndexes(mongoTemplate, ServerLog.class, makeIndex("orgId") ); @@ -215,21 +199,19 @@ public void addOrgIdIndexOnServerLog(MongockTemplate mongoTemplate) { /** * Waits for every step of the super-admin job (BF-037), as the other job changesets do with {@code block()}: a failing - * step fails the changeset, which Mongock (an ApplicationRunner) then does not record, so it runs again at the next start. - * No timeout of its own: a step that never completes holds the startup. + * step fails the changeset, which {@link MigrationRunner} (an ApplicationRunner) records as {@code FAILED}, never as + * {@code EXECUTED}, so it runs again at the next start. No timeout of its own: a step that never completes holds the + * startup. */ - @ChangeSet(order = "020", id = "add-super-admin-user", author = "") public void addSuperAdminUser(AddSuperAdminUser addSuperAdminUser) { addSuperAdminUser.addOrUpdateSuperAdmin().block(); } - @ChangeSet(order = "021", id = "add-ptm-fields-to-applications", author = "") public void addPtmFieldsToApplicatgions(AddPtmFieldsJob addPtmFieldsJob) { addPtmFieldsJob.migrateApplicationsToInitPtmFields(); } - @ChangeSet(order = "022", id = "add-gid", author = "") - public void addGidToDBObjects(MongockTemplate mongoTemplate) { + public void addGidToDBObjects(MongoTemplate mongoTemplate) { // Define an array of collection names String[] collectionNames = {"application", "bundle", "datasource", "libraryQuery", "folder"}; @@ -245,8 +227,7 @@ public void addGidToDBObjects(MongockTemplate mongoTemplate) { } } - @ChangeSet(order = "023", id = "add-email", author = "") - public void addEmailField(MongockTemplate mongoTemplate) { + public void addEmailField(MongoTemplate mongoTemplate) { // Create a query to match all documents Query query = new Query(); @@ -269,8 +250,7 @@ public void processDocument(Document document) { }); } - @ChangeSet(order = "024", id = "fill-create-at", author = "") - public void fillCreateAt(MongockTemplate mongoTemplate) { + public void fillCreateAt(MongoTemplate mongoTemplate) { // Create a query to match all documents Query query = new Query(); @@ -293,8 +273,7 @@ public void processDocument(Document document) { }); } - @ChangeSet(order = "025", id = "add-gid-indexes-unique", author = "") - public void addGidIndexesUnique(MongockTemplate mongoTemplate) { + public void addGidIndexesUnique(MongoTemplate mongoTemplate) { // collections to add gid String[] collectionNames = {"group", "organization", "application", "bundle", "datasource", "libraryQuery", "folder"}; @@ -318,7 +297,7 @@ public void addGidIndexesUnique(MongockTemplate mongoTemplate) { ensureIndexes(mongoTemplate, LibraryQuery.class, makeIndex("gid").unique()); } - private int getMongoDBVersion(MongockTemplate mongoTemplate) { + private int getMongoDBVersion(MongoTemplate mongoTemplate) { Document buildInfo = mongoTemplate.executeCommand(new Document("buildInfo", 1)); String versionString = buildInfo.getString("version"); if(versionString == null) return -1; @@ -327,8 +306,7 @@ private int getMongoDBVersion(MongockTemplate mongoTemplate) { return majorVersion; } - @ChangeSet(order = "026", id = "add-time-series-snapshot-history", author = "") - public void addTimeSeriesSnapshotHistory(MongockTemplate mongoTemplate, CommonConfig commonConfig) { + public void addTimeSeriesSnapshotHistory(MongoTemplate mongoTemplate, CommonConfig commonConfig) { int mongoVersion = getMongoDBVersion(mongoTemplate); Instant thresholdDate = Instant.now().minus(commonConfig.getQuery().getAppSnapshotKeepDuration(), ChronoUnit.DAYS); @@ -409,8 +387,7 @@ public void addTimeSeriesSnapshotHistory(MongockTemplate mongoTemplate, CommonCo makeIndex("createdAt")); } - @ChangeSet(order = "027", id = "populate-email-in-user-connections", author = "Thomas") - public void populateEmailInUserConnections(MongockTemplate mongoTemplate, CommonConfig commonConfig) { + public void populateEmailInUserConnections(MongoTemplate mongoTemplate, CommonConfig commonConfig) { Query query = new Query(Criteria.where("connections.authId").is("EMAIL") .and("connections.email").is(null)); @@ -435,8 +412,7 @@ public void populateEmailInUserConnections(MongockTemplate mongoTemplate, Common } - @ChangeSet(order = "028", id = "published-to-record", author = "Thomas") - public void publishedToRecord(MongockTemplate mongoTemplate, CommonConfig commonConfig) { + public void publishedToRecord(MongoTemplate mongoTemplate, CommonConfig commonConfig) { Query query = new Query(Criteria.where("publishedApplicationDSL").exists(true)); MongoCursor cursor = mongoTemplate.getCollection("application").find(query.getQueryObject()).iterator(); @@ -460,13 +436,11 @@ public void publishedToRecord(MongockTemplate mongoTemplate, CommonConfig common mongoTemplate.insert(record); } } - @ChangeSet(order = "029", id = "add-tag-index-to-record", author = "Thomas") - public void addTagIndexToRecord(MongockTemplate mongoTemplate, CommonConfig commonConfig) { + public void addTagIndexToRecord(MongoTemplate mongoTemplate, CommonConfig commonConfig) { ensureIndexes(mongoTemplate, ApplicationVersion.class, makeIndex("applicationId", "tag").unique()); } - @ChangeSet(order = "030", id = "rename-application-record-collection", author = "Thomas") - public void renameApplicationRecordCollection(MongockTemplate mongoTemplate, MongoDatabase mongoDatabase) { + public void renameApplicationRecordCollection(MongoTemplate mongoTemplate, MongoDatabase mongoDatabase) { String oldCollectionName = "applicationRecord"; String newCollectionName = "applicationVersion"; @@ -486,8 +460,7 @@ public void renameApplicationRecordCollection(MongockTemplate mongoTemplate, Mon } - @ChangeSet(order = "031", id = "delete-old-super-admin", author = "Thomas") - public void deleteOldSuperAdmin(MongockTemplate mongoTemplate, MongoDatabase mongoDatabase) { + public void deleteOldSuperAdmin(MongoTemplate mongoTemplate, MongoDatabase mongoDatabase) { List users = mongoTemplate.find( Query.query(Criteria.where("superAdmin").is(true)) .with(Sort.by(Sort.Direction.DESC, "createdAt")), @@ -513,12 +486,11 @@ public void deleteOldSuperAdmin(MongockTemplate mongoTemplate, MongoDatabase mon * sanitization change. Accounts that would collide are left as they are and reported; see * {@link EmailNormalizationBackfill} and EMAIL-SANITIZATION.md. */ - @ChangeSet(order = "032", id = "normalize-email-backfill", author = "") public void normalizeEmailBackfill(MongoDatabase mongoDatabase) { EmailNormalizationBackfill.run(mongoDatabase); } - private void addGidField(MongockTemplate mongoTemplate, String collectionName) { + private void addGidField(MongoTemplate mongoTemplate, String collectionName) { // Create a query to match all documents Query query = new Query(); @@ -545,7 +517,7 @@ public void processDocument(Document document) { }); } - private boolean isGidPresent(MongockTemplate mongoTemplate, String collectionName, String gid) { + private boolean isGidPresent(MongoTemplate mongoTemplate, String collectionName, String gid) { Query query = new Query(Criteria.where("gid").is(gid)); return mongoTemplate.exists(query, collectionName); } @@ -562,14 +534,14 @@ public static Index makeIndex(String... fields) { } } - public static void ensureIndexes(MongockTemplate mongoTemplate, Class entityClass, Index... indexes) { + public static void ensureIndexes(MongoTemplate mongoTemplate, Class entityClass, Index... indexes) { IndexOperations indexOps = mongoTemplate.indexOps(entityClass); for (Index index : indexes) { indexOps.ensureIndex(index); } } - public static void dropIndexIfExists(MongockTemplate mongoTemplate, Class entityClass, String name) { + public static void dropIndexIfExists(MongoTemplate mongoTemplate, Class entityClass, String name) { try { mongoTemplate.indexOps(entityClass).dropIndex(name); } catch (UncategorizedMongoDbException ignored) { diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/DatabaseChangelogRegistry.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/DatabaseChangelogRegistry.java new file mode 100644 index 000000000..be4c42c0a --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/DatabaseChangelogRegistry.java @@ -0,0 +1,78 @@ +package org.lowcoder.runner.migrations; + +import java.util.List; + +import org.lowcoder.runner.migrations.job.AddPtmFieldsJob; +import org.lowcoder.runner.migrations.job.AddSuperAdminUser; +import org.lowcoder.runner.migrations.job.CompleteAuthType; +import org.lowcoder.runner.migrations.job.MigrateAuthConfigJob; +import org.lowcoder.sdk.config.CommonConfig; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import org.springframework.data.mongodb.core.MongoTemplate; + +/** + * Lists the change sets of {@link DatabaseChangelog} for {@link MigrationRunner}, with the beans each one is given. + * + *

The {@code order}, {@code id} and {@code author} of an entry are the keys of the migration history that databases + * already hold (see {@link MigrationHistory}): never change or reuse them, and add a new change set with the next + * order after the last one. The order values have gaps: 005, 007 and 011 are not in the change log. + * + *

The registry exists only outside the {@code test} profile, so the Spring contexts of the tests do not run the + * change sets at startup; a test that wants them uses the profile of {@code DatabaseChangelogMigrationsTest}. + */ +@Configuration +@Profile("!test") +public class DatabaseChangelogRegistry { + + private static final String CHANGE_LOG_CLASS = DatabaseChangelog.class.getName(); + + @Bean + public MigrationRegistry databaseChangelogMigrations(MongoTemplate mongoTemplate, CommonConfig commonConfig, + MigrateAuthConfigJob migrateAuthConfigJob, CompleteAuthType completeAuthType, + AddSuperAdminUser addSuperAdminUser, AddPtmFieldsJob addPtmFieldsJob) { + return create(new DatabaseChangelog(), mongoTemplate, commonConfig, migrateAuthConfigJob, completeAuthType, + addSuperAdminUser, addPtmFieldsJob); + } + + /** The registry over the given change log and beans; a test passes a change log of its own or mocked jobs. */ + public static MigrationRegistry create(DatabaseChangelog changelog, MongoTemplate mongoTemplate, + CommonConfig commonConfig, MigrateAuthConfigJob migrateAuthConfigJob, CompleteAuthType completeAuthType, + AddSuperAdminUser addSuperAdminUser, AddPtmFieldsJob addPtmFieldsJob) { + return new MigrationRegistry(List.of( + step("001", "init-indexes", "", "addInitialIndexes", () -> changelog.addInitialIndexes(mongoTemplate)), + step("002", "add-organization-indexes-v2", "", "addOrganizationIndexes", () -> changelog.addOrganizationIndexes(mongoTemplate)), + step("003", "add-serverlog-indexes", "", "addServerLogIndexes", () -> changelog.addServerLogIndexes(mongoTemplate)), + step("004", "add-token-based-connection-indexes", "", "addDatasourceConnectionIndexes", () -> changelog.addDatasourceConnectionIndexes(mongoTemplate)), + step("006", "add-org-domain-indexes", "", "addOrgDomainIndexes", () -> changelog.addOrgDomainIndexes(mongoTemplate)), + step("008", "generate-deployment-id", "", "generateInstanceId", () -> changelog.generateInstanceId(mongoTemplate)), + step("009", "add-group-type-indexes", "", "addGroupTypeIndex", () -> changelog.addGroupTypeIndex(mongoTemplate)), + step("010", "add-event-log-indexes", "", "addEventLogIndex", () -> changelog.addEventLogIndex(mongoTemplate)), + step("012", "add-library-query-indexes", "", "addLibraryQueryIndex", () -> changelog.addLibraryQueryIndex(mongoTemplate)), + step("013", "update-datasource-idnexes", "", "updateDatasourceIndex", () -> changelog.updateDatasourceIndex(mongoTemplate)), + step("014", "add-material-meta-indexes", "", "addMaterialMetaIndex", () -> changelog.addMaterialMetaIndex(mongoTemplate)), + step("015", "add-bi-relation-indexes", "", "addBiRelationIndex", () -> changelog.addBiRelationIndex(mongoTemplate)), + step("016", "update-user-connections-index", "", "updateUserConnectionsIndex", () -> changelog.updateUserConnectionsIndex(mongoTemplate)), + step("017", "migrate-auth-configs", "", "migrateAuthConfigs", () -> changelog.migrateAuthConfigs(migrateAuthConfigJob)), + step("018", "complete-auth-type", "", "completeAuthType", () -> changelog.completeAuthType(completeAuthType)), + step("019", "add-org-id-index-on-server-log", "", "addOrgIdIndexOnServerLog", () -> changelog.addOrgIdIndexOnServerLog(mongoTemplate)), + step("020", "add-super-admin-user", "", "addSuperAdminUser", () -> changelog.addSuperAdminUser(addSuperAdminUser)), + step("021", "add-ptm-fields-to-applications", "", "addPtmFieldsToApplicatgions", () -> changelog.addPtmFieldsToApplicatgions(addPtmFieldsJob)), + step("022", "add-gid", "", "addGidToDBObjects", () -> changelog.addGidToDBObjects(mongoTemplate)), + step("023", "add-email", "", "addEmailField", () -> changelog.addEmailField(mongoTemplate)), + step("024", "fill-create-at", "", "fillCreateAt", () -> changelog.fillCreateAt(mongoTemplate)), + step("025", "add-gid-indexes-unique", "", "addGidIndexesUnique", () -> changelog.addGidIndexesUnique(mongoTemplate)), + step("026", "add-time-series-snapshot-history", "", "addTimeSeriesSnapshotHistory", () -> changelog.addTimeSeriesSnapshotHistory(mongoTemplate, commonConfig)), + step("027", "populate-email-in-user-connections", "Thomas", "populateEmailInUserConnections", () -> changelog.populateEmailInUserConnections(mongoTemplate, commonConfig)), + step("028", "published-to-record", "Thomas", "publishedToRecord", () -> changelog.publishedToRecord(mongoTemplate, commonConfig)), + step("029", "add-tag-index-to-record", "Thomas", "addTagIndexToRecord", () -> changelog.addTagIndexToRecord(mongoTemplate, commonConfig)), + step("030", "rename-application-record-collection", "Thomas", "renameApplicationRecordCollection", () -> changelog.renameApplicationRecordCollection(mongoTemplate, mongoTemplate.getDb())), + step("031", "delete-old-super-admin", "Thomas", "deleteOldSuperAdmin", () -> changelog.deleteOldSuperAdmin(mongoTemplate, mongoTemplate.getDb())), + step("032", "normalize-email-backfill", "", "normalizeEmailBackfill", () -> changelog.normalizeEmailBackfill(mongoTemplate.getDb())))); + } + + private static MigrationStep step(String order, String id, String author, String method, Runnable body) { + return new MigrationStep(order, id, author, CHANGE_LOG_CLASS, method, body); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationException.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationException.java new file mode 100644 index 000000000..e35a2f03b --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationException.java @@ -0,0 +1,13 @@ +package org.lowcoder.runner.migrations; + +/** Base of the failures that stop {@link MigrationRunner}, and with it the start of the application. */ +public class MigrationException extends RuntimeException { + + public MigrationException(String message) { + super(message); + } + + public MigrationException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationFailedException.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationFailedException.java new file mode 100644 index 000000000..e2ab6c88e --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationFailedException.java @@ -0,0 +1,19 @@ +package org.lowcoder.runner.migrations; + +/** + * A change set threw. The history holds a {@code FAILED} entry for it, never an {@code EXECUTED} one, so it runs again + * at the next start. The change set's own exception is the cause. + */ +public class MigrationFailedException extends MigrationException { + + private final String changeId; + + public MigrationFailedException(MigrationStep step, Throwable cause) { + super("Change set " + step.id() + " (" + step.changeSetMethod() + ") failed: " + cause, cause); + this.changeId = step.id(); + } + + public String getChangeId() { + return changeId; + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationHistory.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationHistory.java new file mode 100644 index 000000000..65f903521 --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationHistory.java @@ -0,0 +1,154 @@ +package org.lowcoder.runner.migrations; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.time.Instant; +import java.time.LocalDateTime; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; +import java.util.concurrent.ThreadLocalRandom; + +import org.bson.Document; +import org.springframework.context.annotation.Profile; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.stereotype.Component; + +import com.mongodb.MongoException; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.model.Projections; + +/** + * The record of which change sets ran, in the collection {@value #COLLECTION}. + * + *

Format. The collection and the documents are those Mongock 5.4.0 wrote before this runner replaced it: production + * databases hold them, and the build before the replacement has to read what this runner writes (it then runs no change + * set). The fields and their BSON types are those of a Mongock entry: {@code executionId} (text), {@code changeId}, + * {@code author}, {@code timestamp} (date), {@code state}, {@code type}, {@code changeLogClass}, + * {@code changeSetMethod}, {@code metadata} (null), {@code executionMillis} (long), {@code executionHostname}, + * {@code errorTrace} (null, or the stack trace of a failure) and {@code systemChange} (false). + * + *

Rule. A change set counts as done only with an entry that has its {@code changeId} and {@code author} and + * {@code state} {@value #STATE_EXECUTED}. A {@value #STATE_FAILED} entry, or any other state, never counts, so a failed + * change set runs again at the next start. A failure adds a {@value #STATE_FAILED} entry and removes none; a later + * success adds an {@value #STATE_EXECUTED} entry. + * + *

Limits. Mongock also writes two entries of its own ({@code system-change-00001} and its {@code _before}) when it + * first runs on a database. This runner neither writes nor reads them: on a database that only this runner migrated, the + * Mongock build writes them at its first start. The unique index Mongock keeps on the collection is not created here. + * The writes take no lock of their own; {@link MigrationRunner} writes them while it holds {@link MigrationLock}. + */ +@Component +@Profile("!test") +public class MigrationHistory { + + public static final String COLLECTION = "mongockChangeLog"; + + static final String EXECUTION_ID = "executionId"; + static final String CHANGE_ID = "changeId"; + static final String AUTHOR = "author"; + static final String TIMESTAMP = "timestamp"; + static final String STATE = "state"; + static final String TYPE = "type"; + static final String CHANGE_LOG_CLASS = "changeLogClass"; + static final String CHANGE_SET_METHOD = "changeSetMethod"; + static final String METADATA = "metadata"; + static final String EXECUTION_MILLIS = "executionMillis"; + static final String EXECUTION_HOSTNAME = "executionHostname"; + static final String ERROR_TRACE = "errorTrace"; + static final String SYSTEM_CHANGE = "systemChange"; + + static final String STATE_EXECUTED = "EXECUTED"; + static final String STATE_FAILED = "FAILED"; + static final String TYPE_EXECUTION = "EXECUTION"; + + private static final String UNKNOWN_HOSTNAME = "unknown"; + private static final int EXECUTION_ID_SUFFIX_BOUND = 1000; + + /** The identity of a change set in the history. */ + public record ChangeKey(String changeId, String author) { + } + + private final MongoTemplate mongoTemplate; + private final String hostname = resolveHostname(); + + public MigrationHistory(MongoTemplate mongoTemplate) { + this.mongoTemplate = mongoTemplate; + } + + /** The identifier that ties the entries of one start together: the local time and a random number. */ + public static String newExecutionId() { + return LocalDateTime.now() + "-" + ThreadLocalRandom.current().nextInt(EXECUTION_ID_SUFFIX_BOUND); + } + + /** The keys of the change sets with an {@value #STATE_EXECUTED} entry; entries in any other state are ignored. */ + public Set executedKeys() { + Set keys = new HashSet<>(); + try { + for (Document entry : collection() + .find(new Document(STATE, STATE_EXECUTED)) + .projection(Projections.include(CHANGE_ID, AUTHOR))) { + keys.add(new ChangeKey(entry.getString(CHANGE_ID), entry.getString(AUTHOR))); + } + } catch (MongoException e) { + throw new MigrationHistoryException("cannot read the migration history in " + COLLECTION, e); + } + return keys; + } + + public void recordExecuted(MigrationStep step, String executionId, Instant startedAt, long executionMillis) { + insert(entry(step, executionId, startedAt, executionMillis, STATE_EXECUTED, null)); + } + + public void recordFailed(MigrationStep step, String executionId, Instant startedAt, long executionMillis, + Throwable failure) { + insert(entry(step, executionId, startedAt, executionMillis, STATE_FAILED, stackTrace(failure))); + } + + private Document entry(MigrationStep step, String executionId, Instant startedAt, long executionMillis, String state, + String errorTrace) { + return new Document() + .append(EXECUTION_ID, executionId) + .append(CHANGE_ID, step.id()) + .append(AUTHOR, step.author()) + .append(TIMESTAMP, Date.from(startedAt)) + .append(STATE, state) + .append(TYPE, TYPE_EXECUTION) + .append(CHANGE_LOG_CLASS, step.changeLogClass()) + .append(CHANGE_SET_METHOD, step.changeSetMethod()) + .append(METADATA, null) + .append(EXECUTION_MILLIS, executionMillis) + .append(EXECUTION_HOSTNAME, hostname) + .append(ERROR_TRACE, errorTrace) + .append(SYSTEM_CHANGE, false); + } + + private void insert(Document entry) { + try { + collection().insertOne(entry); + } catch (MongoException e) { + throw new MigrationHistoryException("cannot write the migration history entry of " + + entry.getString(CHANGE_ID) + " (" + entry.getString(STATE) + ") to " + COLLECTION, e); + } + } + + private MongoCollection collection() { + return mongoTemplate.getCollection(COLLECTION); + } + + private static String stackTrace(Throwable failure) { + StringWriter text = new StringWriter(); + failure.printStackTrace(new PrintWriter(text)); + return text.toString(); + } + + private static String resolveHostname() { + try { + return InetAddress.getLocalHost().getHostName(); + } catch (UnknownHostException e) { + return UNKNOWN_HOSTNAME; + } + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationHistoryException.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationHistoryException.java new file mode 100644 index 000000000..7879f6f08 --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationHistoryException.java @@ -0,0 +1,9 @@ +package org.lowcoder.runner.migrations; + +/** The migration history collection could not be read or written. */ +public class MigrationHistoryException extends MigrationException { + + public MigrationHistoryException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLock.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLock.java new file mode 100644 index 000000000..eaadadd5f --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLock.java @@ -0,0 +1,277 @@ +package org.lowcoder.runner.migrations; + +import java.time.Duration; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +import org.bson.Document; +import org.bson.conversions.Bson; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Profile; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.stereotype.Component; + +import com.mongodb.ErrorCategory; +import com.mongodb.MongoException; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.model.FindOneAndUpdateOptions; +import com.mongodb.client.model.ReturnDocument; +import com.mongodb.client.result.UpdateResult; + +import lombok.extern.slf4j.Slf4j; + +/** + * Keeps two instances from running change sets at the same time: a lease that is renewed while it is held and fenced + * before every change set and every history write. + * + *

Why a renewed lease: a change set has no time limit ({@code addSuperAdminUser}, change set 020, waits for its job without + * one), so a lock with a fixed expiry would run out inside such a change set and let a second instance start. + * + *

Document. One document, {@value #LOCK_ID}, in {@value #COLLECTION} (not Mongock's {@code mongockLock}, whose + * format this code does not rely on): {@code owner} (random per acquisition), {@code generation} (raised by one at every + * acquisition) and {@code expiresAt}. Every time comes from the database server ({@code $$NOW}), so the clocks of the + * instances do not matter. + * + *

Acquire: one find-and-modify that takes the document when it is new or its {@code expiresAt} is past, and leaves it + * alone otherwise (see {@link #tryAcquire}); a duplicate-key error from two first acquisitions at once means the other + * instance won. {@link #acquire()} polls until it succeeds or the maximum wait + * passes. Renew: a background thread renews every {@link MigrationLockSettings#renewalEvery()} with an update that + * matches {@code _id}, {@code owner} and {@code generation}. Fence: {@link Held#confirm()} runs the same update. Lost: + * the update matches nothing (another instance took the lock over), or no renewal succeeded before the lease ran out + * (errors are retried until then); {@link Held#confirm()} then throws {@link MigrationLockLostException} for good. + * Release: {@link Held#close()} deletes the document with the same filter. + * + *

Limits. The fence guards the history writes and the start of each change set. It cannot stop what a change set + * body writes after its instance lost the lock, for example when the whole process stalled for longer than the lease. + * The lock does not exclude Mongock (the build before the replacement), which locks {@code mongockLock}: the two + * builds must not start on one database at the same time. + */ +@Slf4j +@Component +@Profile("!test") +public class MigrationLock { + + static final String COLLECTION = "lowcoderMigrationLock"; + static final String LOCK_ID = "migrations"; + static final String ID = "_id"; + static final String OWNER = "owner"; + static final String GENERATION = "generation"; + static final String EXPIRES_AT = "expiresAt"; + + private static final String NOW = "$$NOW"; + private static final String HEARTBEAT_THREAD = "migration-lock-heartbeat"; + private static final long RETRY_PAUSE_MILLIS = 500; + private static final long HEARTBEAT_STOP_SECONDS = 5; + + private final MongoTemplate mongoTemplate; + private final MigrationLockSettings settings; + + @Autowired + public MigrationLock(MongoTemplate mongoTemplate, + @Value("${lowcoder.migration-lock.lease:PT60S}") Duration lease, + @Value("${lowcoder.migration-lock.max-wait:PT10M}") Duration maxWait) { + this(mongoTemplate, MigrationLockSettings.of(lease, maxWait)); + } + + public MigrationLock(MongoTemplate mongoTemplate, MigrationLockSettings settings) { + this.mongoTemplate = mongoTemplate; + this.settings = settings; + } + + /** + * Waits for the lock, at most {@link MigrationLockSettings#maxWait()}, and starts renewing it. + * + * @throws MigrationLockTimeoutException another instance held the lock for the whole wait + * @throws MigrationLockException the database failed in a way other than a held lock + */ + public Held acquire() { + String owner = UUID.randomUUID().toString(); + long giveUpAt = System.nanoTime() + settings.maxWait().toNanos(); + while (true) { + long attemptStartedAt = System.nanoTime(); + Document acquired = tryAcquire(owner); + if (acquired != null) { + Held held = new Held(owner, acquired.getLong(GENERATION), attemptStartedAt + settings.lease().toNanos()); + log.info("Migration lock acquired: owner={} generation={}", owner, held.generation); + held.startRenewing(); + return held; + } + if (System.nanoTime() - giveUpAt >= 0) { + throw new MigrationLockTimeoutException("another instance held the migration lock in " + COLLECTION + + " for " + settings.maxWait()); + } + log.info("Migration lock is held by another instance, waiting"); + pause(settings.pollEvery().toMillis()); + } + } + + /** + * One find-and-modify on {@code _id} that upserts. A pipeline update decides inside the document: when it is new or + * its {@code expiresAt} is past (database time), it takes {@code owner}, raises {@code generation} and sets + * {@code expiresAt}; otherwise it leaves all three alone. (A filter on {@code expiresAt} cannot do this: MongoDB + * refuses {@code $expr}, which {@code $$NOW} needs, in the predicate of an upsert.) The lock is ours when the + * returned document carries our owner. + */ + private Document tryAcquire(String owner) { + Document expired = new Document("$lte", Arrays.asList( + new Document("$ifNull", Arrays.asList("$" + EXPIRES_AT, new Date(0))), NOW)); + Document currentGeneration = new Document("$ifNull", Arrays.asList("$" + GENERATION, 0L)); + List pipeline = List.of(new Document("$set", new Document() + .append(OWNER, new Document("$cond", Arrays.asList(expired, new Document("$literal", owner), "$" + OWNER))) + .append(GENERATION, new Document("$cond", Arrays.asList(expired, + new Document("$add", Arrays.asList(currentGeneration, 1L)), currentGeneration))) + .append(EXPIRES_AT, new Document("$cond", Arrays.asList(expired, leaseEnd(), "$" + EXPIRES_AT))))); + try { + Document current = collection().findOneAndUpdate(new Document(ID, LOCK_ID), pipeline, + new FindOneAndUpdateOptions().upsert(true).returnDocument(ReturnDocument.AFTER)); + return current != null && owner.equals(current.getString(OWNER)) ? current : null; + } catch (MongoException e) { + if (ErrorCategory.fromErrorCode(e.getCode()) == ErrorCategory.DUPLICATE_KEY) { + return null; + } + throw new MigrationLockException("cannot acquire the migration lock in " + COLLECTION, e); + } + } + + private Document leaseEnd() { + return new Document("$dateAdd", new Document("startDate", NOW) + .append("unit", "millisecond") + .append("amount", settings.lease().toMillis())); + } + + private MongoCollection collection() { + return mongoTemplate.getCollection(COLLECTION); + } + + private static void pause(long millis) { + try { + Thread.sleep(millis); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new MigrationLockException("interrupted while waiting for the migration lock", e); + } + } + + /** A lock this instance holds. Close it to release it, also after a failure. */ + public final class Held implements AutoCloseable { + + private final String owner; + private final long generation; + private final Object refreshMonitor = new Object(); + private volatile long validUntilNanos; + private volatile boolean lost; + private ScheduledExecutorService heartbeat; + + private Held(String owner, long generation, long validUntilNanos) { + this.owner = owner; + this.generation = generation; + this.validUntilNanos = validUntilNanos; + } + + public String owner() { + return owner; + } + + public long generation() { + return generation; + } + + /** + * Confirms that this instance still holds the lock, and renews it. Call it before starting a change set and + * before writing a history entry. + * + * @throws MigrationLockLostException the lock was taken over or ran out; it stays lost + */ + public void confirm() { + refresh(); + } + + private void startRenewing() { + if (!settings.renewing()) { + return; + } + heartbeat = Executors.newSingleThreadScheduledExecutor(task -> { + Thread thread = new Thread(task, HEARTBEAT_THREAD); + thread.setDaemon(true); + return thread; + }); + long every = settings.renewalEvery().toMillis(); + heartbeat.scheduleWithFixedDelay(this::renewInBackground, every, every, TimeUnit.MILLISECONDS); + } + + private void renewInBackground() { + if (lost) { + return; + } + try { + refresh(); + } catch (MigrationLockLostException e) { + log.error("Migration lock lost: {}", e.getMessage()); + } catch (RuntimeException e) { + log.error("Migration lock renewal stopped by {}", e.toString(), e); + } + } + + private void refresh() { + synchronized (refreshMonitor) { + if (lost) { + throw new MigrationLockLostException("the migration lock was lost earlier (owner " + owner + + ", generation " + generation + ")"); + } + while (true) { + long attemptStartedAt = System.nanoTime(); + try { + UpdateResult result = collection().updateOne(heldFilter(), + List.of(new Document("$set", new Document(EXPIRES_AT, leaseEnd())))); + if (result.getMatchedCount() == 0) { + lost = true; + throw new MigrationLockLostException("another instance took over the migration lock: no" + + " document with owner " + owner + " and generation " + generation + " in " + + COLLECTION); + } + validUntilNanos = attemptStartedAt + settings.lease().toNanos(); + return; + } catch (MongoException e) { + if (System.nanoTime() - validUntilNanos >= 0) { + lost = true; + throw new MigrationLockLostException("no renewal of the migration lock succeeded within " + + settings.lease() + " (owner " + owner + ", generation " + generation + ")", e); + } + log.warn("Migration lock renewal failed, retrying: {}", e.toString()); + pause(RETRY_PAUSE_MILLIS); + } + } + } + } + + private Document heldFilter() { + return new Document(ID, LOCK_ID).append(OWNER, owner).append(GENERATION, generation); + } + + /** Stops the renewal and deletes the lock document if this instance still owns it. */ + @Override + public void close() { + if (heartbeat != null) { + heartbeat.shutdownNow(); + try { + heartbeat.awaitTermination(HEARTBEAT_STOP_SECONDS, TimeUnit.SECONDS); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + try { + long released = collection().deleteOne(heldFilter()).getDeletedCount(); + log.info("Migration lock released: owner={} generation={} (document {})", owner, generation, + released == 1 ? "deleted" : "no longer ours"); + } catch (MongoException e) { + log.warn("Migration lock could not be released and expires on its own: {}", e.toString()); + } + } + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockException.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockException.java new file mode 100644 index 000000000..6911e04d0 --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockException.java @@ -0,0 +1,13 @@ +package org.lowcoder.runner.migrations; + +/** The migration lock could not be taken or kept. See {@link MigrationLock}. */ +public class MigrationLockException extends MigrationException { + + public MigrationLockException(String message) { + super(message); + } + + public MigrationLockException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockLostException.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockLostException.java new file mode 100644 index 000000000..38ebb0c1d --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockLostException.java @@ -0,0 +1,16 @@ +package org.lowcoder.runner.migrations; + +/** + * The lock this instance held is gone: another instance took it over, or no renewal succeeded before it expired. The + * runner starts no further change set and writes no further history entry. + */ +public class MigrationLockLostException extends MigrationLockException { + + public MigrationLockLostException(String message) { + super(message); + } + + public MigrationLockLostException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockSettings.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockSettings.java new file mode 100644 index 000000000..b21239616 --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockSettings.java @@ -0,0 +1,45 @@ +package org.lowcoder.runner.migrations; + +import java.time.Duration; + +/** + * Timing of {@link MigrationLock}. + * + * @param lease how long the lock stays valid without a renewal; it has to cover the longest stall of the whole + * process (a garbage collection pause, a suspended container), because a change set body that keeps + * writing after its instance lost the lock cannot be stopped + * @param renewalEvery how often a held lock is renewed: a third of the lease, so two renewals can fail before the lease + * runs out + * @param maxWait how long an instance waits for a lock another instance holds before its start fails + * @param pollEvery how often a waiting instance tries again + * @param renewing whether a held lock is renewed in the background; {@code false} only in tests, to show that the + * renewal is what keeps a long change set exclusive + */ +public record MigrationLockSettings(Duration lease, Duration renewalEvery, Duration maxWait, Duration pollEvery, + boolean renewing) { + + public static final Duration DEFAULT_LEASE = Duration.ofSeconds(60); + public static final Duration DEFAULT_MAX_WAIT = Duration.ofMinutes(10); + public static final Duration DEFAULT_POLL = Duration.ofSeconds(1); + private static final int RENEWALS_PER_LEASE = 3; + + public MigrationLockSettings { + if (lease.isZero() || lease.isNegative() || renewalEvery.isZero() || renewalEvery.isNegative() + || pollEvery.isZero() || pollEvery.isNegative() || maxWait.isNegative()) { + throw new IllegalArgumentException("lock durations must be positive: " + lease + ", " + renewalEvery + ", " + + maxWait + ", " + pollEvery); + } + } + + public static MigrationLockSettings of(Duration lease, Duration maxWait) { + return new MigrationLockSettings(lease, lease.dividedBy(RENEWALS_PER_LEASE), maxWait, DEFAULT_POLL, true); + } + + public MigrationLockSettings polling(Duration pollEvery) { + return new MigrationLockSettings(lease, renewalEvery, maxWait, pollEvery, renewing); + } + + public MigrationLockSettings withoutRenewal() { + return new MigrationLockSettings(lease, renewalEvery, maxWait, pollEvery, false); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockTimeoutException.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockTimeoutException.java new file mode 100644 index 000000000..51356e4ec --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationLockTimeoutException.java @@ -0,0 +1,9 @@ +package org.lowcoder.runner.migrations; + +/** Another instance held the migration lock for the whole maximum wait. */ +public class MigrationLockTimeoutException extends MigrationLockException { + + public MigrationLockTimeoutException(String message) { + super(message); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationRegistry.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationRegistry.java new file mode 100644 index 000000000..a46edad6d --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationRegistry.java @@ -0,0 +1,34 @@ +package org.lowcoder.runner.migrations; + +import java.util.Comparator; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * The change sets to run, in the order they run: ascending {@code order}, compared as text (so {@code "010"} follows + * {@code "009"}). {@code order} and the pair {@code id}/{@code author} are each unique. + */ +public final class MigrationRegistry { + + private final List steps; + + public MigrationRegistry(List steps) { + List sorted = steps.stream().sorted(Comparator.comparing(MigrationStep::order)).toList(); + Set orders = new HashSet<>(); + Set keys = new HashSet<>(); + for (MigrationStep step : sorted) { + if (!orders.add(step.order())) { + throw new IllegalArgumentException("duplicate change set order " + step.order() + " (" + step.id() + ")"); + } + if (!keys.add(step.key())) { + throw new IllegalArgumentException("duplicate change set id/author " + step.key()); + } + } + this.steps = sorted; + } + + public List steps() { + return steps; + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationRunner.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationRunner.java new file mode 100644 index 000000000..7749a9352 --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationRunner.java @@ -0,0 +1,107 @@ +package org.lowcoder.runner.migrations; + +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.context.annotation.Profile; +import org.springframework.stereotype.Component; + +import lombok.extern.slf4j.Slf4j; + +/** + * Runs the change sets of the {@link MigrationRegistry} that the {@link MigrationHistory} does not record as executed, + * in registry order, while it holds the {@link MigrationLock}. Like any {@link ApplicationRunner} it runs after the + * context is up, so the web server answers while the change sets run; a failure ends the start of the application. + * + *

Sequence: acquire the lock (waiting for another instance, at most the lock's maximum wait), read the history only + * then (so the change sets the previous holder ran are skipped), and for each pending change set: confirm the lock, run + * the body, confirm the lock again and write the history entry. A change set that throws gets a {@code FAILED} entry + * (after a confirmation as well) and stops the run with {@link MigrationFailedException}. A lost lock stops the run with + * {@link MigrationLockLostException} without starting another change set or writing another entry: the change set that + * was running stays not completed and runs again at the next start. + * + *

Limits. A change set is not atomic: one that fails or loses the lock halfway leaves its partial writes, and its + * body has to tolerate being run again. An {@link Error} from a body ends the run without a {@code FAILED} + * entry (it is not a change set failure). See {@link MigrationLock} for what the lock does not cover. + */ +@Slf4j +@Component +@Profile("!test") +public class MigrationRunner implements ApplicationRunner { + + /** What one run did: the ids of the change sets it ran, in order, and how many were already recorded. */ + public record Outcome(List executedIds, int skipped) { + } + + private final MigrationRegistry registry; + private final MigrationHistory history; + private final MigrationLock lock; + + public MigrationRunner(MigrationRegistry registry, MigrationHistory history, MigrationLock lock) { + this.registry = registry; + this.history = history; + this.lock = lock; + } + + @Override + public void run(ApplicationArguments args) { + migrate(); + } + + public Outcome migrate() { + String executionId = MigrationHistory.newExecutionId(); + List executed = new ArrayList<>(); + int skipped = 0; + try (MigrationLock.Held held = lock.acquire()) { + Set done = history.executedKeys(); + for (MigrationStep step : registry.steps()) { + if (done.contains(step.key())) { + skipped++; + continue; + } + execute(step, held, executionId); + executed.add(step.id()); + } + } + log.info("Migrations finished: {} change sets run, {} already recorded", executed.size(), skipped); + return new Outcome(List.copyOf(executed), skipped); + } + + private void execute(MigrationStep step, MigrationLock.Held held, String executionId) { + held.confirm(); + log.info("Change set {} ({}) starts", step.id(), step.changeSetMethod()); + Instant startedAt = Instant.now(); + long startedNanos = System.nanoTime(); + try { + step.body().run(); + } catch (RuntimeException failure) { + recordFailure(step, held, executionId, startedAt, millisSince(startedNanos), failure); + throw new MigrationFailedException(step, failure); + } + long millis = millisSince(startedNanos); + held.confirm(); + history.recordExecuted(step, executionId, startedAt, millis); + log.info("Change set {} ({}) executed in {} ms", step.id(), step.changeSetMethod(), millis); + } + + private void recordFailure(MigrationStep step, MigrationLock.Held held, String executionId, Instant startedAt, + long millis, RuntimeException failure) { + log.error("Change set {} ({}) failed", step.id(), step.changeSetMethod(), failure); + try { + held.confirm(); + history.recordFailed(step, executionId, startedAt, millis, failure); + } catch (MigrationLockLostException | MigrationHistoryException e) { + e.addSuppressed(failure); + throw e; + } + } + + private static long millisSince(long startedNanos) { + return Duration.ofNanos(System.nanoTime() - startedNanos).toMillis(); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationStep.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationStep.java new file mode 100644 index 000000000..e56850da6 --- /dev/null +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/MigrationStep.java @@ -0,0 +1,31 @@ +package org.lowcoder.runner.migrations; + +import java.util.Objects; + +/** + * One change set: the identity the history stores ({@code id} and {@code author}), its {@code order}, the class and + * method names the history records, and the code to run. + * + *

{@code id} and {@code author} are the keys of the history: changing either makes the change set run again on every + * database that already recorded it. + */ +public record MigrationStep(String order, String id, String author, String changeLogClass, String changeSetMethod, + Runnable body) { + + public MigrationStep { + Objects.requireNonNull(order, "order"); + Objects.requireNonNull(id, "id"); + Objects.requireNonNull(author, "author"); + Objects.requireNonNull(changeLogClass, "changeLogClass"); + Objects.requireNonNull(changeSetMethod, "changeSetMethod"); + Objects.requireNonNull(body, "body"); + } + + public MigrationHistory.ChangeKey key() { + return new MigrationHistory.ChangeKey(id, author); + } + + public MigrationStep withBody(Runnable replacement) { + return new MigrationStep(order, id, author, changeLogClass, changeSetMethod, replacement); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/job/EmailNormalizationBackfill.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/job/EmailNormalizationBackfill.java index 084e82cdb..93daf651a 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/job/EmailNormalizationBackfill.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/runner/migrations/job/EmailNormalizationBackfill.java @@ -51,7 +51,7 @@ * account that took the key is not part of that report -- it was not a conflict when it was read, and * finding it would need a third pass. Such a group is therefore reported by one member, not all of them. * - *

Nothing in the data it finds may prevent the application from starting. Mongock runs as an + *

Nothing in the data it finds may prevent the application from starting. The migration runner runs as an * {@code ApplicationRunner} at boot and records a throwing changeset as FAILED, which by default stops * startup. Worse, {@code AddSuperAdminRunner} writes the super-admin user from a {@code @PostConstruct} * that ends in a bare {@code subscribe()}, so it is not ordered against this migration and can land a @@ -115,7 +115,7 @@ public static Summary run(MongoDatabase db) { *

The absent-collection guard is load-bearing rather than defensive. {@code @ActiveProfiles} replaces * the active profile set rather than adding to it, so every test class that names its own profile -- * {@code emailSanitization}, {@code testGeneric}, {@code testFolder} and the rest -- does NOT have - * {@code test} active, {@code @Profile("!test")} matches, and Mongock runs this changeset at context + * {@code test} active, {@code @Profile("!test")} matches, and the migration runner runs this changeset at context * startup against a database those suites have not populated yet. */ static Summary run(MongoDatabase db, String usersCollection, String reportCollection) { @@ -340,7 +340,7 @@ static Summary backfill(MongoCollection users, MongoCollectionProfile and isolation. The profile is {@code databaseChangelog}, not {@code test}: the class is - * {@code @Profile("!test")} (DatabaseChangelog:68), so under {@code test} Mongock skips it, while under this profile - * Mongock runs the whole changelog at startup. {@code TestContainersInitializer} gives this context its own database - * ({@code lowcoder_test_}); {@code mongockChangeLog}, {@code mongockLock} and every collection used here live in that - * database, so no other context is reachable. A failing changeset at startup would stop the context from loading, and - * that is a finding, not something to work around. + *

Profile and isolation. The profile is {@code databaseChangelog}, not {@code test}: {@link MigrationRunner} and + * {@link DatabaseChangelogRegistry} are {@code @Profile("!test")}, so under {@code test} the changelog does not run, + * while under this profile the runner runs the whole changelog at startup. {@code TestContainersInitializer} gives this + * context its own database ({@code lowcoder_test_}); the {@code mongockChangeLog} history, the migration lock + * collection and every collection used here live in that database, so no other context is reachable. A failing + * changeset at startup would stop the context from loading, and that is a finding, not something to work around. * *

Each test seeds legacy-shaped documents into the collections the changeset reads and calls the changeset directly - * with a {@link MongockTemplate} over the context's {@link MongoTemplate}. The collections are emptied before each test. - * Changeset 032 ({@code normalizeEmailBackfill}) is covered by {@code EmailNormalizationBackfillTest} and - * {@code EmailBackfillEndToEndTest} and is only checked here as part of the startup record. + * with the context's {@link MongoTemplate}. The collections are emptied before each test. Changeset 032 + * ({@code normalizeEmailBackfill}) is covered by {@code EmailNormalizationBackfillTest} and + * {@code EmailBackfillEndToEndTest} and is only checked here as part of the startup record. The runner itself (lock, + * history rule, failures) is covered by {@code MigrationRunnerMongoTest}. * - *

Re-runs. Mongock records each changeset and runs it once, so a second run of a changeset happens only through a - * manual re-run; the tests that run a changeset twice describe what such a re-run does, not something the application + *

Re-runs. The runner records each changeset and runs it once, so a second run of a changeset happens only through + * a manual re-run; the tests that run a changeset twice describe what such a re-run does, not something the application * does by itself. * *

The container is {@code mongo:7.0}, so {@code addTimeSeriesSnapshotHistory} takes its {@code >= 5} branch (a @@ -70,13 +68,12 @@ public class DatabaseChangelogMigrationsTest { private static final String TAG = "[DatabaseChangelogMigrationsTest] "; - private static final String CHANGE_LOG_COLLECTION = "mongockChangeLog"; + private static final String CHANGE_LOG_COLLECTION = MigrationHistory.COLLECTION; private static final String CHANGE_ID_FIELD = "changeId"; - private static final String MONGOCK_SYSTEM_CHANGE_PREFIX = "system-change-"; private static final String STATE_FIELD = "state"; private static final String STATE_EXECUTED = "EXECUTED"; - /** Number of {@code @ChangeSet} methods on DatabaseChangelog (order 001-032, with gaps); update when one is added. */ + /** Number of change sets registered by DatabaseChangelogRegistry (order 001-032, with gaps); update when one is added. */ private static final int DECLARED_CHANGE_SETS = 29; private static final String FOLDER = "folder"; @@ -100,14 +97,15 @@ public class DatabaseChangelogMigrationsTest { private MongoTemplate mongoTemplate; @Autowired private CommonConfig commonConfig; + @Autowired + private MigrationRegistry registry; private MongoDatabase db; - private MongockTemplate mongock; private final DatabaseChangelog changelog = new DatabaseChangelog(); /** * The scheduler of the application runs the archive task on its thread {@value #SCHEDULER_THREAD} (the task is - * scheduled with initialDelay 0 and fires when the context is refreshed, before the Mongock runner and so before + * scheduled with initialDelay 0 and fires when the context is refreshed, before the migration runner and so before * the test instance exists). Wait, bounded, until that thread exists and is no longer runnable, i.e. the start-up * run has finished. Console capture of the task's completion message was tried and does not work: the message is * not in the captured output. @@ -129,37 +127,29 @@ public void awaitArchiveTaskOfContextStart() throws InterruptedException { @BeforeEach public void emptyTheCollections() { db = mongoTemplate.getDb(); - mongock = new MongockTemplate(mongoTemplate); db.getCollection(APPLICATION_RECORD).drop(); for (String name : List.of(FOLDER, USER, APPLICATION, APPLICATION_VERSION, SNAPSHOT, SNAPSHOT_TS)) { db.getCollection(name).deleteMany(new Document()); } // 029 built the unique (applicationId, tag) index at startup; a test that dropped the collection gets it back. - changelog.addTagIndexToRecord(mongock, commonConfig); + changelog.addTagIndexToRecord(mongoTemplate, commonConfig); } // ---------------------------------------------------------------- start-up run @Test public void startup_recordsEveryChangeSetAsExecuted() { - Set declared = new TreeSet<>(); - for (Method method : DatabaseChangelog.class.getDeclaredMethods()) { - ChangeSet changeSet = method.getAnnotation(ChangeSet.class); - if (changeSet != null) { - declared.add(changeSet.id()); - } - } - // Mongock also records its own system change (ids "system-change-00001" and "..._before"); only ours are compared. - List recorded = db.getCollection(CHANGE_LOG_COLLECTION).find().into(new ArrayList<>()).stream() - .filter(d -> !d.getString(CHANGE_ID_FIELD).startsWith(MONGOCK_SYSTEM_CHANGE_PREFIX)) - .collect(Collectors.toList()); + Set declared = registry.steps().stream().map(MigrationStep::id) + .collect(Collectors.toCollection(TreeSet::new)); + List recorded = db.getCollection(CHANGE_LOG_COLLECTION).find().into(new ArrayList<>()); Set recordedIds = recorded.stream().map(d -> d.getString(CHANGE_ID_FIELD)) .collect(Collectors.toCollection(TreeSet::new)); log.info("{}declared change sets: {}, recorded: {}", TAG, declared.size(), recordedIds.size()); - assertThat(declared).as("change sets declared on DatabaseChangelog").hasSize(DECLARED_CHANGE_SETS); + assertThat(declared).as("change sets registered by DatabaseChangelogRegistry").hasSize(DECLARED_CHANGE_SETS); assertThat(recordedIds).as("change ids recorded in " + CHANGE_LOG_COLLECTION + " of this context's database") .isEqualTo(declared); + assertThat(recorded).as("one history entry per change set, none for a retry").hasSize(DECLARED_CHANGE_SETS); assertThat(recorded).extracting(d -> d.getString(STATE_FIELD)).containsOnly(STATE_EXECUTED); assertThat(recordedIds).contains("init-indexes", "normalize-email-backfill"); } @@ -177,7 +167,7 @@ public void fillCreateAt_setsCreatedAtOnlyWhereMissing_andIsIdempotent() { new Document("_id", present).append("gid", uniqueGid()).append("name", "has createdAt") .append("createdAt", original))); - changelog.fillCreateAt(mongock); + changelog.fillCreateAt(mongoTemplate); Document filled = byId(FOLDER, missing); Document kept = byId(FOLDER, present); @@ -186,7 +176,7 @@ public void fillCreateAt_setsCreatedAtOnlyWhereMissing_andIsIdempotent() { assertThat(kept.getDate("createdAt")).as("an existing createdAt is not touched").isEqualTo(original); Date firstFill = filled.getDate("createdAt"); - changelog.fillCreateAt(mongock); + changelog.fillCreateAt(mongoTemplate); assertThat(byId(FOLDER, missing).getDate("createdAt")).as("second run changes nothing").isEqualTo(firstFill); assertThat(byId(FOLDER, present).getDate("createdAt")).isEqualTo(original); assertThat(db.getCollection(FOLDER).countDocuments()).isEqualTo(2); @@ -210,7 +200,7 @@ public void populateEmailInUserConnections_copiesNameIntoEmailConnectionsThatLac connection(EMAIL, "mixed@example.com", "mixed-email@example.com", true), connection(GOOGLE, "mixed google", null, false))))); - changelog.populateEmailInUserConnections(mongock, commonConfig); + changelog.populateEmailInUserConnections(mongoTemplate, commonConfig); List lackingConnections = connectionsOf(lacking); log.info("{}populateEmail: lacking={}", TAG, lackingConnections); @@ -224,7 +214,7 @@ public void populateEmailInUserConnections_copiesNameIntoEmailConnectionsThatLac /** * An EMAIL connection whose {@code email} is stored as an explicit null matches the changeset's query but is skipped * by its loop ({@code !connection.containsKey("email")}, DatabaseChangelog:421), so it stays null. Pinned as observed; - * the changeset runs once per database (Mongock), so this is a property of a manual re-run on such data. + * the changeset runs once per database (the migration runner), so this is a property of a manual re-run on such data. */ @Test public void populateEmailInUserConnections_anExplicitNullEmailIsNotFilled() { @@ -232,7 +222,7 @@ public void populateEmailInUserConnections_anExplicitNullEmailIsNotFilled() { db.getCollection(USER).insertOne(new Document("_id", id).append("connections", List.of(connection(EMAIL, "null-email@example.com", null, true)))); - changelog.populateEmailInUserConnections(mongock, commonConfig); + changelog.populateEmailInUserConnections(mongoTemplate, commonConfig); Document connection = connectionsOf(id).get(0); log.info("{}populateEmail explicit null: {}", TAG, connection); @@ -253,7 +243,7 @@ public void publishedToRecord_createsOneVersionRecordPerPublishedApplication() { new Document("_id", unpublished).append("gid", uniqueGid()).append("createdBy", "creator-2") .append("editingApplicationDSL", new Document("comp", "only editing")))); - changelog.publishedToRecord(mongock, commonConfig); + changelog.publishedToRecord(mongoTemplate, commonConfig); List versions = db.getCollection(APPLICATION_VERSION).find().into(new ArrayList<>()); log.info("{}publishedToRecord: {}", TAG, versions); @@ -273,16 +263,16 @@ public void publishedToRecord_createsOneVersionRecordPerPublishedApplication() { /** * A second run inserts the same (applicationId, tag) again and the unique index from changeset 029 rejects it, so the - * changeset is not idempotent. Mongock runs it once per database; only a manual re-run gets here. + * changeset is not idempotent. The runner runs it once per database; only a manual re-run gets here. */ @Test public void publishedToRecord_runTwice_failsOnTheUniqueApplicationIdTagIndex() { ObjectId id = new ObjectId(); db.getCollection(APPLICATION).insertOne(new Document("_id", id).append("gid", uniqueGid()).append("createdBy", "c") .append("publishedApplicationDSL", new Document("a", 1))); - changelog.publishedToRecord(mongock, commonConfig); + changelog.publishedToRecord(mongoTemplate, commonConfig); - assertThatThrownBy(() -> changelog.publishedToRecord(mongock, commonConfig)) + assertThatThrownBy(() -> changelog.publishedToRecord(mongoTemplate, commonConfig)) .as("second run").isInstanceOf(DuplicateKeyException.class); assertThat(db.getCollection(APPLICATION_VERSION).countDocuments()).isEqualTo(1); } @@ -294,7 +284,7 @@ public void renameApplicationRecordCollection_renamesWhenPresent() { db.getCollection(APPLICATION_VERSION).drop(); db.getCollection(APPLICATION_RECORD).insertOne(new Document("applicationId", "app-1").append("tag", "x")); - changelog.renameApplicationRecordCollection(mongock, db); + changelog.renameApplicationRecordCollection(mongoTemplate, db); assertThat(collectionNames()).contains(APPLICATION_VERSION).doesNotContain(APPLICATION_RECORD); List moved = db.getCollection(APPLICATION_VERSION).find().into(new ArrayList<>()); @@ -305,7 +295,7 @@ public void renameApplicationRecordCollection_renamesWhenPresent() { public void renameApplicationRecordCollection_skipsWhenTheOldCollectionIsAbsent() { db.getCollection(APPLICATION_VERSION).insertOne(new Document("applicationId", "stays")); - changelog.renameApplicationRecordCollection(mongock, db); + changelog.renameApplicationRecordCollection(mongoTemplate, db); assertThat(collectionNames()).doesNotContain(APPLICATION_RECORD).contains(APPLICATION_VERSION); assertThat(db.getCollection(APPLICATION_VERSION).countDocuments()).isEqualTo(1); @@ -323,7 +313,7 @@ public void deleteOldSuperAdmin_keepsOnlyTheNewestSuperAdmin() { admin(oldest, 1_000_000L), admin(newest, 3_000_000L), admin(middle, 2_000_000L), new Document("_id", ordinary).append("createdAt", new Date(500L)).append("connections", List.of(connection(EMAIL, "ordinary", "o@example.com", true))))); - changelog.deleteOldSuperAdmin(mongock, db); + changelog.deleteOldSuperAdmin(mongoTemplate, db); List remaining = db.getCollection(USER).find().into(new ArrayList<>()).stream() .map(d -> d.getObjectId("_id")).collect(Collectors.toList()); @@ -336,7 +326,7 @@ public void deleteOldSuperAdmin_aSingleSuperAdminStays() { ObjectId only = new ObjectId(); db.getCollection(USER).insertOne(admin(only, 1_000L)); - changelog.deleteOldSuperAdmin(mongock, db); + changelog.deleteOldSuperAdmin(mongoTemplate, db); assertThat(db.getCollection(USER).countDocuments()).isEqualTo(1); assertThat(byId(USER, only)).isNotNull(); @@ -357,7 +347,7 @@ public void addTimeSeriesSnapshotHistory_onMongo5AndLater_movesOnlySnapshotsOlde snapshot(oldOne, "app-old-1", oldEnough), snapshot(oldTwo, "app-old-2", oldEnough.minusSeconds(60)), snapshot(kept, "app-recent", recent))); - changelog.addTimeSeriesSnapshotHistory(mongock, commonConfig); + changelog.addTimeSeriesSnapshotHistory(mongoTemplate, commonConfig); List archived = db.getCollection(SNAPSHOT_TS).find().into(new ArrayList<>()); List remaining = db.getCollection(SNAPSHOT).find().into(new ArrayList<>()); @@ -371,7 +361,7 @@ public void addTimeSeriesSnapshotHistory_onMongo5AndLater_movesOnlySnapshotsOlde /** * On MongoDB 5 and later the changeset creates the archive as a time-series collection when it is missing, and it * moves the old snapshots with inserts, which add to the target: what the archive held before the run stays, and a run - * with nothing to move leaves it as it is. (A manual re-run only: Mongock runs the changeset once per database.) + * with nothing to move leaves it as it is. (A manual re-run only: the runner runs the changeset once per database.) */ @Test public void addTimeSeriesSnapshotHistory_onMongo5AndLater_createsATimeSeriesArchive_andKeepsWhatTheTargetHeld() { @@ -381,7 +371,7 @@ public void addTimeSeriesSnapshotHistory_onMongo5AndLater_createsATimeSeriesArch db.getCollection(SNAPSHOT_TS).drop(); db.getCollection(SNAPSHOT).insertOne(snapshot(new ObjectId(), "moved-first", oldEnough)); - changelog.addTimeSeriesSnapshotHistory(mongock, commonConfig); + changelog.addTimeSeriesSnapshotHistory(mongoTemplate, commonConfig); String type = collectionType(SNAPSHOT_TS); List afterFirst = applicationIds(SNAPSHOT_TS); @@ -391,12 +381,12 @@ public void addTimeSeriesSnapshotHistory_onMongo5AndLater_createsATimeSeriesArch assertThat(afterFirst).as("the old snapshot is in the new archive").containsExactly("moved-first"); db.getCollection(SNAPSHOT).insertOne(snapshot(new ObjectId(), "moved-second", oldEnough)); - changelog.addTimeSeriesSnapshotHistory(mongock, commonConfig); + changelog.addTimeSeriesSnapshotHistory(mongoTemplate, commonConfig); assertThat(applicationIds(SNAPSHOT_TS)).as("the earlier archive row stays and the new one is added") .containsExactlyInAnyOrder("moved-first", "moved-second"); - changelog.addTimeSeriesSnapshotHistory(mongock, commonConfig); + changelog.addTimeSeriesSnapshotHistory(mongoTemplate, commonConfig); assertThat(applicationIds(SNAPSHOT_TS)).as("a run with nothing to move leaves the archive as it is") .containsExactlyInAnyOrder("moved-first", "moved-second"); @@ -407,14 +397,14 @@ public void addTimeSeriesSnapshotHistory_onMongo5AndLater_createsATimeSeriesArch @Test public void dropIndexIfExists_dropsAKnownIndex_andIgnoresAnUnknownOne() { String field = "probe" + UUID.randomUUID().toString().replace("-", ""); - DatabaseChangelog.ensureIndexes(mongock, org.lowcoder.domain.folder.model.Folder.class, DatabaseChangelog.makeIndex(field)); + DatabaseChangelog.ensureIndexes(mongoTemplate, org.lowcoder.domain.folder.model.Folder.class, DatabaseChangelog.makeIndex(field)); MongoCollection folders = db.getCollection(FOLDER); assertThat(indexNames(folders)).contains(field); - DatabaseChangelog.dropIndexIfExists(mongock, org.lowcoder.domain.folder.model.Folder.class, field); + DatabaseChangelog.dropIndexIfExists(mongoTemplate, org.lowcoder.domain.folder.model.Folder.class, field); assertThat(indexNames(folders)).doesNotContain(field); - DatabaseChangelog.dropIndexIfExists(mongock, org.lowcoder.domain.folder.model.Folder.class, field); + DatabaseChangelog.dropIndexIfExists(mongoTemplate, org.lowcoder.domain.folder.model.Folder.class, field); assertThat(indexNames(folders)).as("unknown index: the exception is swallowed").doesNotContain(field); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationLockMongoTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationLockMongoTest.java new file mode 100644 index 000000000..a29eb7464 --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationLockMongoTest.java @@ -0,0 +1,153 @@ +package org.lowcoder.runner.migrations; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.mockito.Mockito.doCallRealMethod; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.spy; + +import java.time.Duration; +import java.util.Date; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.data.mongodb.core.MongoTemplate; + +import com.mongodb.MongoException; + +import lombok.extern.slf4j.Slf4j; + +/** + * {@link MigrationLock} and {@link MigrationHistory} on the failure paths that a healthy database does not produce, and + * the background renewal on its own. A Mockito spy of the {@link MongoTemplate} makes the collection lookup throw a + * {@link MongoException}, which stands for a database that stopped answering; the real MongoDB container serves + * everything else. The runner's behaviour on a lost lock is in {@link MigrationRunnerMongoTest}. + * + *

Limits: a failing database is simulated at the collection lookup, so a call that fails halfway (a write the server + * applied but did not acknowledge) is not covered. + */ +@Slf4j +class MigrationLockMongoTest { + + private static final String TAG = "[MigrationLockMongoTest] "; + private static final Duration LEASE = Duration.ofSeconds(2); + private static final Duration WAIT = Duration.ofSeconds(30); + private static final Duration SHORT_LEASE = Duration.ofSeconds(1); + private static final long RETRY_PAUSE_FLOOR_MILLIS = 400; + + private MigrationTestDatabase db; + private MongoTemplate spiedTemplate; + + @BeforeEach + void createDatabase() { + db = new MigrationTestDatabase(); + spiedTemplate = spy(db.template); + } + + @AfterEach + void dropDatabase() { + db.close(); + } + + @Test + void heartbeat_movesTheExpiryForwardWhileTheLockIsHeld() throws InterruptedException { + MigrationLock lock = new MigrationLock(db.template, MigrationLockSettings.of(LEASE, WAIT)); + try (MigrationLock.Held held = lock.acquire()) { + Date first = db.lock().find().first().getDate(MigrationLock.EXPIRES_AT); + + Thread.sleep(LEASE.toMillis()); + + Date later = db.lock().find().first().getDate(MigrationLock.EXPIRES_AT); + log.info("{}expiresAt {} then {}", TAG, first, later); + assertThat(later).as("expiresAt after one lease of renewals (renewal every third of the lease)").isAfter(first); + assertThat(held.generation()).isEqualTo(1L); + } + assertThat(db.lock().countDocuments()).as("close() deletes the document").isZero(); + } + + @Test + void renewalErrors_areRetriedUntilTheLeaseRunsOut_thenTheLockIsLostForGood() { + MigrationLock lock = new MigrationLock(spiedTemplate, MigrationLockSettings.of(SHORT_LEASE, WAIT).withoutRenewal()); + try (MigrationLock.Held held = lock.acquire()) { + doThrow(new MongoException("database down")).when(spiedTemplate).getCollection(MigrationLock.COLLECTION); + long started = System.nanoTime(); + + assertThatThrownBy(held::confirm).as("no renewal succeeded within the lease") + .isInstanceOfSatisfying(MigrationLockLostException.class, + e -> assertThat(e).hasCauseInstanceOf(MongoException.class)); + + long elapsedMillis = Duration.ofNanos(System.nanoTime() - started).toMillis(); + log.info("{}confirm gave up after {} ms", TAG, elapsedMillis); + assertThat(elapsedMillis).as("errors were retried until the lease (1000 ms) ran out, not given up at once") + .isGreaterThanOrEqualTo(RETRY_PAUSE_FLOOR_MILLIS); + assertThatThrownBy(held::confirm).as("a lost lock stays lost, without another database call") + .isInstanceOf(MigrationLockLostException.class).hasMessageContaining("lost earlier"); + } + } + + @Test + void renewalError_thatEndsBeforeTheLeaseRunsOut_isSurvived() { + MigrationLock lock = new MigrationLock(spiedTemplate, + MigrationLockSettings.of(Duration.ofSeconds(10), WAIT).withoutRenewal()); + try (MigrationLock.Held held = lock.acquire()) { + doThrow(new MongoException("blip")).doCallRealMethod().when(spiedTemplate) + .getCollection(MigrationLock.COLLECTION); + + held.confirm(); + + assertThat(db.lock().find().first().getString(MigrationLock.OWNER)).isEqualTo(held.owner()); + } + } + + @Test + void acquire_withADatabaseError_failsAsALockExceptionNotAsATimeout() { + doThrow(new MongoException("database down")).when(spiedTemplate).getCollection(MigrationLock.COLLECTION); + MigrationLock lock = new MigrationLock(spiedTemplate, MigrationLockSettings.of(LEASE, WAIT)); + + assertThatThrownBy(lock::acquire).isExactlyInstanceOf(MigrationLockException.class) + .hasCauseInstanceOf(MongoException.class); + } + + @Test + void close_ofALockTheDatabaseCannotReleaseAnymore_doesNotThrow() { + MigrationLock lock = new MigrationLock(spiedTemplate, MigrationLockSettings.of(LEASE, WAIT).withoutRenewal()); + MigrationLock.Held held = lock.acquire(); + doThrow(new MongoException("database down")).when(spiedTemplate).getCollection(MigrationLock.COLLECTION); + + held.close(); + + doCallRealMethod().when(spiedTemplate).getCollection(MigrationLock.COLLECTION); + assertThat(db.lock().countDocuments()).as("the lock document expires on its own").isEqualTo(1); + } + + @Test + void settings_rejectNonPositiveDurations() { + assertThatThrownBy(() -> MigrationLockSettings.of(Duration.ZERO, WAIT)).isInstanceOf(IllegalArgumentException.class); + assertThatThrownBy(() -> MigrationLockSettings.of(LEASE, Duration.ofSeconds(-1))) + .isInstanceOf(IllegalArgumentException.class); + assertThat(MigrationLockSettings.of(Duration.ofSeconds(60), WAIT).renewalEvery()).as("a third of the lease") + .isEqualTo(Duration.ofSeconds(20)); + } + + // ---------------------------------------------------------------- history on a database that fails + + @Test + void history_wrapsDatabaseErrorsInMigrationHistoryException() { + doThrow(new MongoException("database down")).when(spiedTemplate).getCollection(MigrationHistory.COLLECTION); + MigrationHistory history = new MigrationHistory(spiedTemplate); + MigrationStep step = new MigrationStep("001", "one", "", "test.Changelog", "methodOne", () -> { }); + + assertThatThrownBy(history::executedKeys).isInstanceOf(MigrationHistoryException.class) + .hasCauseInstanceOf(MongoException.class); + assertThatThrownBy(() -> history.recordExecuted(step, MigrationHistory.newExecutionId(), java.time.Instant.now(), 1)) + .isInstanceOf(MigrationHistoryException.class).hasMessageContaining("one"); + assertThatThrownBy(() -> history.recordFailed(step, MigrationHistory.newExecutionId(), java.time.Instant.now(), 1, + new IllegalStateException("x"))).isInstanceOf(MigrationHistoryException.class).hasMessageContaining("FAILED"); + } + + @Test + void executionId_isALocalTimeAndANumber() { + assertThat(MigrationHistory.newExecutionId()).matches("\\d{4}-\\d{2}-\\d{2}T[\\d:.]+-\\d{1,3}"); + } +} diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationRegistryTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationRegistryTest.java new file mode 100644 index 000000000..6793a1174 --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationRegistryTest.java @@ -0,0 +1,124 @@ +package org.lowcoder.runner.migrations; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.mockito.Mockito.mock; + +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.stream.Collectors; + +import org.bson.Document; +import org.junit.jupiter.api.Test; +import org.lowcoder.runner.migrations.job.AddPtmFieldsJob; +import org.lowcoder.runner.migrations.job.AddSuperAdminUser; +import org.lowcoder.runner.migrations.job.CompleteAuthType; +import org.lowcoder.runner.migrations.job.MigrateAuthConfigJob; +import org.lowcoder.sdk.config.CommonConfig; +import org.springframework.data.mongodb.core.MongoTemplate; + +import lombok.extern.slf4j.Slf4j; + +/** + * {@link MigrationRegistry} and the production list of {@link DatabaseChangelogRegistry}. No database: the production + * registry is built over mocks, and its bodies are never run here. + * + *

The history keys are checked against the history Mongock 5.4.0 wrote ({@code migrations/mongock-5.4.0-history.jsonl}), + * so a changed id, author, class or method name, or a changed order, fails here before it re-runs a migration on a + * database that recorded it. + */ +@Slf4j +class MigrationRegistryTest { + + private static final String TAG = "[MigrationRegistryTest] "; + private static final String CHANGE_LOG_CLASS = "test.Changelog"; + + private static MigrationRegistry production() { + return DatabaseChangelogRegistry.create(new DatabaseChangelog(), mock(MongoTemplate.class), + mock(CommonConfig.class), mock(MigrateAuthConfigJob.class), mock(CompleteAuthType.class), + mock(AddSuperAdminUser.class), mock(AddPtmFieldsJob.class)); + } + + private static MigrationStep step(String order, String id, String author) { + return new MigrationStep(order, id, author, CHANGE_LOG_CLASS, "method" + id, () -> { }); + } + + @Test + void steps_runInAscendingOrderComparedAsText() { + MigrationRegistry registry = new MigrationRegistry(List.of(step("010", "ten", ""), step("002", "two", ""), + step("009", "nine", ""))); + + assertThat(registry.steps()).extracting(MigrationStep::id).containsExactly("two", "nine", "ten"); + } + + @Test + void duplicateOrder_isRejected() { + assertThatThrownBy(() -> new MigrationRegistry(List.of(step("001", "a", ""), step("001", "b", "")))) + .isInstanceOf(IllegalArgumentException.class).hasMessageContaining("order 001"); + } + + @Test + void duplicateIdAndAuthor_isRejected_butTheSameIdWithAnotherAuthorIsAnotherChangeSet() { + assertThatThrownBy(() -> new MigrationRegistry(List.of(step("001", "a", "x"), step("002", "a", "x")))) + .isInstanceOf(IllegalArgumentException.class).hasMessageContaining("id/author"); + assertThat(new MigrationRegistry(List.of(step("001", "a", "x"), step("002", "a", "y"))).steps()).hasSize(2); + } + + @Test + void step_rejectsMissingParts() { + assertThatThrownBy(() -> new MigrationStep("001", null, "", CHANGE_LOG_CLASS, "m", () -> { })) + .isInstanceOf(NullPointerException.class).hasMessageContaining("id"); + assertThatThrownBy(() -> new MigrationStep("001", "a", "", CHANGE_LOG_CLASS, "m", null)) + .isInstanceOf(NullPointerException.class).hasMessageContaining("body"); + } + + @Test + void withBody_keepsTheHistoryIdentity() { + MigrationStep original = step("001", "a", "x"); + Runnable replacement = () -> { }; + + MigrationStep copy = original.withBody(replacement); + + assertThat(copy.body()).isSameAs(replacement); + assertThat(copy).usingRecursiveComparison().ignoringFields("body").isEqualTo(original); + assertThat(copy.key()).isEqualTo(new MigrationHistory.ChangeKey("a", "x")); + } + + @Test + void productionRegistry_hasTheOrderIdsAuthorsClassAndMethodsMongockRecorded() { + List registered = production().steps(); + List mongock = MigrationTestDatabase.mongockChangeSetEntries(); + + log.info("{}registered {} change sets, Mongock recorded {}", TAG, registered.size(), mongock.size()); + assertThat(registered).as("registered change sets").hasSameSizeAs(mongock).hasSize(29); + for (int i = 0; i < mongock.size(); i++) { + Document recorded = mongock.get(i); + MigrationStep step = registered.get(i); + String where = "change set #" + i + " (" + recorded.getString(MigrationHistory.CHANGE_ID) + ")"; + assertThat(step.id()).as("id of " + where).isEqualTo(recorded.getString(MigrationHistory.CHANGE_ID)); + assertThat(step.author()).as("author of " + where).isEqualTo(recorded.getString(MigrationHistory.AUTHOR)); + assertThat(step.changeLogClass()).as("class of " + where) + .isEqualTo(recorded.getString(MigrationHistory.CHANGE_LOG_CLASS)); + assertThat(step.changeSetMethod()).as("method of " + where) + .isEqualTo(recorded.getString(MigrationHistory.CHANGE_SET_METHOD)); + } + } + + @Test + void productionRegistry_registersExactlyThePublicChangeSetMethodsOfTheChangeLog() { + Set registered = production().steps().stream().map(MigrationStep::changeSetMethod) + .collect(Collectors.toCollection(TreeSet::new)); + Set declared = new TreeSet<>(); + for (Method method : DatabaseChangelog.class.getDeclaredMethods()) { + if (Modifier.isPublic(method.getModifiers()) && !Modifier.isStatic(method.getModifiers())) { + declared.add(method.getName()); + } + } + + assertThat(registered).as("a change set method that is not registered would never run; a registered name" + + " that is not a method would be recorded under a wrong name").isEqualTo(declared); + } +} diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationRunnerMongoTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationRunnerMongoTest.java new file mode 100644 index 000000000..03625b082 --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationRunnerMongoTest.java @@ -0,0 +1,501 @@ +package org.lowcoder.runner.migrations; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; + +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + +import org.bson.Document; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.lowcoder.runner.migrations.job.AddPtmFieldsJob; +import org.lowcoder.runner.migrations.job.AddSuperAdminUser; +import org.lowcoder.runner.migrations.job.CompleteAuthType; +import org.lowcoder.runner.migrations.job.MigrateAuthConfigJob; +import org.lowcoder.sdk.config.CommonConfig; + +import com.mongodb.MongoException; +import com.mongodb.client.model.Filters; +import com.mongodb.client.model.Updates; + +import lombok.extern.slf4j.Slf4j; + +/** + * {@link MigrationRunner} with its real {@link MigrationHistory} and {@link MigrationLock} against the module's MongoDB + * container. Each test gets a database of its own ({@link MigrationTestDatabase}). + * + *

Two kinds of registry. The production one ({@link #productionRegistryCounting}) has the ids, authors and order of + * {@link DatabaseChangelogRegistry} with bodies that only record that they ran, so the tests prove the history rule on the + * real keys against the history Mongock 5.4.0 wrote ({@code migrations/mongock-5.4.0-history.jsonl}, captured from the + * build before the replacement on an empty database, host name replaced). The bodies of the real change sets are + * exercised by {@link DatabaseChangelogMigrationsTest}. A small registry of test change sets is used where a body has to + * block, throw or take the lock away. + * + *

Limits: the fixture is the history of a fresh Mongock start. A history written by an older Mongock version or by + * hand is not covered. That the build before the replacement reads the history this runner writes is shown by the + * field and type comparison here and by the rollback run on a real database that the phase documents, not by a test in + * this module (which has no second build to start). + */ +@Slf4j +class MigrationRunnerMongoTest { + + private static final String TAG = "[MigrationRunnerMongoTest] "; + private static final String PUBLISHED_TO_RECORD = "published-to-record"; + private static final String PUBLISHED_TO_RECORD_AUTHOR = "Thomas"; + private static final int CHANGE_SETS = 29; + private static final Duration LEASE = Duration.ofSeconds(2); + private static final Duration LONG_CHANGE_SET = LEASE.multipliedBy(3); + private static final Duration LONG_WAIT = Duration.ofSeconds(60); + private static final Duration POLL = Duration.ofMillis(50); + private static final Duration SHORT_WAIT = Duration.ofMillis(300); + private static final long LATCH_SECONDS = 30; + private static final String TEST_CHANGE_LOG_CLASS = "test.Changelog"; + + private MigrationTestDatabase db; + private ExecutorService threads; + private final List events = Collections.synchronizedList(new ArrayList<>()); + + @BeforeEach + void createDatabase() { + db = new MigrationTestDatabase(); + threads = Executors.newCachedThreadPool(); + log.info("{}database {}", TAG, db.name); + } + + @AfterEach + void dropDatabase() { + threads.shutdownNow(); + db.close(); + } + + // ---------------------------------------------------------------- history + + @Test + void freshDatabase_runsEveryChangeSetOnceInMongocksOrder_andWritesEntriesLikeMongock() { + MigrationRunner runner = runnerOver(productionRegistryCounting(""), settings()); + + MigrationRunner.Outcome outcome = runner.migrate(); + + List fixture = MigrationTestDatabase.mongockChangeSetEntries(); + List mongockOrder = fixture.stream().map(d -> d.getString(MigrationHistory.CHANGE_ID)).toList(); + List written = db.historyEntries(); + log.info("{}ran {} change sets, wrote {} entries", TAG, outcome.executedIds().size(), written.size()); + assertThat(fixture).as("the fixture holds the 29 change sets of the build before the replacement").hasSize(CHANGE_SETS); + assertThat(outcome.executedIds()).as("change sets run, in the order Mongock ran them").isEqualTo(mongockOrder); + assertThat(events).as("each body ran exactly once").containsExactlyElementsOf(mongockOrder); + assertThat(outcome.skipped()).isZero(); + assertThat(written).as("one history entry per change set").hasSize(CHANGE_SETS); + assertThat(written).extracting(d -> d.getString(MigrationHistory.CHANGE_ID)) + .as("entries in execution order").containsExactlyElementsOf(mongockOrder); + assertThat(written).extracting(d -> d.getString(MigrationHistory.STATE)) + .containsOnly(MigrationHistory.STATE_EXECUTED); + assertThat(db.lock().countDocuments()).as("the lock is released after the run").isZero(); + } + + @Test + void writtenEntries_haveTheFieldsAndTypesOfMongocksEntries() { + runnerOver(productionRegistryCounting(""), settings()).migrate(); + + List mongock = MigrationTestDatabase.mongockChangeSetEntries(); + List written = db.historyEntries(); + assertThat(written).hasSameSizeAs(mongock); + for (int i = 0; i < mongock.size(); i++) { + Document expected = mongock.get(i); + Document actual = written.get(i); + String id = expected.getString(MigrationHistory.CHANGE_ID); + assertThat(actual.keySet()).as("field names and order of " + id).containsExactlyElementsOf(expected.keySet()); + for (String field : List.of(MigrationHistory.CHANGE_ID, MigrationHistory.AUTHOR, MigrationHistory.STATE, + MigrationHistory.TYPE, MigrationHistory.CHANGE_LOG_CLASS, MigrationHistory.CHANGE_SET_METHOD, + MigrationHistory.METADATA, MigrationHistory.ERROR_TRACE, MigrationHistory.SYSTEM_CHANGE)) { + assertThat(actual.get(field)).as(field + " of " + id).isEqualTo(expected.get(field)); + } + assertThat(actual.get("_id")).as("_id of " + id).isInstanceOf(org.bson.types.ObjectId.class); + assertThat(actual.get(MigrationHistory.EXECUTION_ID)).as("executionId of " + id).isInstanceOf(String.class); + assertThat(actual.get(MigrationHistory.TIMESTAMP)).as("timestamp of " + id).isInstanceOf(java.util.Date.class); + assertThat(actual.get(MigrationHistory.EXECUTION_MILLIS)).as("executionMillis of " + id) + .isInstanceOf(Long.class); + assertThat(actual.get(MigrationHistory.EXECUTION_HOSTNAME)).as("executionHostname of " + id) + .isInstanceOf(String.class); + } + assertThat(written).extracting(d -> d.getString(MigrationHistory.EXECUTION_ID)).as("one execution id per start") + .containsOnly(written.get(0).getString(MigrationHistory.EXECUTION_ID)); + } + + @Test + void historyWrittenByMongock_runsNoChangeSet_andIsNotTouched() { + db.history().insertMany(MigrationTestDatabase.mongockFixture()); + List before = db.historyEntries(); + + MigrationRunner.Outcome outcome = runnerOver(productionRegistryCounting(""), settings()).migrate(); + + log.info("{}seeded run: executed={} skipped={}", TAG, outcome.executedIds(), outcome.skipped()); + assertThat(before).as("seed: 29 change sets and 2 system entries").hasSize(CHANGE_SETS + 2); + assertThat(outcome.executedIds()).as("change sets run on a database with Mongock's history").isEmpty(); + assertThat(events).as("no body ran").isEmpty(); + assertThat(outcome.skipped()).isEqualTo(CHANGE_SETS); + assertThat(db.historyEntries()).as("history unchanged").isEqualTo(before); + assertThat(db.lock().countDocuments()).isZero(); + } + + @Test + void historyWithOneEntryRemoved_runsExactlyThatChangeSet() { + db.history().insertMany(MigrationTestDatabase.mongockFixture()); + db.history().deleteOne(Filters.and(Filters.eq(MigrationHistory.CHANGE_ID, PUBLISHED_TO_RECORD), + Filters.eq(MigrationHistory.AUTHOR, PUBLISHED_TO_RECORD_AUTHOR))); + + MigrationRunner.Outcome outcome = runnerOver(productionRegistryCounting(""), settings()).migrate(); + + log.info("{}run after removing {}: {}", TAG, PUBLISHED_TO_RECORD, outcome.executedIds()); + assertThat(outcome.executedIds()).as("only the change set without a history entry runs") + .containsExactly(PUBLISHED_TO_RECORD); + assertThat(events).containsExactly(PUBLISHED_TO_RECORD); + assertThat(db.historyEntriesOf(PUBLISHED_TO_RECORD)).as("its entry is written again").hasSize(1) + .allSatisfy(d -> assertThat(d.getString(MigrationHistory.STATE)).isEqualTo(MigrationHistory.STATE_EXECUTED)); + assertThat(db.historyEntries()).as("30 change sets and the 2 system entries again").hasSize(CHANGE_SETS + 2); + } + + @Test + void failedChangeSet_stopsTheRun_recordsFailed_andReleasesTheLock() { + IllegalStateException boom = new IllegalStateException("boom in change set two"); + MigrationRunner runner = runnerOver(testRegistry( + step("001", "one", () -> events.add("one")), + step("002", "two", () -> { + events.add("two"); + throw boom; + }), + step("003", "three", () -> events.add("three"))), settings()); + + assertThatThrownBy(runner::migrate) + .as("a throwing change set fails the start") + .isInstanceOfSatisfying(MigrationFailedException.class, e -> { + assertThat(e.getChangeId()).isEqualTo("two"); + assertThat(e).hasCause(boom); + }); + + assertThat(events).as("the run stops at the failed change set").containsExactly("one", "two"); + assertThat(db.historyEntriesOf("one")).extracting(d -> d.getString(MigrationHistory.STATE)) + .containsExactly(MigrationHistory.STATE_EXECUTED); + List failed = db.historyEntriesOf("two"); + assertThat(failed).as("a failed change set leaves one FAILED entry and no EXECUTED one").hasSize(1); + assertThat(failed.get(0).getString(MigrationHistory.STATE)).isEqualTo(MigrationHistory.STATE_FAILED); + assertThat(failed.get(0).getString(MigrationHistory.ERROR_TRACE)).contains("boom in change set two") + .contains(IllegalStateException.class.getName()); + assertThat(db.historyEntriesOf("three")).as("no entry for a change set that never started").isEmpty(); + assertThat(db.lock().countDocuments()).as("the lock is released after a failure").isZero(); + } + + @Test + void startAfterAFailure_runsTheChangeSetAgain_andKeepsItsFailedEntry() { + boolean[] failing = {true}; + MigrationRunner runner = runnerOver(testRegistry( + step("001", "one", () -> events.add("one")), + step("002", "two", () -> { + events.add("two"); + if (failing[0]) { + throw new IllegalStateException("not yet"); + } + }), + step("003", "three", () -> events.add("three"))), settings()); + assertThatThrownBy(runner::migrate).isInstanceOf(MigrationFailedException.class); + events.clear(); + failing[0] = false; + + MigrationRunner.Outcome outcome = runner.migrate(); + + assertThat(outcome.executedIds()).as("the failed change set and the one after it run; the first is recorded") + .containsExactly("two", "three"); + assertThat(db.historyEntriesOf("two")).as("the FAILED entry stays, an EXECUTED entry is added") + .extracting(d -> d.getString(MigrationHistory.STATE)) + .containsExactly(MigrationHistory.STATE_FAILED, MigrationHistory.STATE_EXECUTED); + assertThat(db.historyEntriesOf("one")).as("a recorded change set is not run again").hasSize(1); + } + + @Test + void mongockFailedEntry_isNeverCompleted_theChangeSetRunsAgain() { + List seed = MigrationTestDatabase.mongockFixture(); + for (Document entry : seed) { + if (PUBLISHED_TO_RECORD.equals(entry.getString(MigrationHistory.CHANGE_ID))) { + entry.put(MigrationHistory.STATE, MigrationHistory.STATE_FAILED); + entry.put(MigrationHistory.ERROR_TRACE, "java.lang.IllegalStateException: left by Mongock"); + } + } + db.history().insertMany(seed); + + MigrationRunner.Outcome outcome = runnerOver(productionRegistryCounting(""), settings()).migrate(); + + assertThat(outcome.executedIds()).as("a change set whose only entry is FAILED runs again") + .containsExactly(PUBLISHED_TO_RECORD); + assertThat(db.historyEntriesOf(PUBLISHED_TO_RECORD)).as("Mongock's FAILED entry stays, an EXECUTED one is added") + .extracting(d -> d.getString(MigrationHistory.STATE)) + .containsExactly(MigrationHistory.STATE_FAILED, MigrationHistory.STATE_EXECUTED); + } + + @Test + void entriesInOtherStates_neverCountAsExecuted() { + for (String state : List.of("ROLLED_BACK", "IGNORED", "STARTED", "")) { + db.history().insertOne(new Document(MigrationHistory.CHANGE_ID, "one").append(MigrationHistory.AUTHOR, "") + .append(MigrationHistory.STATE, state)); + } + + assertThat(new MigrationHistory(db.template).executedKeys()) + .as("only EXECUTED entries are completed change sets").isEmpty(); + } + + // ---------------------------------------------------------------- lock + + @Test + void heldLock_carriesOwnerGenerationAndAnExpiryInTheFuture() { + Document[] seen = new Document[1]; + runnerOver(testRegistry(step("001", "one", () -> seen[0] = db.lock().find().first())), settings()).migrate(); + + Document lock = seen[0]; + assertThat(lock).as("the lock document while a change set runs").isNotNull(); + assertThat(lock.getString(MigrationLock.ID)).isEqualTo(MigrationLock.LOCK_ID); + assertThat(lock.getString(MigrationLock.OWNER)).isNotBlank(); + assertThat(lock.getLong(MigrationLock.GENERATION)).isEqualTo(1L); + assertThat(lock.getDate(MigrationLock.EXPIRES_AT)).as("expiresAt, from the database clock") + .isAfter(new java.util.Date()); + } + + @Test + void twoRunnersStartedTogether_runEachChangeSetOnce() throws Exception { + CountDownLatch go = new CountDownLatch(1); + Function runnerNamed = name -> runnerOver(testRegistry( + step("001", "one", () -> slow(name + ":one")), + step("002", "two", () -> slow(name + ":two")), + step("003", "three", () -> slow(name + ":three"))), settings()); + Future first = threads.submit(() -> { + go.await(); + return runnerNamed.apply("A").migrate(); + }); + Future second = threads.submit(() -> { + go.await(); + return runnerNamed.apply("B").migrate(); + }); + go.countDown(); + + MigrationRunner.Outcome a = first.get(LATCH_SECONDS, TimeUnit.SECONDS); + MigrationRunner.Outcome b = second.get(LATCH_SECONDS, TimeUnit.SECONDS); + + log.info("{}A ran {}, B ran {}, events {}", TAG, a.executedIds(), b.executedIds(), events); + assertThat(events).as("every change set ran exactly once across both runners").hasSize(3); + assertThat(events.stream().map(e -> e.substring(e.indexOf(':') + 1)).toList()) + .containsExactlyInAnyOrder("one", "two", "three"); + assertThat(a.executedIds().size() + b.executedIds().size()).isEqualTo(3); + assertThat(List.of(a.executedIds().size(), b.executedIds().size())).as("the runner that waited ran none") + .containsExactlyInAnyOrder(3, 0); + assertThat(db.historyEntries()).hasSize(3); + assertThat(db.lock().countDocuments()).isZero(); + } + + @Test + void longChangeSet_keepsTheLockWhileItIsRenewed_soASecondRunnerWaitsAndThenRunsNothing() throws Exception { + CountDownLatch firstIsInsideTheChangeSet = new CountDownLatch(1); + MigrationRunner first = runnerOver(testRegistry( + step("001", "long", () -> holdFor(firstIsInsideTheChangeSet, "A", LONG_CHANGE_SET))), + settings().polling(POLL)); + MigrationRunner second = runnerOver(testRegistry( + step("001", "long", () -> events.add("B:long:start"))), settings().polling(POLL)); + Future firstRun = threads.submit(first::migrate); + assertThat(firstIsInsideTheChangeSet.await(LATCH_SECONDS, TimeUnit.SECONDS)).isTrue(); + Future secondRun = threads.submit(second::migrate); + + MigrationRunner.Outcome a = firstRun.get(LATCH_SECONDS, TimeUnit.SECONDS); + MigrationRunner.Outcome b = secondRun.get(LATCH_SECONDS, TimeUnit.SECONDS); + + log.info("{}events {}", TAG, events); + assertThat(events).as("the second runner never entered while the first held its renewed lease (3 leases)") + .containsExactly("A:long:start", "A:long:end"); + assertThat(a.executedIds()).containsExactly("long"); + assertThat(b.executedIds()).as("after the release the second runner finds the change set recorded").isEmpty(); + assertThat(b.skipped()).isEqualTo(1); + assertThat(db.historyEntriesOf("long")).hasSize(1); + } + + @Test + void longChangeSet_withRenewalSwitchedOff_letsASecondRunnerIn_andTheFirstFailsItsStart() throws Exception { + CountDownLatch firstIsInsideTheChangeSet = new CountDownLatch(1); + MigrationRunner first = runnerOver(testRegistry( + step("001", "long", () -> holdFor(firstIsInsideTheChangeSet, "A", LONG_CHANGE_SET))), + settings().polling(POLL).withoutRenewal()); + MigrationRunner second = runnerOver(testRegistry( + step("001", "long", () -> events.add("B:long:start"))), settings().polling(POLL)); + Future firstRun = threads.submit(first::migrate); + assertThat(firstIsInsideTheChangeSet.await(LATCH_SECONDS, TimeUnit.SECONDS)).isTrue(); + Future secondRun = threads.submit(second::migrate); + + MigrationRunner.Outcome b = secondRun.get(LATCH_SECONDS, TimeUnit.SECONDS); + Throwable firstFailure = org.junit.jupiter.api.Assertions.assertThrows(ExecutionException.class, + () -> firstRun.get(LATCH_SECONDS, TimeUnit.SECONDS)).getCause(); + + log.info("{}events {}, first failed with {}", TAG, events, firstFailure.toString()); + assertThat(b.executedIds()).as("without renewal the lease ran out and the second runner entered") + .containsExactly("long"); + assertThat(events.indexOf("B:long:start")).as("B started while A was still inside its change set") + .isGreaterThan(events.indexOf("A:long:start")).isLessThan(events.indexOf("A:long:end")); + assertThat(firstFailure).as("the first runner finds the lock gone and does not record its change set") + .isInstanceOf(MigrationLockLostException.class); + assertThat(db.historyEntriesOf("long")).as("only the runner that held the lock wrote history").hasSize(1); + } + + @Test + void lockTakenAwayDuringAChangeSet_writesNoEntryForIt_startsNothingElse_andFailsTheStart() { + MigrationRunner runner = runnerOver(testRegistry( + step("001", "one", () -> events.add("one")), + step("002", "two", () -> { + events.add("two"); + db.lock().updateOne(Filters.eq(MigrationLock.ID, MigrationLock.LOCK_ID), + Updates.combine(Updates.set(MigrationLock.OWNER, "thief"), Updates.inc(MigrationLock.GENERATION, 1))); + }), + step("003", "three", () -> events.add("three"))), settings()); + + assertThatThrownBy(runner::migrate).as("a lost lock fails the start") + .isInstanceOf(MigrationLockLostException.class); + + assertThat(events).as("the change set after the one that lost the lock never starts").containsExactly("one", "two"); + assertThat(db.historyEntries()).as("no entry for the change set that was running, none for the next") + .extracting(d -> d.getString(MigrationHistory.CHANGE_ID)).containsExactly("one"); + Document lock = db.lock().find().first(); + assertThat(lock).as("the thief's lock is left alone by the release").isNotNull(); + assertThat(lock.getString(MigrationLock.OWNER)).isEqualTo("thief"); + } + + @Test + void lockTakenAwayDuringAFailingChangeSet_writesNoFailedEntry() { + MigrationRunner runner = runnerOver(testRegistry( + step("001", "one", () -> { + db.lock().updateOne(Filters.eq(MigrationLock.ID, MigrationLock.LOCK_ID), + Updates.combine(Updates.set(MigrationLock.OWNER, "thief"), Updates.inc(MigrationLock.GENERATION, 1))); + throw new IllegalStateException("fails after losing the lock"); + })), settings()); + + assertThatThrownBy(runner::migrate).isInstanceOfSatisfying(MigrationLockLostException.class, + e -> assertThat(e.getSuppressed()).as("the change set's own failure is kept").hasSize(1)); + + assertThat(db.historyEntries()).as("no history write after the lock was lost").isEmpty(); + } + + @Test + void lockHeldByAnotherInstance_failsTheStartAfterTheMaximumWait_withoutRunningAnything() { + db.lock().insertOne(new Document(MigrationLock.ID, MigrationLock.LOCK_ID).append(MigrationLock.OWNER, "other") + .append(MigrationLock.GENERATION, 5L) + .append(MigrationLock.EXPIRES_AT, new java.util.Date(System.currentTimeMillis() + Duration.ofHours(1).toMillis()))); + MigrationRunner runner = runnerOver(testRegistry(step("001", "one", () -> events.add("one"))), + MigrationLockSettings.of(LEASE, SHORT_WAIT).polling(POLL)); + + assertThatThrownBy(runner::migrate).isInstanceOf(MigrationLockTimeoutException.class); + + assertThat(events).isEmpty(); + assertThat(db.historyEntries()).isEmpty(); + assertThat(db.lock().find().first().getString(MigrationLock.OWNER)).as("the other holder's lock is untouched") + .isEqualTo("other"); + } + + @Test + void expiredLock_isTakenOver_withARaisedGeneration() { + db.lock().insertOne(new Document(MigrationLock.ID, MigrationLock.LOCK_ID).append(MigrationLock.OWNER, "gone") + .append(MigrationLock.GENERATION, 7L) + .append(MigrationLock.EXPIRES_AT, new java.util.Date(System.currentTimeMillis() - Duration.ofHours(1).toMillis()))); + Long[] generation = new Long[1]; + runnerOver(testRegistry(step("001", "one", + () -> generation[0] = db.lock().find().first().getLong(MigrationLock.GENERATION))), settings()).migrate(); + + assertThat(generation[0]).as("generation while held after taking over an expired lock").isEqualTo(8L); + assertThat(db.lock().countDocuments()).isZero(); + } + + @Test + void historyWriteFailingAfterAChangeSetFailure_keepsTheChangeSetFailureAsSuppressed() { + MigrationHistory history = spy(new MigrationHistory(db.template)); + IllegalStateException failure = new IllegalStateException("change set failure"); + doThrow(new MigrationHistoryException("history is down", new MongoException("down"))) + .when(history).recordFailed(any(), any(), any(), anyLong(), any()); + MigrationRunner runner = new MigrationRunner(testRegistry(step("001", "one", () -> { + throw failure; + })), history, new MigrationLock(db.template, settings())); + + assertThatThrownBy(runner::migrate).isInstanceOfSatisfying(MigrationHistoryException.class, + e -> assertThat(e.getSuppressed()).as("the change set's failure is not lost").containsExactly(failure)); + + assertThat(db.lock().countDocuments()).as("the lock is released after a failed history write").isZero(); + } + + @Test + void historyWriteFailingAfterASuccessfulChangeSet_failsTheStartWithoutAnEntry() { + MigrationHistory history = spy(new MigrationHistory(db.template)); + doThrow(new MigrationHistoryException("history is down", new MongoException("down"))) + .when(history).recordExecuted(any(), any(), any(), anyLong()); + MigrationRunner runner = new MigrationRunner(testRegistry( + step("001", "one", () -> events.add("one")), step("002", "two", () -> events.add("two"))), + history, new MigrationLock(db.template, settings())); + + assertThatThrownBy(runner::migrate).isInstanceOf(MigrationHistoryException.class); + + assertThat(events).as("nothing runs after a change set that could not be recorded").containsExactly("one"); + assertThat(db.historyEntries()).isEmpty(); + } + + // ---------------------------------------------------------------- helpers + + private MigrationRunner runnerOver(MigrationRegistry registry, MigrationLockSettings settings) { + return new MigrationRunner(registry, new MigrationHistory(db.template), new MigrationLock(db.template, settings)); + } + + private static MigrationLockSettings settings() { + return MigrationLockSettings.of(LEASE, LONG_WAIT).polling(POLL); + } + + /** The production ids, authors and order, each body only recording {@code prefix + id} in {@link #events}. */ + private MigrationRegistry productionRegistryCounting(String prefix) { + MigrationRegistry production = DatabaseChangelogRegistry.create(new DatabaseChangelog(), db.template, + mock(CommonConfig.class), mock(MigrateAuthConfigJob.class), mock(CompleteAuthType.class), + mock(AddSuperAdminUser.class), mock(AddPtmFieldsJob.class)); + return new MigrationRegistry(production.steps().stream() + .map(step -> step.withBody(() -> events.add(prefix + step.id()))).toList()); + } + + private static MigrationRegistry testRegistry(MigrationStep... steps) { + return new MigrationRegistry(List.of(steps)); + } + + private static MigrationStep step(String order, String id, Runnable body) { + return new MigrationStep(order, id, "", TEST_CHANGE_LOG_CLASS, "method" + id, body); + } + + private void slow(String event) { + events.add(event); + sleep(Duration.ofMillis(150)); + } + + private void holdFor(CountDownLatch inside, String runner, Duration time) { + events.add(runner + ":long:start"); + inside.countDown(); + sleep(time); + events.add(runner + ":long:end"); + } + + private static void sleep(Duration time) { + try { + Thread.sleep(time.toMillis()); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new IllegalStateException("interrupted inside a test change set", e); + } + } +} diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationTestDatabase.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationTestDatabase.java new file mode 100644 index 000000000..7914f5b84 --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/MigrationTestDatabase.java @@ -0,0 +1,89 @@ +package org.lowcoder.runner.migrations; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UncheckedIOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import org.bson.Document; +import org.lowcoder.api.common.TestContainers; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory; + +import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoClients; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.model.Sorts; + +/** + * A database of its own on the module's MongoDB test container ({@link TestContainers#mongoUri}) with a blocking + * {@link MongoTemplate} over it, dropped on {@link #close()}. The runner tests use it instead of a Spring context, so each + * test controls the history and the lock collections completely. + */ +final class MigrationTestDatabase implements AutoCloseable { + + /** The history Mongock 5.4.0 wrote for the 29 change sets and its own system change, on an empty database. */ + static final String MONGOCK_HISTORY_FIXTURE = "/migrations/mongock-5.4.0-history.jsonl"; + static final String MONGOCK_SYSTEM_CHANGE_PREFIX = "system-change-"; + + private static final String DATABASE_PREFIX = "migration_runner_"; + + final String name = DATABASE_PREFIX + UUID.randomUUID().toString().replace("-", ""); + final MongoClient client = MongoClients.create(TestContainers.mongoUri(name)); + final MongoTemplate template = new MongoTemplate(new SimpleMongoClientDatabaseFactory(client, name)); + + MongoCollection history() { + return template.getCollection(MigrationHistory.COLLECTION); + } + + MongoCollection lock() { + return template.getCollection(MigrationLock.COLLECTION); + } + + /** All history documents in insertion order. */ + List historyEntries() { + return history().find().sort(Sorts.ascending("_id")).into(new ArrayList<>()); + } + + List historyEntriesOf(String changeId) { + return historyEntries().stream().filter(d -> changeId.equals(d.getString(MigrationHistory.CHANGE_ID))).toList(); + } + + /** The documents of the Mongock fixture, parsed from its extended JSON, in the order Mongock wrote them. */ + static List mongockFixture() { + try (InputStream in = MigrationTestDatabase.class.getResourceAsStream(MONGOCK_HISTORY_FIXTURE)) { + if (in == null) { + throw new IllegalStateException("test resource missing: " + MONGOCK_HISTORY_FIXTURE); + } + BufferedReader reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)); + List documents = new ArrayList<>(); + for (String line = reader.readLine(); line != null; line = reader.readLine()) { + documents.add(Document.parse(line)); + } + return documents; + } catch (IOException e) { + throw new UncheckedIOException("cannot read " + MONGOCK_HISTORY_FIXTURE, e); + } + } + + /** The fixture entries of the 29 change sets, without Mongock's own system change. */ + static List mongockChangeSetEntries() { + return mongockFixture().stream() + .filter(d -> !d.getString(MigrationHistory.CHANGE_ID).startsWith(MONGOCK_SYSTEM_CHANGE_PREFIX)) + .toList(); + } + + @Override + public void close() { + try { + client.getDatabase(name).drop(); + } finally { + client.close(); + } + } +} diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/job/EmailNormalizationBackfillTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/job/EmailNormalizationBackfillTest.java index bfcf8c2f8..f6e8751c5 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/job/EmailNormalizationBackfillTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/job/EmailNormalizationBackfillTest.java @@ -32,8 +32,8 @@ /** * Drives {@link EmailNormalizationBackfill} directly against the MongoDB test container. * - *

The changeset itself is never driven through Mongock here. Under {@code @ActiveProfiles("test")}, - * {@code DatabaseChangelog} is {@code @Profile("!test")} and Mongock skips it — which also means the real + *

The changeset itself is never driven through the migration runner here. Under {@code @ActiveProfiles("test")}, + * the migration runner is {@code @Profile("!test")} and does not run it — which also means the real * {@code (connections.source, connections.rawId)} unique sparse index does not exist in this context, so * each test builds it on its own throwaway collection. That is a gift rather than a nuisance: it makes the * duplicate-key path testable in isolation, which it would not be against the shared {@code user} @@ -416,11 +416,11 @@ public void normalizesTwoCaseVariantConnectionsInsideOneDocument() { /** * The survey is not atomic with the backfill, and on this codebase that window is not theoretical: * {@code AddSuperAdminRunner} writes the super-admin from a {@code @PostConstruct} ending in a bare - * {@code subscribe()}, so it is unordered against Mongock on every boot, and other replicas keep + * {@code subscribe()}, so it is unordered against the migration runner on every boot, and other replicas keep * serving registrations throughout. * *

Simulated by surveying, then letting someone take the target key, then backfilling. The run must - * absorb the duplicate key and report it — if it threw, Mongock would record the changeset FAILED and + * absorb the duplicate key and report it — if it threw, the runner would record the changeset FAILED and * the application would not start, which on a replicated deployment is a boot loop on exactly the * installs that most need the migration. */ @@ -542,7 +542,7 @@ public void ensureLookupIndexesBuildsBothAndIsRerunnable() { /** * {@code @ActiveProfiles} replaces the active profiles rather than adding to them, so the eight test * classes that name their own profile do not have {@code test} active, {@code @Profile("!test")} - * matches, and Mongock really does run this changeset at their context startup — against a database + * matches, and the migration runner really does run this changeset at their context startup — against a database * their fixtures have not populated yet. */ @Test diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/job/MigrationJobAddSuperAdminTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/job/MigrationJobAddSuperAdminTest.java index 29bf8fe60..947899026 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/job/MigrationJobAddSuperAdminTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/runner/migrations/job/MigrationJobAddSuperAdminTest.java @@ -235,7 +235,7 @@ public void theChangesetReturnsOnlyAfterThePendingStepAndTheLaterStepsBF037() th /** * BF-037 fixed (part 2): a step that failed after the changeset had returned went to Reactor's dropped-error hook and the - * later steps never ran. Now the changeset fails with it, so Mongock does not record it; nothing is dropped. + * later steps never ran. Now the changeset fails with it, so the migration runner records it as FAILED, not EXECUTED; nothing is dropped. */ @Test public void aStepThatFailsWhilePendingFailsTheChangesetAndStopsTheLaterStepsBF037() throws Exception { diff --git a/server/api-service/lowcoder-server/src/test/resources/migrations/mongock-5.4.0-history.jsonl b/server/api-service/lowcoder-server/src/test/resources/migrations/mongock-5.4.0-history.jsonl new file mode 100644 index 000000000..d2bd9bfc3 --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/resources/migrations/mongock-5.4.0-history.jsonl @@ -0,0 +1,31 @@ +{"_id":{"$oid":"6b00151676e31cf9a7dd1b55"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"system-change-00001_before","author":"mongock","timestamp":{"$date":"2026-11-20T09:38:30.641Z"},"state":"EXECUTED","type":"BEFORE_EXECUTION","changeLogClass":"io.mongock.runner.core.executor.system.changes.SystemChangeUnit00001","changeSetMethod":"beforeExecution","metadata":null,"executionMillis":1,"executionHostname":"fixture-host","errorTrace":null,"systemChange":true} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b58"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"system-change-00001","author":"mongock","timestamp":{"$date":"2026-11-20T09:38:30.648Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"io.mongock.runner.core.executor.system.changes.SystemChangeUnit00001","changeSetMethod":"execution","metadata":null,"executionMillis":2,"executionHostname":"fixture-host","errorTrace":null,"systemChange":true} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b70"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"init-indexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.818Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addInitialIndexes","metadata":null,"executionMillis":132,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b73"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-organization-indexes-v2","author":"","timestamp":{"$date":"2026-11-20T09:38:30.827Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addOrganizationIndexes","metadata":null,"executionMillis":7,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b77"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-serverlog-indexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.839Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addServerLogIndexes","metadata":null,"executionMillis":11,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b7a"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-token-based-connection-indexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.851Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addDatasourceConnectionIndexes","metadata":null,"executionMillis":10,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b7d"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-org-domain-indexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.861Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addOrgDomainIndexes","metadata":null,"executionMillis":8,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b80"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"generate-deployment-id","author":"","timestamp":{"$date":"2026-11-20T09:38:30.870Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"generateInstanceId","metadata":null,"executionMillis":7,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b83"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-group-type-indexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.881Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addGroupTypeIndex","metadata":null,"executionMillis":9,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b87"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-event-log-indexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.897Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addEventLogIndex","metadata":null,"executionMillis":14,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b8b"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-library-query-indexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.915Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addLibraryQueryIndex","metadata":null,"executionMillis":16,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b8f"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"update-datasource-idnexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.923Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"updateDatasourceIndex","metadata":null,"executionMillis":6,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b92"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-material-meta-indexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.937Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addMaterialMetaIndex","metadata":null,"executionMillis":12,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b95"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-bi-relation-indexes","author":"","timestamp":{"$date":"2026-11-20T09:38:30.948Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addBiRelationIndex","metadata":null,"executionMillis":9,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b99"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"update-user-connections-index","author":"","timestamp":{"$date":"2026-11-20T09:38:30.962Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"updateUserConnectionsIndex","metadata":null,"executionMillis":12,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b9c"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"migrate-auth-configs","author":"","timestamp":{"$date":"2026-11-20T09:38:30.969Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"migrateAuthConfigs","metadata":null,"executionMillis":5,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1b9f"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"complete-auth-type","author":"","timestamp":{"$date":"2026-11-20T09:38:30.974Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"completeAuthType","metadata":null,"executionMillis":3,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151676e31cf9a7dd1ba2"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-org-id-index-on-server-log","author":"","timestamp":{"$date":"2026-11-20T09:38:30.981Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addOrgIdIndexOnServerLog","metadata":null,"executionMillis":6,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1baf"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-super-admin-user","author":"","timestamp":{"$date":"2026-11-20T09:38:31.089Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addSuperAdminUser","metadata":null,"executionMillis":107,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1bb2"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-ptm-fields-to-applications","author":"","timestamp":{"$date":"2026-11-20T09:38:31.095Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addPtmFieldsToApplicatgions","metadata":null,"executionMillis":4,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1bb8"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-gid","author":"","timestamp":{"$date":"2026-11-20T09:38:31.112Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addGidToDBObjects","metadata":null,"executionMillis":16,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1bbc"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-email","author":"","timestamp":{"$date":"2026-11-20T09:38:31.127Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addEmailField","metadata":null,"executionMillis":6,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1bbf"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"fill-create-at","author":"","timestamp":{"$date":"2026-11-20T09:38:31.131Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"fillCreateAt","metadata":null,"executionMillis":2,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1bd5"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-gid-indexes-unique","author":"","timestamp":{"$date":"2026-11-20T09:38:31.178Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addGidIndexesUnique","metadata":null,"executionMillis":46,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1bde"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-time-series-snapshot-history","author":"","timestamp":{"$date":"2026-11-20T09:38:31.228Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addTimeSeriesSnapshotHistory","metadata":null,"executionMillis":48,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1be1"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"populate-email-in-user-connections","author":"Thomas","timestamp":{"$date":"2026-11-20T09:38:31.233Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"populateEmailInUserConnections","metadata":null,"executionMillis":3,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1be4"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"published-to-record","author":"Thomas","timestamp":{"$date":"2026-11-20T09:38:31.237Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"publishedToRecord","metadata":null,"executionMillis":3,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1be9"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"add-tag-index-to-record","author":"Thomas","timestamp":{"$date":"2026-11-20T09:38:31.251Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"addTagIndexToRecord","metadata":null,"executionMillis":12,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1bec"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"rename-application-record-collection","author":"Thomas","timestamp":{"$date":"2026-11-20T09:38:31.255Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"renameApplicationRecordCollection","metadata":null,"executionMillis":2,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1bef"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"delete-old-super-admin","author":"Thomas","timestamp":{"$date":"2026-11-20T09:38:31.259Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"deleteOldSuperAdmin","metadata":null,"executionMillis":3,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} +{"_id":{"$oid":"6b00151776e31cf9a7dd1bf8"},"executionId":"2026-11-20T10:38:29.933992304-386","changeId":"normalize-email-backfill","author":"","timestamp":{"$date":"2026-11-20T09:38:31.285Z"},"state":"EXECUTED","type":"EXECUTION","changeLogClass":"org.lowcoder.runner.migrations.DatabaseChangelog","changeSetMethod":"normalizeEmailBackfill","metadata":null,"executionMillis":24,"executionHostname":"fixture-host","errorTrace":null,"systemChange":false} From 045b8660f8b1ec4d08276bce81135574af34842b Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Fri, 20 Nov 2026 13:11:22 +0100 Subject: [PATCH 07/40] build: upgrade Spring Boot from 3.5.16 to 4.1.2 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 --- .../api-service/lowcoder-dependencies/pom.xml | 69 +---- server/api-service/lowcoder-domain/pom.xml | 2 +- .../plugin/client/DatasourcePluginClient.java | 6 +- .../asset/service/AssetServiceImplTest.java | 4 +- .../org/lowcoder/infra/util/NetworkUtils.java | 5 +- .../plugin/graphql/GraphQLExecutor.java | 91 ++++--- .../graphql/GraphQLConnectionFailureTest.java | 40 +++ .../mongo/MongoEngineContainerTest.java | 7 +- .../plugin/restapi/RestApiExecutor.java | 9 +- server/api-service/lowcoder-sdk/pom.xml | 6 + .../sdk/models/QueryExecutionResult.java | 13 +- .../sdk/plugin/http/RawHttpHandlerHelper.java | 9 +- .../org/lowcoder/sdk/util/HttpHeaderMaps.java | 32 +++ .../sdk/webclient/Jackson2ClientCodecs.java | 35 +++ .../sdk/webclient/WebClientBuildHelper.java | 7 +- .../sdk/webclient/WebClientRedirects.java | 2 +- .../lowcoder/sdk/webclient/WebClients.java | 12 - .../lowcoder/sdk/contract/ClientCodecs.java | 23 +- .../QueryExecutionResultHttpCodeTest.java | 41 +++ .../lowcoder/sdk/util/HttpHeaderMapsTest.java | 63 +++++ .../sdk/webclient/WebClientRedirectsTest.java | 2 +- server/api-service/lowcoder-server/pom.xml | 19 +- .../ApplicationHistorySnapshotController.java | 16 +- .../marketplace/MarketplaceRenderClient.java | 12 +- .../request/oauth2/request/GithubRequest.java | 255 +++++++++--------- .../ApplicationConfiguration.java | 21 +- .../CustomErrorWebExceptionHandler.java | 10 +- .../api/framework/filter/ApiEventFilter.java | 4 +- .../framework/filter/GlobalContextFilter.java | 4 +- .../plugin/data/PluginServerRequest.java | 3 +- .../endpoint/PluginEndpointHandlerImpl.java | 6 +- .../security/PluginAuthorizationManager.java | 3 +- .../api/misc/JsLibraryController.java | 6 +- .../src/main/resources/application-debug.yaml | 6 +- .../src/main/resources/application.yaml | 10 +- .../MarketplaceRenderContractTest.java | 2 +- .../BundleEndpointsIntegrationTest.java | 4 - .../api/common/TestContainersInitializer.java | 4 +- .../configurations/SecurityTestConfig.java | 2 +- .../api/contract/ClientCodecGuardTest.java | 22 +- .../ApiFlowEndpointsContractTest.java | 3 +- ...nHistorySnapshotEndpointsContractTest.java | 8 +- .../endpoint/AssetEndpointsContractTest.java | 4 +- .../contract/support/ContractTestClient.java | 9 +- .../api/contract/support/StoredValues.java | 9 +- .../CustomErrorWebExceptionHandlerTest.java | 5 +- .../exception/GlobalExceptionHandlerTest.java | 2 +- .../filter/RefererFilterChainTest.java | 5 +- .../PluginAuthorizationManagerTest.java | 16 +- .../EnterpriseLicenseControllerTest.java | 14 +- .../WorkspaceSeatSyncServiceTest.java | 5 +- .../infra/InfraMongoTestConfiguration.java | 10 +- .../mongo/MongoBigNumberStorageTest.java | 56 ++++ .../boundary-sites/json-boundary-sites.tsv | 97 +++---- .../json-contract/contract-registry.tsv | 56 ++-- 55 files changed, 727 insertions(+), 459 deletions(-) create mode 100644 server/api-service/lowcoder-plugins/graphqlPlugin/src/test/java/org/lowcoder/plugin/graphql/GraphQLConnectionFailureTest.java create mode 100644 server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/HttpHeaderMaps.java create mode 100644 server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java delete mode 100644 server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClients.java create mode 100644 server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/models/QueryExecutionResultHttpCodeTest.java create mode 100644 server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/HttpHeaderMapsTest.java create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/infra/mongo/MongoBigNumberStorageTest.java diff --git a/server/api-service/lowcoder-dependencies/pom.xml b/server/api-service/lowcoder-dependencies/pom.xml index b0a69b6e4..61f3ff43b 100644 --- a/server/api-service/lowcoder-dependencies/pom.xml +++ b/server/api-service/lowcoder-dependencies/pom.xml @@ -13,28 +13,12 @@ lowcoder-dependencies pom - - 2.0.5 - - - - - org.testcontainers - testcontainers-bom - ${testcontainers.version} - pom - import - org.springframework.boot spring-boot-dependencies - 3.5.16 + 4.1.2 pom import @@ -81,7 +65,7 @@ jakarta.el jakarta.el-api - 5.0.1 + 6.0.1 org.eclipse.jgit @@ -89,12 +73,6 @@ 6.9.0.202403050737-r - - jakarta.persistence - jakarta.persistence-api - 3.1.0 - - org.apache.commons commons-collections4 @@ -111,22 +89,6 @@ rjson 1.3.1-SNAPSHOT - - org.jetbrains.kotlin - kotlin-stdlib-jdk7 - 1.9.23 - - - - com.jayway.jsonpath - json-path - 2.9.0 - - - com.github.ben-manes.caffeine - caffeine - 3.1.8 - es.moki.ratelimitj ratelimitj-core @@ -173,8 +135,8 @@ io.sentry - sentry-spring-boot-starter-jakarta - 7.6.0 + sentry-spring-boot-4 + 8.65.0 @@ -183,16 +145,6 @@ 1.5.2 - - jakarta.xml.bind - jakarta.xml.bind-api - 4.0.2 - - - jakarta.activation - jakarta.activation-api - 2.1.3 - @@ -208,26 +160,15 @@ 1.0.19.RELEASE - - jakarta.servlet - jakarta.servlet-api - 6.0.0 - - org.apache.httpcomponents httpclient 4.5.14 - - jakarta.validation - jakarta.validation-api - 3.0.2 - org.springdoc springdoc-openapi-starter-webflux-ui - 2.10.0 + 3.2.0 diff --git a/server/api-service/lowcoder-domain/pom.xml b/server/api-service/lowcoder-domain/pom.xml index 000053ca9..b81a9afd5 100644 --- a/server/api-service/lowcoder-domain/pom.xml +++ b/server/api-service/lowcoder-domain/pom.xml @@ -160,7 +160,7 @@ io.sentry - sentry-spring-boot-starter-jakarta + sentry-spring-boot-4 diff --git a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java index aba0cacc0..b04e60e40 100644 --- a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java +++ b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java @@ -19,6 +19,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.stereotype.Component; +import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; import org.springframework.web.reactive.function.client.ExchangeStrategies; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; @@ -41,7 +42,10 @@ public class DatasourcePluginClient implements NodeServerClient { private static final ExchangeStrategies EXCHANGE_STRATEGIES = ExchangeStrategies .builder() - .codecs(configurer -> configurer.defaultCodecs().maxInMemorySize(-1)) + .codecs(configurer -> { + Jackson2ClientCodecs.apply(configurer); + configurer.defaultCodecs().maxInMemorySize(-1); + }) .build(); private static final WebClient WEB_CLIENT = WebClient.builder() diff --git a/server/api-service/lowcoder-domain/src/test/java/org/lowcoder/domain/asset/service/AssetServiceImplTest.java b/server/api-service/lowcoder-domain/src/test/java/org/lowcoder/domain/asset/service/AssetServiceImplTest.java index 44c689f02..1e8c4c855 100644 --- a/server/api-service/lowcoder-domain/src/test/java/org/lowcoder/domain/asset/service/AssetServiceImplTest.java +++ b/server/api-service/lowcoder-domain/src/test/java/org/lowcoder/domain/asset/service/AssetServiceImplTest.java @@ -395,7 +395,7 @@ void anAssetWithoutContentTypeIsServedWithoutAContentTypeHeader() { StepVerifier.create(service.makeImageResponse(exchange, ASSET_ID)).verifyComplete(); - assertThat(exchange.getResponse().getHeaders().containsKey(HttpHeaders.CONTENT_TYPE)).isFalse(); + assertThat(exchange.getResponse().getHeaders().containsHeader(HttpHeaders.CONTENT_TYPE)).isFalse(); assertThat(exchange.getResponse().getBodyAsString().block(TIMEOUT)).isEqualTo("x"); } @@ -415,7 +415,7 @@ void anUnknownAssetIsCompletedAsA404WithNoBodyBF129() { + " committed=" + exchange.getResponse().isCommitted()); assertThat(exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); assertThat(exchange.getResponse().isCommitted()).isTrue(); - assertThat(exchange.getResponse().getHeaders().containsKey(HttpHeaders.CONTENT_TYPE)).isFalse(); + assertThat(exchange.getResponse().getHeaders().containsHeader(HttpHeaders.CONTENT_TYPE)).isFalse(); assertThat(exchange.getResponse().getBodyAsString().block(TIMEOUT)).isEmpty(); } } diff --git a/server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java b/server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java index d912f0852..39ca6e510 100644 --- a/server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java +++ b/server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java @@ -2,6 +2,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import org.lowcoder.sdk.util.HttpHeaderMaps; import org.lowcoder.sdk.util.JsonUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.server.reactive.ServerHttpRequest; @@ -23,14 +24,14 @@ public static String getRemoteIp(ServerWebExchange serverWebExchange) { /** Try to find remote id in headers **/ String foundHeader; for (String header : CLIENT_IP_HEADERS) { - foundHeader = getMatchingKey(header, headers.keySet()); + foundHeader = getMatchingKey(header, headers.headerNames()); if (foundHeader != null) { log.debug("Found client IP in header: {}", foundHeader); return headers.getFirst(foundHeader); } } - log.debug("get remote ip from remoteAddress , header {}", JsonUtils.toJson(headers)); + log.debug("get remote ip from remoteAddress , header {}", JsonUtils.toJson(HttpHeaderMaps.copyOf(headers))); return Optional.ofNullable(serverWebExchange.getRequest().getRemoteAddress()) .map(InetSocketAddress::getAddress) .map(InetAddress::getHostAddress) diff --git a/server/api-service/lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java b/server/api-service/lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java index 1ba1886a7..f1763499f 100644 --- a/server/api-service/lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java +++ b/server/api-service/lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java @@ -28,9 +28,11 @@ import org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType; import org.lowcoder.sdk.query.QueryVisitorContext; import org.lowcoder.sdk.util.CookieForwarding; +import org.lowcoder.sdk.util.HttpHeaderMaps; import org.lowcoder.sdk.util.JsonUtils; import org.lowcoder.sdk.util.MoreMapUtils; import org.lowcoder.sdk.util.MustacheHelper; +import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; import org.lowcoder.sdk.webclient.WebClientBuildHelper; import org.lowcoder.sdk.webclient.WebClientRedirects; import org.pf4j.Extension; @@ -39,7 +41,6 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.reactive.function.BodyInserter; import org.springframework.web.reactive.function.BodyInserters; -import org.springframework.web.reactive.function.client.ClientResponse; import org.springframework.web.reactive.function.client.ExchangeStrategies; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; @@ -53,6 +54,7 @@ import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Consumer; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -87,7 +89,10 @@ public class GraphQLExecutor implements QueryExecutor configurer.defaultCodecs().maxInMemorySize(10 * 1024 * 1024)) + .codecs(configurer -> { + Jackson2ClientCodecs.apply(configurer); + configurer.defaultCodecs().maxInMemorySize(10 * 1024 * 1024); + }) .build(); private final Scheduler scheduler = QueryExecutionUtils.querySharedScheduler(); private final DataUtils dataUtils = DataUtils.getInstance(); @@ -278,7 +283,6 @@ public Mono executeQuery(Object o, GraphQLQueryExecutionCo context.getQueryBody(), context.getBodyParams()); return httpCall(client, context.getHttpMethod(), uri, bodyInserter, 0, authConfig, DEFAULT_HEADERS_CONSUMER, false) - .flatMap(clientResponse -> clientResponse.toEntity(byte[].class)) .map(this::convertToQueryExecutionResult) .onErrorResume(error -> { if (error instanceof TimeoutException) { @@ -309,7 +313,7 @@ private Consumer> injectCookies(GraphQLQueryExecut * Limits: the flag is not kept per URI, so a redirect back to an answered URI is answered again (within MAX_REDIRECTS); * a challenge with {@code stale=true} (an expired nonce, right credentials) is not answered a second time; it gets the 401. */ - private Mono httpCall(WebClient webClient, HttpMethod httpMethod, + private Mono> httpCall(WebClient webClient, HttpMethod httpMethod, URI uri, BodyInserter requestBody, int iteration, @@ -320,44 +324,49 @@ private Mono httpCall(WebClient webClient, HttpMethod httpMethod return Mono.error(new PluginException(QUERY_EXECUTION_ERROR, "REACH_REDIRECT_LIMIT", MAX_REDIRECTS)); } - return webClient - .method(httpMethod) - .uri(uri) - .headers(headersConsumer) - .body(requestBody) - .exchange() - .onErrorMap(e -> new PluginException(QUERY_EXECUTION_ERROR, "QUERY_EXECUTION_ERROR", e.getMessage())) - .flatMap(response -> { - String redirectUrl = WebClientRedirects.redirectLocation(response); // BF-113: null for a 3xx without a Location - if (redirectUrl != null) { - URI redirectUri; - try { - redirectUri = WebClientRedirects.resolveLocation(uri, redirectUrl); - } catch (URISyntaxException e) { - return Mono.error(new PluginException(QUERY_EXECUTION_ERROR, "QUERY_EXECUTION_ERROR", - e.getMessage())); + // Only a failure before the response arrives is wrapped; what follows (a redirect, a digest answer, reading the + // body) reports its own error, as the nested call has already wrapped its own. + return Mono.defer(() -> { + AtomicBoolean responseReceived = new AtomicBoolean(); + return webClient + .method(httpMethod) + .uri(uri) + .headers(headersConsumer) + .body(requestBody) + .exchangeToMono(response -> { + responseReceived.set(true); + String redirectUrl = WebClientRedirects.redirectLocation(response); // BF-113: null for a 3xx without a Location + if (redirectUrl != null) { + URI redirectUri; + try { + redirectUri = WebClientRedirects.resolveLocation(uri, redirectUrl); + } catch (URISyntaxException e) { + return Mono.>error(new PluginException(QUERY_EXECUTION_ERROR, + "QUERY_EXECUTION_ERROR", e.getMessage())); + } + if (WebClientRedirects.isSameOrigin(uri, redirectUri)) { + return httpCall(webClient, httpMethod, redirectUri, requestBody, iteration + 1, authConfig, headersConsumer, false); + } + // another origin: only content headers, no forwarded cookies, no digest answer + return httpCall(WebClientRedirects.forAnotherOrigin(webClient), httpMethod, redirectUri, requestBody, + iteration + 1, null, DEFAULT_HEADERS_CONSUMER, false); } - if (WebClientRedirects.isSameOrigin(uri, redirectUri)) { - return httpCall(webClient, httpMethod, redirectUri, requestBody, iteration + 1, authConfig, headersConsumer, false); + //digest auth + if (!digestAnswered && authConfig != null && authConfig.getType() == DIGEST_AUTH && AuthHelper.shouldDigestAuth(response)) { + try { + return httpCall(webClient, httpMethod, uri, requestBody, iteration + 1, authConfig, + headersConsumer.andThen( + AuthHelper.digestAuth((BasicAuthConfig) authConfig, response, httpMethod, uri.getPath())), true); + } catch (ParseException e) { + return Mono.>error(new PluginException(QUERY_EXECUTION_ERROR, + "QUERY_EXECUTION_ERROR", e.getMessage())); + } } - // another origin: only content headers, no forwarded cookies, no digest answer - return httpCall(WebClientRedirects.forAnotherOrigin(webClient), httpMethod, redirectUri, requestBody, - iteration + 1, null, DEFAULT_HEADERS_CONSUMER, false); - } - //digest auth - if (!digestAnswered && authConfig != null && authConfig.getType() == DIGEST_AUTH && AuthHelper.shouldDigestAuth(response)) { - try { - return httpCall(webClient, httpMethod, uri, requestBody, iteration + 1, authConfig, - headersConsumer.andThen( - AuthHelper.digestAuth((BasicAuthConfig) authConfig, response, httpMethod, uri.getPath())), true); - } catch (ParseException e) { - return Mono.error(new PluginException(QUERY_EXECUTION_ERROR, "QUERY_EXECUTION_ERROR", - e.getMessage())); - } - } - return Mono.just(response); - }) - .subscribeOn(scheduler); + return response.toEntity(byte[].class); + }) + .onErrorMap(e -> !responseReceived.get(), + e -> new PluginException(QUERY_EXECUTION_ERROR, "QUERY_EXECUTION_ERROR", e.getMessage())); + }).subscribeOn(scheduler); } private QueryExecutionResult convertToQueryExecutionResult(ResponseEntity stringResponseEntity) { @@ -383,7 +392,7 @@ private JsonNode parseExecuteResultHeaders(HttpHeaders headers) { // Convert the headers into json tree to store in the results String headerInJsonString; try { - headerInJsonString = toJsonThrows(headers); + headerInJsonString = toJsonThrows(HttpHeaderMaps.copyOf(headers)); } catch (JsonProcessingException e) { throw new PluginException(QUERY_EXECUTION_ERROR, "QUERY_EXECUTION_ERROR", e.getMessage()); } diff --git a/server/api-service/lowcoder-plugins/graphqlPlugin/src/test/java/org/lowcoder/plugin/graphql/GraphQLConnectionFailureTest.java b/server/api-service/lowcoder-plugins/graphqlPlugin/src/test/java/org/lowcoder/plugin/graphql/GraphQLConnectionFailureTest.java new file mode 100644 index 000000000..2bd910d3e --- /dev/null +++ b/server/api-service/lowcoder-plugins/graphqlPlugin/src/test/java/org/lowcoder/plugin/graphql/GraphQLConnectionFailureTest.java @@ -0,0 +1,40 @@ +package org.lowcoder.plugin.graphql; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Map; + +import org.junit.jupiter.api.Test; +import org.lowcoder.sdk.contract.RecordingHttpServer; +import org.lowcoder.sdk.exception.PluginException; +import org.lowcoder.sdk.plugin.graphql.GraphQLDatasourceConfig; + +/** + * A request that fails before any answer arrives (the connection is refused) is reported as a {@link PluginException} + * with the message key {@code QUERY_EXECUTION_ERROR} and the cause's text, which {@code executeQuery} rethrows as it is. + * An error after an answer (an unreadable body) is not wrapped: {@code GraphQLUnreadableAnswerTest} pins that case. + */ +class GraphQLConnectionFailureTest { + + private static final String PATH = "/graphql"; + private static final String QUERY_EXECUTION_ERROR_KEY = "QUERY_EXECUTION_ERROR"; + + private final GraphQLCallSupport support = new GraphQLCallSupport(); + + @Test + void aRefusedConnectionIsAQueryExecutionPluginException() { + String closedUrl; + try (RecordingHttpServer server = RecordingHttpServer.start(Map.of())) { + closedUrl = server.baseUrl() + PATH; + } + GraphQLDatasourceConfig datasource = GraphQLDatasourceConfig.builder().url(closedUrl).build(); + + Throwable failure = support.failureOf(datasource, GraphQLCallSupport.query(), GraphQLCallSupport.visitor(null, null)); + + System.out.println("[GraphQLConnectionFailureTest] " + closedUrl + " -> " + failure); + assertThat(failure).as("the error of a refused connection to " + closedUrl).isInstanceOf(PluginException.class); + PluginException pluginException = (PluginException) failure; + assertThat(pluginException.getMessageKey()).as("message key of the wrapped connection error").isEqualTo(QUERY_EXECUTION_ERROR_KEY); + assertThat(pluginException.getMessage()).as("the cause's text is in the message").isNotBlank(); + } +} diff --git a/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoEngineContainerTest.java b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoEngineContainerTest.java index 1571e433b..e90b5e1b6 100644 --- a/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoEngineContainerTest.java +++ b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoEngineContainerTest.java @@ -144,9 +144,10 @@ public void aClosedConnectionCanNoLongerRunCommands() { MongoConnection closing = ENGINE.createConnection(CONFIG).block(BLOCK_TIMEOUT); assertEquals(1.0, closing.ping().block(BLOCK_TIMEOUT).get("ok")); ENGINE.destroyConnection(closing).block(BLOCK_TIMEOUT); - QueryExecutionResult after = run(closing, form("COUNT", collection("closed")), Map.of()); - assertEquals("MONGO_EXECUTION_ERROR", after.getQueryCode(), "observed: a closed client gives an error result, not an exception"); - assertEquals("MONGODB_EXECUTE_ERROR", after.getMessageKey()); + PluginException thrown = assertThrows(PluginException.class, () -> run(closing, form("COUNT", collection("closed")), Map.of()), + "observed with driver 5.8: a closed client refuses the command when it is issued, as a command error"); + assertEquals("MONGODB_COMMAND_ERROR", thrown.getMessageKey()); + assertTrue(thrown.getMessage().contains("state should be: open"), "the driver's reason is in the message: " + thrown.getMessage()); } // ---- commands diff --git a/server/api-service/lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java b/server/api-service/lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java index 3289ce10f..9cdf3b659 100644 --- a/server/api-service/lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java +++ b/server/api-service/lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java @@ -50,6 +50,8 @@ import org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType; import org.lowcoder.sdk.query.QueryVisitorContext; import org.lowcoder.sdk.util.CookieForwarding; +import org.lowcoder.sdk.util.HttpHeaderMaps; +import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; import org.lowcoder.sdk.webclient.WebClientBuildHelper; import org.lowcoder.sdk.webclient.WebClientRedirects; import org.pf4j.Extension; @@ -101,7 +103,10 @@ public class RestApiExecutor implements QueryExecutor configurer.defaultCodecs().maxInMemorySize(-1)) + .codecs(configurer -> { + Jackson2ClientCodecs.apply(configurer); + configurer.defaultCodecs().maxInMemorySize(-1); + }) .build(); public RestApiExecutor(CommonConfig commonConfig) { @@ -433,7 +438,7 @@ private JsonNode parseExecuteResultHeaders(HttpHeaders headers) { // Convert the headers into json tree to store in the results String headerInJsonString; try { - headerInJsonString = toJsonThrows(headers); + headerInJsonString = toJsonThrows(HttpHeaderMaps.copyOf(headers)); } catch (JsonProcessingException e) { throw new PluginException(QUERY_EXECUTION_ERROR, DEFAULT_REST_ERROR_CODE, e.getMessage()); } diff --git a/server/api-service/lowcoder-sdk/pom.xml b/server/api-service/lowcoder-sdk/pom.xml index 5e6473864..8f1b1b4bf 100644 --- a/server/api-service/lowcoder-sdk/pom.xml +++ b/server/api-service/lowcoder-sdk/pom.xml @@ -150,6 +150,12 @@ com.fasterxml.jackson.datatype jackson-datatype-jsr310 + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + com.jayway.jsonpath json-path diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java index c532222e3..ae768455f 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java @@ -11,6 +11,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; @JsonInclude(JsonInclude.Include.NON_NULL) @Getter @@ -18,6 +19,16 @@ public class QueryExecutionResult { private static final String CODE_FAILED = "FAILED"; private static final String CODE_OK = "OK"; + private static final String HTTP_CODE_PREFIX = "HTTP"; + + /** + * The names under which the status codes whose {@link HttpStatus} constant Spring 7 renamed (RFC 9110) were reported in + * a query's {@code queryCode}, which stays what it was for the apps that compare it. + */ + private static final Map LEGACY_HTTP_STATUS_NAMES = Map.of( + HttpStatus.CONTENT_TOO_LARGE, "PAYLOAD_TOO_LARGE", + HttpStatus.MISDIRECTED_REQUEST, "DESTINATION_LOCKED", + HttpStatus.UNPROCESSABLE_CONTENT, "UNPROCESSABLE_ENTITY"); private String queryCode = CODE_OK; private JsonNode headers; @@ -75,7 +86,7 @@ public static QueryExecutionResult errorWithMessage(String message) { public static QueryExecutionResult ofRestApiResult(HttpStatus httpStatus, JsonNode resultHeaders, Object body) { QueryExecutionResult result = new QueryExecutionResult(); if (!httpStatus.is2xxSuccessful()) { - result.queryCode = "HTTP" + httpStatus.name(); + result.queryCode = HTTP_CODE_PREFIX + LEGACY_HTTP_STATUS_NAMES.getOrDefault(httpStatus, httpStatus.name()); } result.headers = resultHeaders; result.data = body; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/http/RawHttpHandlerHelper.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/http/RawHttpHandlerHelper.java index fc9bde7a2..02f5dfa52 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/http/RawHttpHandlerHelper.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/http/RawHttpHandlerHelper.java @@ -23,6 +23,10 @@ public class RawHttpHandlerHelper { private static final DataUtils DATA_UTILS = DataUtils.getInstance(); + /** The charset-suffixed forms of the JSON media types, which Spring 7 no longer declares as constants. */ + private static final String JSON_UTF8_CONTENT_TYPE = MediaType.APPLICATION_JSON_VALUE + ";charset=UTF-8"; + private static final String PROBLEM_JSON_UTF8_CONTENT_TYPE = MediaType.APPLICATION_PROBLEM_JSON_VALUE + ";charset=UTF-8"; + public static BodyInserter buildBodyInserter(HttpMethod httpMethod, boolean isEncodeParams, @@ -49,12 +53,11 @@ public class RawHttpHandlerHelper { return BodyInserters.fromValue(queryBody); } - @SuppressWarnings("deprecation") private static boolean isJsonContentType(String requestContentType) { return MediaType.APPLICATION_JSON_VALUE.equals(requestContentType) - || MediaType.APPLICATION_JSON_UTF8_VALUE.equals(requestContentType) + || JSON_UTF8_CONTENT_TYPE.equals(requestContentType) || MediaType.APPLICATION_PROBLEM_JSON_VALUE.equals(requestContentType) - || MediaType.APPLICATION_PROBLEM_JSON_UTF8_VALUE.equals(requestContentType); + || PROBLEM_JSON_UTF8_CONTENT_TYPE.equals(requestContentType); } private static boolean isNoneContentType(String requestContentType) { diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/HttpHeaderMaps.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/HttpHeaderMaps.java new file mode 100644 index 000000000..7f5c35804 --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/HttpHeaderMaps.java @@ -0,0 +1,32 @@ +package org.lowcoder.sdk.util; + +import java.util.List; +import java.util.Locale; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.CollectionUtils; +import org.springframework.util.LinkedCaseInsensitiveMap; +import org.springframework.util.MultiValueMap; + +/** + * {@link HttpHeaders} as a map. Since Spring 7 it is no longer a {@code MultiValueMap}, and its {@code asMultiValueMap()} + * bridge is deprecated for removal, so the code that needs the headers as a {@code Map} (to remove a header, to hand them + * over as a plain map, to write them as JSON) takes this copy. + * + *

Limits: it is a snapshot; changes to the copy do not reach the headers it was made from, and the reverse. + */ +public final class HttpHeaderMaps { + + private HttpHeaderMaps() { + } + + /** + * A writable copy of {@code headers} that compares header names without regard to case, as {@link HttpHeaders} does, + * keeps their order and the case of the first spelling, and is a {@code Map>}. + */ + public static MultiValueMap copyOf(HttpHeaders headers) { + MultiValueMap copy = CollectionUtils.toMultiValueMap(new LinkedCaseInsensitiveMap>(Locale.ENGLISH)); + headers.forEach(copy::addAll); + return copy; + } +} diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java new file mode 100644 index 000000000..8c5ceded4 --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java @@ -0,0 +1,35 @@ +package org.lowcoder.sdk.webclient; + +import org.springframework.http.codec.ClientCodecConfigurer; +import org.springframework.http.codec.json.Jackson2JsonDecoder; +import org.springframework.http.codec.json.Jackson2JsonEncoder; + +/** + * Keeps the JSON codecs of the application's outbound {@code WebClient}s on Jackson 2. + * + *

Spring's default codecs choose the Jackson 3 JSON codecs whenever {@code tools.jackson.databind.ObjectMapper} is on + * the class path, and Jackson 3 is there through Spring Boot's JSON starter. The request bodies the application writes are + * Jackson 2 trees ({@code com.fasterxml.jackson.databind.JsonNode}); the Jackson 3 encoder does not know that type and + * writes the tree's bean properties instead of its content. A codec set explicitly wins over the default, so this sets + * both slots. + * + *

The no-argument codecs build their own mappers with {@code Jackson2ObjectMapperBuilder}, one per codec, as the + * defaults of a class path without Jackson 3 do. + * + *

Limits: it covers only the clients that call it ({@link WebClientBuildHelper} and the exchange strategies declared by + * the code that does not go through the helper). A {@code WebClient} or {@code ExchangeStrategies} built anywhere else, and + * the {@code spring.http.codecs.preferred-json-mapper} property, which only Spring Boot's own codec configuration reads, + * do not reach it. + */ +@SuppressWarnings({"deprecation", "removal"}) +public final class Jackson2ClientCodecs { + + private Jackson2ClientCodecs() { + } + + /** Sets a Jackson 2 JSON encoder and decoder on {@code configurer}'s default codecs. */ + public static void apply(ClientCodecConfigurer configurer) { + configurer.defaultCodecs().jackson2JsonEncoder(new Jackson2JsonEncoder()); + configurer.defaultCodecs().jackson2JsonDecoder(new Jackson2JsonDecoder()); + } +} diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java index c1d462037..e4600c978 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java @@ -129,9 +129,10 @@ public Builder toWebClientBuilder() { httpClient = httpClient.resolver(new SafeHostResolverGroup(disallowedHosts)); } return WebClient.builder() - .codecs(codecs -> codecs - .defaultCodecs() - .maxInMemorySize(maxInMemorySize)) + .codecs(codecs -> { + Jackson2ClientCodecs.apply(codecs); + codecs.defaultCodecs().maxInMemorySize(maxInMemorySize); + }) .clientConnector(new ReactorClientHttpConnector(httpClient)); } diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientRedirects.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientRedirects.java index dee90d056..4927a397d 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientRedirects.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientRedirects.java @@ -93,7 +93,7 @@ && equalsIgnoreCase(first.getHost(), second.getHost()) public static WebClient forAnotherOrigin(WebClient webClient) { return webClient.mutate() .defaultHeaders(headers -> { - List dropped = headers.keySet().stream() + List dropped = headers.headerNames().stream() .filter(name -> !HEADERS_KEPT_FOR_ANOTHER_ORIGIN.contains(name.toLowerCase(Locale.ROOT))) .toList(); dropped.forEach(headers::remove); diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClients.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClients.java deleted file mode 100644 index a1a36a6c9..000000000 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClients.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.lowcoder.sdk.webclient; - -import org.springframework.web.reactive.function.client.WebClient; - -public class WebClients { - - private static final WebClient INSTANCE = WebClient.builder().build(); - - public static WebClient getInstance() { - return INSTANCE; - } -} diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecs.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecs.java index 9b02a7e49..166ffbf1b 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecs.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecs.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import org.lowcoder.sdk.util.JsonUtils; +import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; import org.lowcoder.sdk.webclient.WebClientBuildHelper; import org.springframework.http.codec.DecoderHttpMessageReader; import org.springframework.http.codec.EncoderHttpMessageWriter; @@ -22,11 +23,12 @@ /** * Spring's default client codecs as the application builds them (docs/API_PAYLOAD_TEST_PLAN.md §1.1, §3.2, §5.4). * - *

All five {@code codecs(...)} constructions of the application set only {@code maxInMemorySize} on the default - * codecs: {@code WebClientBuildHelper.java:131-134} (20 MB by default), {@code JsLibraryController.java:62-65} (-1), - * {@code DatasourcePluginClient.java:42-45} (-1), {@code GraphQLExecutor.java:88-91} (10 MB) and - * {@code RestApiExecutor.java:102-105} (-1). {@link #strategies(int)} builds the same thing, so tests can encode and - * decode with the client codecs without a network client. + *

The application builds its client codecs in six places, and each sets {@link Jackson2ClientCodecs#apply} and then + * {@code maxInMemorySize} on the default codecs: {@code WebClientBuildHelper.java:131-136} (20 MB by default), + * {@code JsLibraryController.java:63-69} (-1), {@code DatasourcePluginClient.java:43-49} (-1), + * {@code GraphQLExecutor.java:90-96} (10 MB), {@code RestApiExecutor.java:104-110} (-1) and + * {@code MarketplaceRenderClient.java:23-28} (2 MiB). {@link #strategies(int)} builds the same thing, so tests can encode + * and decode with the client codecs without a network client. * *

Effective limit (plan §9, O11; evidence E14). {@code JsLibraryController}, {@code GraphQLExecutor} and * {@code RestApiExecutor} pass their strategies to a builder from {@code WebClientBuildHelper}, whose own @@ -67,8 +69,8 @@ public static MapperProfile profile(ObjectMapper mapper) { /** * The strategies a {@link WebClient} built by the application from {@code declared} really uses: a builder from * {@code WebClientBuildHelper.builder().systemProxy().toWebClientBuilder()} with {@code exchangeStrategies(declared)}, - * as {@code JsLibraryController.java:148-152}, {@code GraphQLExecutor.java:247-270} and - * {@code RestApiExecutor.java:236-262} build it. Their other builder calls (headers, cookies, filters, SSL, timeout, + * as {@code JsLibraryController.java:152-156}, {@code GraphQLExecutor.java:252-275} and + * {@code RestApiExecutor.java:241-267} build it. Their other builder calls (headers, cookies, filters, SSL, timeout, * disallowed hosts) do not touch the codecs. * *

Limit: it reads Spring's non-public {@code DefaultWebClientBuilder#initExchangeStrategies}, so a Spring upgrade @@ -89,10 +91,13 @@ public static ExchangeStrategies effective(WebClient.Builder builder) { } } - /** The exchange strategies of {@code ExchangeStrategies.builder().codecs(c -> c.defaultCodecs().maxInMemorySize(n))}. */ + /** The exchange strategies of the application's clients: {@link Jackson2ClientCodecs#apply}, then {@code maxInMemorySize(n)}. */ public static ExchangeStrategies strategies(int maxInMemorySize) { return ExchangeStrategies.builder() - .codecs(configurer -> configurer.defaultCodecs().maxInMemorySize(maxInMemorySize)) + .codecs(configurer -> { + Jackson2ClientCodecs.apply(configurer); + configurer.defaultCodecs().maxInMemorySize(maxInMemorySize); + }) .build(); } diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/models/QueryExecutionResultHttpCodeTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/models/QueryExecutionResultHttpCodeTest.java new file mode 100644 index 000000000..eb3596aa6 --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/models/QueryExecutionResultHttpCodeTest.java @@ -0,0 +1,41 @@ +package org.lowcoder.sdk.models; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; +import org.springframework.http.HttpStatus; + +/** + * The {@code queryCode} of a REST API result is {@code "HTTP"} plus the name of the response's status, and apps compare it. + * Spring 7 renamed the constants of three status codes; the code stays what it was. + */ +class QueryExecutionResultHttpCodeTest { + + private static String queryCodeOf(HttpStatus status) { + QueryExecutionResult result = QueryExecutionResult.ofRestApiResult(status, null, null); + System.out.println("[QueryExecutionResultHttpCodeTest] " + status.value() + " " + status.name() + " -> " + result.getQueryCode()); + return result.getQueryCode(); + } + + /** Catches the renamed constants leaking into the code: 413, 421 and 422 keep their earlier names. */ + @Test + void renamedStatusesKeepTheirEarlierCodes() { + assertThat(queryCodeOf(HttpStatus.resolve(413))).as("413 as resolved by HttpStatus").isEqualTo("HTTPPAYLOAD_TOO_LARGE"); + assertThat(queryCodeOf(HttpStatus.resolve(421))).as("421 as resolved by HttpStatus").isEqualTo("HTTPDESTINATION_LOCKED"); + assertThat(queryCodeOf(HttpStatus.resolve(422))).as("422 as resolved by HttpStatus").isEqualTo("HTTPUNPROCESSABLE_ENTITY"); + } + + /** Catches the mapping touching statuses whose names did not change. */ + @Test + void otherStatusesUseTheirConstantName() { + assertThat(queryCodeOf(HttpStatus.NOT_FOUND)).as("404").isEqualTo("HTTPNOT_FOUND"); + assertThat(queryCodeOf(HttpStatus.INTERNAL_SERVER_ERROR)).as("500").isEqualTo("HTTPINTERNAL_SERVER_ERROR"); + assertThat(queryCodeOf(HttpStatus.URI_TOO_LONG)).as("414").isEqualTo("HTTPURI_TOO_LONG"); + } + + /** Catches a success status carrying a code: the code stays OK. */ + @Test + void successStatusKeepsTheOkCode() { + assertThat(queryCodeOf(HttpStatus.OK)).as("200").isEqualTo("OK"); + } +} diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/HttpHeaderMapsTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/HttpHeaderMapsTest.java new file mode 100644 index 000000000..f5381b0da --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/HttpHeaderMapsTest.java @@ -0,0 +1,63 @@ +package org.lowcoder.sdk.util; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +/** What {@link HttpHeaderMaps#copyOf} keeps of {@link HttpHeaders}: names without regard to case, order, values and their JSON form. */ +class HttpHeaderMapsTest { + + private static HttpHeaders headers() { + HttpHeaders headers = new HttpHeaders(); + headers.add("Content-Type", "application/json"); + headers.add("X-Multi", "first"); + headers.add("X-Multi", "second, with comma"); + headers.add("Cookie", "session=1"); + return headers; + } + + /** Catches a copy that loses a value, a name's order or a name's case. */ + @Test + void theCopyHoldsEveryValueInOrder() { + MultiValueMap copy = HttpHeaderMaps.copyOf(headers()); + + System.out.println("[HttpHeaderMapsTest] copy " + copy); + assertThat(copy.keySet()).as("names in the order of the headers, in their first spelling") + .containsExactly("Content-Type", "X-Multi", "Cookie"); + assertThat(copy.get("X-Multi")).as("values of a repeated header").containsExactly("first", "second, with comma"); + } + + /** Catches a case-sensitive copy: removing a header by another spelling must work, as it does on HttpHeaders. */ + @Test + void namesAreComparedWithoutRegardToCase() { + MultiValueMap copy = HttpHeaderMaps.copyOf(headers()); + + assertThat(copy.remove("cookie")).as("removed by a lower-case spelling").containsExactly("session=1"); + copy.addIfAbsent("X-MULTI", "third"); + assertThat(copy.get("x-multi")).as("addIfAbsent did not add to the existing header").containsExactly("first", "second, with comma"); + assertThat(copy).as("the copy without the cookie").doesNotContainKey("Cookie"); + } + + /** Catches a view instead of a copy: the headers must not change when the copy does. */ + @Test + void theCopyIsIndependentOfTheHeaders() { + HttpHeaders original = headers(); + + HttpHeaderMaps.copyOf(original).remove("Cookie"); + HttpHeaderMaps.copyOf(original).add("X-Added", "1"); + + assertThat(original.containsHeader("Cookie")).as("original still has the cookie").isTrue(); + assertThat(original.containsHeader("X-Added")).as("original has no added header").isFalse(); + } + + /** Catches a copy that is not written as a JSON object of arrays, the form the results hold the response headers in. */ + @Test + void theCopyIsWrittenAsAnObjectOfArrays() { + String json = JsonUtils.toJson(HttpHeaderMaps.copyOf(headers())); + + System.out.println("[HttpHeaderMapsTest] json " + json); + assertThat(json).isEqualTo("{\"Content-Type\":[\"application/json\"],\"X-Multi\":[\"first\",\"second, with comma\"],\"Cookie\":[\"session=1\"]}"); + } +} diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/webclient/WebClientRedirectsTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/webclient/WebClientRedirectsTest.java index ef0a9ca0e..2285e2903 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/webclient/WebClientRedirectsTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/webclient/WebClientRedirectsTest.java @@ -92,7 +92,7 @@ void forAnotherOriginKeepsOnlyTheContentHeadersAndDropsEveryOtherDefaultHeaderAn assertThat(original.headers().get(HttpHeaders.AUTHORIZATION)).containsExactly("Basic dXNlcjpzZWNyZXQ="); assertThat(original.headers().get("X-Api-Key")).containsExactly("key"); assertThat(original.cookies().get("a")).containsExactly("1"); - assertThat(other.headers().keySet().stream().map(name -> name.toLowerCase(Locale.ROOT))) + assertThat(other.headers().headerNames().stream().map(name -> name.toLowerCase(Locale.ROOT))) .as("header names are compared without case").containsExactlyInAnyOrder("accept", "accept-language", "content-type", "user-agent"); assertThat(other.headers().getAccept()).hasToString("[application/json]"); assertThat(other.cookies()).isEmpty(); diff --git a/server/api-service/lowcoder-server/pom.xml b/server/api-service/lowcoder-server/pom.xml index 39f17552c..8fc6658ef 100644 --- a/server/api-service/lowcoder-server/pom.xml +++ b/server/api-service/lowcoder-server/pom.xml @@ -130,7 +130,7 @@ io.sentry - sentry-spring-boot-starter-jakarta + sentry-spring-boot-4 org.apache.httpcomponents @@ -171,8 +171,8 @@ test - org.springframework.security - spring-security-test + org.springframework.boot + spring-boot-starter-security-test test @@ -181,7 +181,7 @@ test + the version comes from the Spring Boot dependency management in lowcoder-dependencies --> org.testcontainers testcontainers-mongodb @@ -246,6 +246,17 @@ + + + org.eclipse.jetty.ee10 + jetty-ee10-bom + 12.1.14 + pom + import + org.lowcoder lowcoder-dependencies diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/ApplicationHistorySnapshotController.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/ApplicationHistorySnapshotController.java index eab279b43..49ab13921 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/ApplicationHistorySnapshotController.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/ApplicationHistorySnapshotController.java @@ -60,10 +60,10 @@ public Mono> create(@RequestBody ApplicationHistorySnapsho public Mono>> listAllHistorySnapshotBriefInfo(@PathVariable String applicationId, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size, - @RequestParam String compName, - @RequestParam String theme, - @RequestParam Instant from, - @RequestParam Instant to) { + @RequestParam(required = false) String compName, + @RequestParam(required = false) String theme, + @RequestParam(required = false) Instant from, + @RequestParam(required = false) Instant to) { Pagination pagination = Pagination.of(page, size).check(); @@ -97,10 +97,10 @@ public Mono>> listAllHistorySnapshotBriefInfo(@ public Mono>> listAllHistorySnapshotBriefInfoArchived(@PathVariable String applicationId, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size, - @RequestParam String compName, - @RequestParam String theme, - @RequestParam Instant from, - @RequestParam Instant to) { + @RequestParam(required = false) String compName, + @RequestParam(required = false) String theme, + @RequestParam(required = false) Instant from, + @RequestParam(required = false) Instant to) { Pagination pagination = Pagination.of(page, size).check(); diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java index abc2891ef..08f70cfb5 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java @@ -9,7 +9,9 @@ import lombok.RequiredArgsConstructor; import org.lowcoder.infra.js.NodeServerHelper; import org.lowcoder.sdk.config.CommonConfig; +import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; import org.springframework.stereotype.Component; +import org.springframework.web.reactive.function.client.ExchangeStrategies; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; @@ -18,8 +20,14 @@ public class MarketplaceRenderClient { private final CommonConfig config; private final NodeServerHelper nodeServer; - private final WebClient client = WebClient.builder().codecs(codecs -> - codecs.defaultCodecs().maxInMemorySize(2 * 1024 * 1024)).build(); + private static final ExchangeStrategies EXCHANGE_STRATEGIES = ExchangeStrategies.builder() + .codecs(codecs -> { + Jackson2ClientCodecs.apply(codecs); + codecs.defaultCodecs().maxInMemorySize(2 * 1024 * 1024); + }) + .build(); + + private final WebClient client = WebClient.builder().exchangeStrategies(EXCHANGE_STRATEGIES).build(); public boolean isConfigured() { return config.getJsExecutor().getPassword() != null && !config.getJsExecutor().getPassword().isBlank(); diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/GithubRequest.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/GithubRequest.java index 9702f2bfa..31c52aa7f 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/GithubRequest.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/GithubRequest.java @@ -1,128 +1,127 @@ -package org.lowcoder.api.authentication.request.oauth2.request; - -import static java.net.URLDecoder.decode; -import static java.nio.charset.StandardCharsets.UTF_8; -import static org.lowcoder.sdk.plugin.common.constant.Constants.HTTP_TIMEOUT; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.collections4.MapUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.http.client.utils.URIBuilder; -import org.lowcoder.api.authentication.request.AuthException; -import org.lowcoder.api.authentication.request.oauth2.OAuth2RequestContext; -import org.lowcoder.api.authentication.request.oauth2.Oauth2DefaultSource; -import org.lowcoder.domain.user.model.AuthToken; -import org.lowcoder.domain.user.model.AuthUser; -import org.lowcoder.sdk.auth.Oauth2SimpleAuthConfig; -import org.lowcoder.sdk.util.JsonUtils; -import org.lowcoder.sdk.webclient.WebClientBuildHelper; -import org.lowcoder.sdk.webclient.WebClients; -import org.springframework.core.ParameterizedTypeReference; - -import reactor.core.publisher.Mono; - -public class GithubRequest extends AbstractOauth2Request { - - private static final String ERROR_KEY = "error"; - private static final String ACCESS_TOKEN_KEY = "access_token"; - static final String NO_ACCESS_TOKEN = "GitHub answered the token request without an access token"; - - public GithubRequest(Oauth2SimpleAuthConfig config) { - super(config, Oauth2DefaultSource.GITHUB); - } - - /** - * Exchanges the code for a token. An error answer, and an answer without an access token (an empty or blank body, or - * a body without a usable {@code access_token}), fail with an {@link AuthException} (BF-073): an empty body completed - * empty before, and the login then answered success without a session. - *

- * Limits: the access token is not checked beyond being present and not blank; the HTTP status is not read (an error - * status with a token in its body is taken as a token). - */ - @Override - protected Mono getAuthToken(OAuth2RequestContext context) { - URI uri; - try { - uri = new URIBuilder(source.accessToken()) - .addParameter("code", context.getCode()) - .addParameter("client_id", config.getClientId()) - .addParameter("client_secret", config.getClientSecret()) - .addParameter("grant_type", "authorization_code") - .addParameter("redirect_uri", context.getRedirectUrl()) - .build(); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - return WebClientBuildHelper.builder() - .systemProxy() - .timeoutMs(HTTP_TIMEOUT) - .build() - .post() - .uri(uri) - .exchangeToMono(response -> response.bodyToMono(String.class)) - .defaultIfEmpty("") - .map(this::parseStringToMap) - .flatMap(map -> { - if (map.containsKey(ERROR_KEY)) { - return Mono.error(new AuthException(JsonUtils.toJson(map))); - } - if (StringUtils.isBlank(map.get(ACCESS_TOKEN_KEY))) { - return Mono.error(new AuthException(NO_ACCESS_TOKEN)); - } - AuthToken accessToken = AuthToken.builder() - .accessToken(map.get(ACCESS_TOKEN_KEY)) - .build(); - return Mono.just(accessToken); - }); - } - - @Override - protected Mono refreshAuthToken(String refreshToken) { - return Mono.empty(); - } - - private Map parseStringToMap(String s) { - if (StringUtils.isBlank(s)) { - return new HashMap<>(); - } - - Map result = new HashMap<>(); - for (String item : s.split("&")) { - if (StringUtils.isNotBlank(item)) { - String[] kv = item.split("="); - result.put(decode(kv[0], UTF_8), kv.length == 2 ? decode(kv[1], UTF_8) : null); - } - } - return result; - } - - @Override - protected Mono getAuthUser(AuthToken authToken) { - return WebClientBuildHelper.builder() - .systemProxy() - .timeoutMs(HTTP_TIMEOUT) - .build() - .get() - .uri(source.userInfo()) - .header("Authorization", "token " + authToken.getAccessToken()) - .exchangeToMono(response -> response.bodyToMono(new ParameterizedTypeReference>() { - })) - .flatMap(map -> { - if (map.containsKey(ERROR_KEY)) { - return Mono.error(new AuthException(JsonUtils.toJson(map))); - } - String username = MapUtils.getString(map, "email"); - AuthUser authUser = AuthUser.builder() - .uid(map.get("id").toString()) - .username(username == null ? MapUtils.getString(map, "login") : username) - .avatar(MapUtils.getString(map, "avatar_url")) - .rawUserInfo(map) - .build(); - return Mono.just(authUser); - }); - } -} +package org.lowcoder.api.authentication.request.oauth2.request; + +import static java.net.URLDecoder.decode; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.lowcoder.sdk.plugin.common.constant.Constants.HTTP_TIMEOUT; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.client.utils.URIBuilder; +import org.lowcoder.api.authentication.request.AuthException; +import org.lowcoder.api.authentication.request.oauth2.OAuth2RequestContext; +import org.lowcoder.api.authentication.request.oauth2.Oauth2DefaultSource; +import org.lowcoder.domain.user.model.AuthToken; +import org.lowcoder.domain.user.model.AuthUser; +import org.lowcoder.sdk.auth.Oauth2SimpleAuthConfig; +import org.lowcoder.sdk.util.JsonUtils; +import org.lowcoder.sdk.webclient.WebClientBuildHelper; +import org.springframework.core.ParameterizedTypeReference; + +import reactor.core.publisher.Mono; + +public class GithubRequest extends AbstractOauth2Request { + + private static final String ERROR_KEY = "error"; + private static final String ACCESS_TOKEN_KEY = "access_token"; + static final String NO_ACCESS_TOKEN = "GitHub answered the token request without an access token"; + + public GithubRequest(Oauth2SimpleAuthConfig config) { + super(config, Oauth2DefaultSource.GITHUB); + } + + /** + * Exchanges the code for a token. An error answer, and an answer without an access token (an empty or blank body, or + * a body without a usable {@code access_token}), fail with an {@link AuthException} (BF-073): an empty body completed + * empty before, and the login then answered success without a session. + *

+ * Limits: the access token is not checked beyond being present and not blank; the HTTP status is not read (an error + * status with a token in its body is taken as a token). + */ + @Override + protected Mono getAuthToken(OAuth2RequestContext context) { + URI uri; + try { + uri = new URIBuilder(source.accessToken()) + .addParameter("code", context.getCode()) + .addParameter("client_id", config.getClientId()) + .addParameter("client_secret", config.getClientSecret()) + .addParameter("grant_type", "authorization_code") + .addParameter("redirect_uri", context.getRedirectUrl()) + .build(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + return WebClientBuildHelper.builder() + .systemProxy() + .timeoutMs(HTTP_TIMEOUT) + .build() + .post() + .uri(uri) + .exchangeToMono(response -> response.bodyToMono(String.class)) + .defaultIfEmpty("") + .map(this::parseStringToMap) + .flatMap(map -> { + if (map.containsKey(ERROR_KEY)) { + return Mono.error(new AuthException(JsonUtils.toJson(map))); + } + if (StringUtils.isBlank(map.get(ACCESS_TOKEN_KEY))) { + return Mono.error(new AuthException(NO_ACCESS_TOKEN)); + } + AuthToken accessToken = AuthToken.builder() + .accessToken(map.get(ACCESS_TOKEN_KEY)) + .build(); + return Mono.just(accessToken); + }); + } + + @Override + protected Mono refreshAuthToken(String refreshToken) { + return Mono.empty(); + } + + private Map parseStringToMap(String s) { + if (StringUtils.isBlank(s)) { + return new HashMap<>(); + } + + Map result = new HashMap<>(); + for (String item : s.split("&")) { + if (StringUtils.isNotBlank(item)) { + String[] kv = item.split("="); + result.put(decode(kv[0], UTF_8), kv.length == 2 ? decode(kv[1], UTF_8) : null); + } + } + return result; + } + + @Override + protected Mono getAuthUser(AuthToken authToken) { + return WebClientBuildHelper.builder() + .systemProxy() + .timeoutMs(HTTP_TIMEOUT) + .build() + .get() + .uri(source.userInfo()) + .header("Authorization", "token " + authToken.getAccessToken()) + .exchangeToMono(response -> response.bodyToMono(new ParameterizedTypeReference>() { + })) + .flatMap(map -> { + if (map.containsKey(ERROR_KEY)) { + return Mono.error(new AuthException(JsonUtils.toJson(map))); + } + String username = MapUtils.getString(map, "email"); + AuthUser authUser = AuthUser.builder() + .uid(map.get("id").toString()) + .username(username == null ? MapUtils.getString(map, "login") : username) + .avatar(MapUtils.getString(map, "avatar_url")) + .rawUserInfo(map) + .build(); + return Mono.just(authUser); + }); + } +} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/ApplicationConfiguration.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/ApplicationConfiguration.java index 21f6e2169..333ddaf68 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/ApplicationConfiguration.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/ApplicationConfiguration.java @@ -1,40 +1,23 @@ package org.lowcoder.api.framework.configuration; -import jakarta.servlet.MultipartConfigElement; import org.lowcoder.api.ServerApplication; -import org.lowcoder.sdk.config.CommonConfig; import org.pf4j.spring.SpringPluginManager; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.system.ApplicationHome; -import org.springframework.boot.web.servlet.MultipartConfigFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.util.unit.DataSize; @Configuration -public class ApplicationConfiguration +public class ApplicationConfiguration { - @Autowired - private CommonConfig common; - @Bean("applicationHome") public ApplicationHome applicatioHome() { return new ApplicationHome(ServerApplication.class); } - + @Bean public SpringPluginManager pluginManager() { return new SpringPluginManager(); } - - @Bean - public MultipartConfigElement multipartConfigElement() - { - MultipartConfigFactory factory = new MultipartConfigFactory(); - factory.setMaxRequestSize(DataSize.parse(common.getMaxUploadSize())); - factory.setMaxFileSize(DataSize.parse(common.getMaxUploadSize())); - return factory.createMultipartConfig(); - } } diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java index f3084845c..d3d350f1d 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java @@ -17,11 +17,11 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.web.ServerProperties; +import org.springframework.boot.autoconfigure.web.WebProperties; import org.springframework.boot.autoconfigure.web.WebProperties.Resources; -import org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler; +import org.springframework.boot.webflux.autoconfigure.error.DefaultErrorWebExceptionHandler; import org.springframework.boot.web.error.ErrorAttributeOptions; -import org.springframework.boot.web.reactive.error.ErrorAttributes; +import org.springframework.boot.webflux.error.ErrorAttributes; import org.springframework.context.ApplicationContext; import org.springframework.core.annotation.Order; import org.springframework.http.HttpStatus; @@ -55,10 +55,10 @@ public class CustomErrorWebExceptionHandler extends DefaultErrorWebExceptionHand @Autowired public CustomErrorWebExceptionHandler(ErrorAttributes errorAttributes, Resources resources, - ServerProperties serverProperties, ApplicationContext applicationContext, + WebProperties webProperties, ApplicationContext applicationContext, ObjectProvider viewResolvers, ServerCodecConfigurer serverCodecConfigurer) { - super(errorAttributes, resources, serverProperties.getError(), applicationContext); + super(errorAttributes, resources, webProperties.getError(), applicationContext); this.setViewResolvers(viewResolvers.orderedStream().collect(Collectors.toList())); this.setMessageWriters(serverCodecConfigurer.getWriters()); this.setMessageReaders(serverCodecConfigurer.getReaders()); diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/ApiEventFilter.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/ApiEventFilter.java index b8622ac84..3601a5ce5 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/ApiEventFilter.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/ApiEventFilter.java @@ -10,6 +10,7 @@ import org.lowcoder.infra.event.APICallEvent; import org.lowcoder.plugin.api.event.LowcoderEvent; import org.lowcoder.sdk.constants.Authentication; +import org.lowcoder.sdk.util.HttpHeaderMaps; import org.springframework.context.ApplicationEventPublisher; import org.springframework.http.HttpHeaders; import org.springframework.http.server.reactive.ServerHttpRequest; @@ -27,7 +28,6 @@ import static org.lowcoder.sdk.constants.GlobalContext.CURRENT_ORG_MEMBER; import static org.lowcoder.sdk.constants.GlobalContext.VISITOR_TOKEN; -import static org.springframework.http.HttpHeaders.writableHttpHeaders; @Slf4j @RequiredArgsConstructor @@ -58,7 +58,7 @@ public Mono filter(ServerWebExchange exchange, WebFilterChain chain) { } private void emitEvent(ServerHttpRequest request, String token, OrgMember orgMember, ContextView contextView) { - MultiValueMap headers = writableHttpHeaders(request.getHeaders()); + MultiValueMap headers = HttpHeaderMaps.copyOf(request.getHeaders()); headers.remove(HttpHeaders.COOKIE); String ipAddress = firstValueOrEmpty(headers.remove(X_REAL_IP)); diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/GlobalContextFilter.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/GlobalContextFilter.java index 402c4df8b..0dbc26220 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/GlobalContextFilter.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/filter/GlobalContextFilter.java @@ -10,6 +10,7 @@ import org.lowcoder.infra.serverlog.ServerLogService; import org.lowcoder.infra.util.NetworkUtils; import org.lowcoder.sdk.util.CookieHelper; +import org.lowcoder.sdk.util.HttpHeaderMaps; import org.lowcoder.sdk.util.UriUtils; import org.springframework.context.i18n.LocaleContext; import org.springframework.core.Ordered; @@ -33,7 +34,6 @@ import static org.lowcoder.sdk.constants.Authentication.isAnonymousUser; import static org.lowcoder.sdk.constants.GlobalContext.*; import static org.lowcoder.sdk.util.IDUtils.generate; -import static org.springframework.http.HttpHeaders.writableHttpHeaders; @Component @RequiredArgsConstructor @@ -112,7 +112,7 @@ private Map buildContextMap(ServerWebExchange serverWebExchange, contextMap.put(DOMAIN, UriUtils.getRefererDomainFromRequest(serverWebExchange)); //Analytics related fields - MultiValueMap headers = writableHttpHeaders(request.getHeaders()); + MultiValueMap headers = HttpHeaderMaps.copyOf(request.getHeaders()); headers.remove("Cookie"); headers.addIfAbsent(REQUEST_ID_HEADER, requestId); contextMap.put(HEADERS, headers); diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java index aa75bdc17..6f279c763 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java @@ -3,6 +3,7 @@ import org.lowcoder.plugin.api.PluginEndpoint; import org.lowcoder.plugin.api.PluginEndpoint.Method; import org.lowcoder.plugin.api.data.EndpointRequest; +import org.lowcoder.sdk.util.HttpHeaderMaps; import org.springframework.http.HttpCookie; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; @@ -52,7 +53,7 @@ public static PluginServerRequest fromServerRequest(ServerRequest request) if (request.headers() != null) { HttpHeaders httpHeaders = request.headers().asHttpHeaders(); - psr.headers = httpHeaders; + psr.headers = HttpHeaderMaps.copyOf(httpHeaders); } if (request.cookies() != null) diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/endpoint/PluginEndpointHandlerImpl.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/endpoint/PluginEndpointHandlerImpl.java index e04627c9f..3db1c9e88 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/endpoint/PluginEndpointHandlerImpl.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/endpoint/PluginEndpointHandlerImpl.java @@ -42,7 +42,7 @@ import org.springframework.http.ResponseCookie; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.authorization.AuthorizationDecision; +import org.springframework.security.authorization.AuthorizationResult; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.ReactiveSecurityContextHolder; import org.springframework.security.core.context.SecurityContext; @@ -156,14 +156,14 @@ public Mono runPluginEndpointMethod(PluginEndpoint endpoint, End log.info("Running plugin endpoint method {}\nRequest: {}", handler.getName(), request); Mono monoAuthentication = ReactiveSecurityContextHolder.getContext().map(SecurityContext::getAuthentication).cache(); - Mono decisionMono = monoAuthentication.flatMap(authentication -> { + Mono decisionMono = monoAuthentication.flatMap(authentication -> { MethodInvocation methodInvocation = null; try { methodInvocation = getMethodInvocation(endpointMeta, authentication); } catch (NoSuchMethodException e) { return Mono.error(new RuntimeException(e)); } - return pluginAuthorizationManager.check(monoAuthentication, methodInvocation); + return pluginAuthorizationManager.authorize(monoAuthentication, methodInvocation); }); return decisionMono.flatMap(authorizationDecision -> { diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/security/PluginAuthorizationManager.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/security/PluginAuthorizationManager.java index 71b75c3e0..f2c31d934 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/security/PluginAuthorizationManager.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/security/PluginAuthorizationManager.java @@ -10,6 +10,7 @@ import org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler; import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler; import org.springframework.security.authorization.AuthorizationDecision; +import org.springframework.security.authorization.AuthorizationResult; import org.springframework.security.authorization.ExpressionAuthorizationDecision; import org.springframework.security.authorization.ReactiveAuthorizationManager; import org.springframework.security.core.Authentication; @@ -28,7 +29,7 @@ public PluginAuthorizationManager() } @Override - public Mono check(Mono authentication, MethodInvocation invocation) + public Mono authorize(Mono authentication, MethodInvocation invocation) { log.info("Checking plugin reactive endpoint invocation security for {}", invocation.getMethod().getName()); diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java index 32a2d054f..5baa62374 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java @@ -24,6 +24,7 @@ import org.lowcoder.infra.constant.NewUrl; import org.lowcoder.infra.localcache.ReloadableCache; import org.lowcoder.sdk.util.JsonUtils; +import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; import org.lowcoder.sdk.webclient.WebClientBuildHelper; import org.springframework.core.ParameterizedTypeReference; import org.springframework.web.bind.annotation.RequestMapping; @@ -61,7 +62,10 @@ public Mono load(@NotNull String key) { private static final ExchangeStrategies EXCHANGE_STRATEGY = ExchangeStrategies .builder() - .codecs(configure -> configure.defaultCodecs().maxInMemorySize(-1)) + .codecs(configure -> { + Jackson2ClientCodecs.apply(configure); + configure.defaultCodecs().maxInMemorySize(-1); + }) .build(); /** The resource's {@code downloadUrl} of each recommended library, by name, read as UTF-8 (GH-01; bytes that are not UTF-8 become U+FFFD); read-only once the class is loaded. */ diff --git a/server/api-service/lowcoder-server/src/main/resources/application-debug.yaml b/server/api-service/lowcoder-server/src/main/resources/application-debug.yaml index 1ae6f1b5d..0a120923e 100644 --- a/server/api-service/lowcoder-server/src/main/resources/application-debug.yaml +++ b/server/api-service/lowcoder-server/src/main/resources/application-debug.yaml @@ -1,8 +1,8 @@ spring: + mongodb: + authentication-database: admin + uri: "mongodb://lowcoder:secret123@127.0.0.1:27017/lowcoder?authSource=admin" data: - mongodb: - authentication-database: admin - uri: "mongodb://lowcoder:secret123@127.0.0.1:27017/lowcoder?authSource=admin" redis: url: ${LOWCODER_REDIS_URL:redis://localhost:6379} main: diff --git a/server/api-service/lowcoder-server/src/main/resources/application.yaml b/server/api-service/lowcoder-server/src/main/resources/application.yaml index 74962cb33..77a0a32b7 100644 --- a/server/api-service/lowcoder-server/src/main/resources/application.yaml +++ b/server/api-service/lowcoder-server/src/main/resources/application.yaml @@ -7,11 +7,16 @@ auth: workspace-creation: ${LOWCODER_CREATE_WORKSPACE_ON_SIGNUP:true} spring: + mongodb: + authentication-database: admin + representation: + uuid: java-legacy + uri: ${LOWCODER_MONGODB_URL:mongodb://lowcoder:secret123@localhost:27017/lowcoder?retryWrites=true&loadBalanced=false&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-256} data: mongodb: - authentication-database: admin auto-index-creation: false - uri: ${LOWCODER_MONGODB_URL:mongodb://lowcoder:secret123@localhost:27017/lowcoder?retryWrites=true&loadBalanced=false&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-256} + representation: + big-decimal: string redis: url: ${LOWCODER_REDIS_URL:redis://localhost:6379} main: @@ -20,6 +25,7 @@ spring: http: codecs: max-in-memory-size: 20MB + preferred-json-mapper: jackson2 webflux: base-path: / mail: diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplaceRenderContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplaceRenderContractTest.java index f018e2491..608f306d3 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplaceRenderContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplaceRenderContractTest.java @@ -206,7 +206,7 @@ void renderRejectsANonJpegAnswer() { * returns all of it; one byte more: {@code render} fails with a {@link DataBufferLimitException} in its cause chain. * The limit in effect is observed, not read from the client's configuration. */ - @BoundarySites("lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.client#codecs#1") + @BoundarySites("lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.EXCHANGE_STRATEGIES#codecs#1") @ParameterizedTest(name = "{0} bytes") @ValueSource(ints = {DECLARED_LIMIT, DECLARED_LIMIT + 1}) void renderEnforcesItsDeclaredLimit(int size) { diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/bundle/BundleEndpointsIntegrationTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/bundle/BundleEndpointsIntegrationTest.java index b63cafb95..1a9946437 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/bundle/BundleEndpointsIntegrationTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/bundle/BundleEndpointsIntegrationTest.java @@ -24,7 +24,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Primary; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.web.reactive.server.WebTestClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -92,9 +91,6 @@ public BusinessEventPublisher mockBusinessEventPublisher() { @Autowired private InitData initData; - @Autowired - private WebTestClient webTestClient; - private String testBundleId; private String testBundleId2; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/common/TestContainersInitializer.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/common/TestContainersInitializer.java index c0c194a0f..763f03edf 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/common/TestContainersInitializer.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/common/TestContainersInitializer.java @@ -18,13 +18,13 @@ * embedded redis-server was. * *

Limits: a context built without {@code SpringApplication} (a plain {@code @ContextConfiguration} test) does not run - * this initializer and keeps the configured {@code spring.data.*} values. + * this initializer and keeps the configured {@code spring.mongodb.*} and {@code spring.data.redis.*} values. */ public class TestContainersInitializer implements ApplicationContextInitializer { static final String PROPERTY_SOURCE = "testContainers"; static final String DATABASE_PREFIX = "lowcoder_test_"; - static final String MONGO_URI_PROPERTY = "spring.data.mongodb.uri"; + static final String MONGO_URI_PROPERTY = "spring.mongodb.uri"; static final String REDIS_URL_PROPERTY = "spring.data.redis.url"; private static final AtomicInteger CONTEXTS = new AtomicInteger(); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/configurations/SecurityTestConfig.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/configurations/SecurityTestConfig.java index b546de673..4967e9c30 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/configurations/SecurityTestConfig.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/configurations/SecurityTestConfig.java @@ -12,6 +12,6 @@ public class SecurityTestConfig { @Bean public SecurityWebFilterChain testSecurityWebFilterChain(ServerHttpSecurity http) { - return http.csrf().disable().build(); + return http.csrf(ServerHttpSecurity.CsrfSpec::disable).build(); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ClientCodecGuardTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ClientCodecGuardTest.java index 33d6f1223..49a316f62 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ClientCodecGuardTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ClientCodecGuardTest.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; +import org.lowcoder.api.application.marketplace.MarketplaceRenderClient; import org.lowcoder.api.misc.JsLibraryController; import org.lowcoder.domain.plugin.client.DatasourcePluginClient; import org.lowcoder.sdk.contract.BoundarySites; @@ -21,8 +22,9 @@ * (docs/API_PAYLOAD_TEST_PLAN.md §5.4, group {@code client-codec-guard}; evidence E8, E11). Each case reads the * real {@code ExchangeStrategies} object the application uses, not a copy. * - *

Sites: {@code WebClientBuildHelper.java:132}, {@code DatasourcePluginClient.java:44}, - * {@code JsLibraryController.java:64}. {@code DatasourcePluginClient} builds a plain {@code WebClient} from its + *

Sites: {@code WebClientBuildHelper}, {@code DatasourcePluginClient}, {@code JsLibraryController} and + * {@code MarketplaceRenderClient} (its 2 MiB limit is declared and in effect: its client takes the strategies as they + * are). {@code DatasourcePluginClient} builds a plain {@code WebClient} from its * strategies, so its declared limit is the effective one; {@code JsLibraryController}'s requests get the * {@code WebClientBuildHelper} limit instead of the declared one (plan §9, O11; evidence E14), and that is what is pinned. The executors' sites are guarded in {@code graphqlPlugin} and * {@code restApiPlugin}. @@ -41,7 +43,10 @@ class ClientCodecGuardTest { /** E11: the bare mapper registers nothing and fails on unknown properties. */ private static final MapperProfile BARE_MAPPER_PROFILE = new MapperProfile(true, true, true, List.of()); - @BoundarySites("lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java#WebClientBuildHelper.toWebClientBuilder#codecs#1") + @BoundarySites({"lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java#WebClientBuildHelper.toWebClientBuilder#codecs#1", + "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java#Jackson2ClientCodecs.apply#jackson2JsonEncoder#1", + "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java#Jackson2ClientCodecs.apply#jackson2JsonDecoder#1", + "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java##import#1"}) @Test void webClientBuildHelperUsesDefaultClientCodecs() { ClientCodecs.assertDefaultClientCodecs("WebClientBuildHelper", @@ -57,7 +62,8 @@ void datasourcePluginClientUsesDefaultClientCodecs() throws ReflectiveOperationE } /** Declared unlimited at {@code JsLibraryController.java:62-65}; requests get 20 MB (O11, E14). */ - @BoundarySites("lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.EXCHANGE_STRATEGY#codecs#1") + @BoundarySites({"lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.EXCHANGE_STRATEGY#codecs#1", + "lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java##import#1"}) @Test void jsLibraryControllerRequestsUseDefaultClientCodecsWithTheHelperLimit() throws ReflectiveOperationException { ExchangeStrategies declared = (ExchangeStrategies) staticField(JsLibraryController.class, JS_LIBRARY_STRATEGIES_FIELD); @@ -65,6 +71,14 @@ void jsLibraryControllerRequestsUseDefaultClientCodecsWithTheHelperLimit() throw ClientCodecs.effectiveThroughWebClientBuildHelper(declared), ClientCodecs.WEB_CLIENT_BUILD_HELPER_DEFAULT_SIZE); } + @BoundarySites({"lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.EXCHANGE_STRATEGIES#codecs#1", + "lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java##import#1"}) + @Test + void marketplaceRenderClientUsesDefaultClientCodecsWithTwoMebibytes() throws ReflectiveOperationException { + ClientCodecs.assertDefaultClientCodecs("MarketplaceRenderClient", + (ExchangeStrategies) staticField(MarketplaceRenderClient.class, NODE_CLIENT_STRATEGIES_FIELD), 2 * 1024 * 1024); + } + @Test void datasourcePluginClientBareMapperIsUnconfigured() throws ReflectiveOperationException { ObjectMapper mapper = (ObjectMapper) staticField(DatasourcePluginClient.class, NODE_CLIENT_MAPPER_FIELD); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java index b0f27e843..4f09f6e9d 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java @@ -274,8 +274,9 @@ void flow(WireMockRuntimeInfo wireMock) throws JsonProcessingException { assertThat(sent.getMethod().value()).as("upstream method").isEqualTo(sample.method().toUpperCase()); assertThat(sent.getUrl()).as("upstream path").isEqualTo("/" + sample.path()); sample.headers().forEach((name, value) -> assertThat(sent.getHeader(name)).as("upstream header " + name).isEqualTo(value)); + // Spring 7's string encoder writes the charset parameter in lower case; media type parameters are case-insensitive assertThat(sent.getHeader(HttpHeaders.CONTENT_TYPE)).as("upstream Content-Type of the String body") - .isEqualTo(MediaType.TEXT_PLAIN_VALUE + ";charset=UTF-8"); + .isEqualTo(MediaType.TEXT_PLAIN_VALUE + ";charset=utf-8"); CanonicalJson.assertEquivalent(d1Data(), sent.getBodyAsString()); EndpointContract.assertBytes(result, HttpStatus.OK, TEXT_PLAIN_UTF8, UPSTREAM_ANSWER.getBytes(StandardCharsets.UTF_8)); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApplicationHistorySnapshotEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApplicationHistorySnapshotEndpointsContractTest.java index 1f6280473..960bb0933 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApplicationHistorySnapshotEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApplicationHistorySnapshotEndpointsContractTest.java @@ -159,10 +159,10 @@ void listAllHistorySnapshotBriefInfoArchived() { /** * Without query parameters (plan §9 O16): the page and size defaults are the controller's ({@code "1"}, so page 1, - * {@code PageRequest} page 0; the interface's {@code "0"} would fail {@code Pagination#check}), and the filters reach - * the service as {@code null} although the controller declares them required: Spring adds the interface's parameter - * annotations that the controller's parameter lacks, among them {@code @Nullable}, which makes the parameter - * optional. Not a response branch of the controller: the list is empty, so no user is looked up. + * {@code PageRequest} page 0; the interface's {@code "0"} would fail {@code Pagination#check}), and the filters are + * optional, as the interface declares them, and reach the service as {@code null}: the controller's parameters say + * {@code required = false} themselves, because Spring does not take {@code @Nullable} over from the interface's + * parameters. Not a response branch of the controller: the list is empty, so no user is looked up. */ @Test void listAllHistorySnapshotBriefInfoWithoutQueryParameters() { diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/AssetEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/AssetEndpointsContractTest.java index 380e50f6f..2e7ee1919 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/AssetEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/AssetEndpointsContractTest.java @@ -69,7 +69,7 @@ void getByIdOfAnUnknownAssetIsA404WithoutTheCacheHeaderBF129() { EntityExchangeResult result = getAsset(Mono.empty()); EndpointContract.assertEmptyResponse(result, HttpStatus.NOT_FOUND, null); - assertThat(result.getResponseHeaders().containsKey(HttpHeaders.CACHE_CONTROL)).isFalse(); + assertThat(result.getResponseHeaders().containsHeader(HttpHeaders.CACHE_CONTROL)).isFalse(); } /** Catches: an error answer that carries the 90-day immutable cache header. */ @@ -78,7 +78,7 @@ void getByIdWhoseReadFailsIsA500WithoutTheCacheHeaderBF129() { EntityExchangeResult result = getAsset(Mono.error(new IllegalStateException(READ_FAILURE))); EndpointContract.assertBizError(result, BizError.INTERNAL_SERVER_ERROR, BizError.INTERNAL_SERVER_ERROR.name()); - assertThat(result.getResponseHeaders().containsKey(HttpHeaders.CACHE_CONTROL)).isFalse(); + assertThat(result.getResponseHeaders().containsHeader(HttpHeaders.CACHE_CONTROL)).isFalse(); } /** GET of {@link #ASSET_ID} with the real service reading {@code stored} from the repository. */ diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/ContractTestClient.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/ContractTestClient.java index 9ed6f9b9d..733d231bf 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/ContractTestClient.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/ContractTestClient.java @@ -18,10 +18,9 @@ import org.lowcoder.sdk.util.CookieHelper; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.WebProperties; -import org.springframework.boot.web.reactive.error.DefaultErrorAttributes; -import org.springframework.boot.web.reactive.error.ErrorAttributes; +import org.springframework.boot.webflux.error.DefaultErrorAttributes; +import org.springframework.boot.webflux.error.ErrorAttributes; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.core.env.MapPropertySource; import org.springframework.test.web.reactive.server.WebTestClient; @@ -56,7 +55,7 @@ * {@link CookieHelper}, which a test may replace through {@link Builder#mock} or {@link Builder#singleton}; * the visitor is {@link Authentication#ANONYMOUS_USER_ID} unless {@link Builder#visitor} sets one; *

  • the production {@link CustomErrorWebExceptionHandler} with {@link DefaultErrorAttributes}, - * {@link WebProperties.Resources} and {@link ServerProperties} (E9);
  • + * {@link WebProperties.Resources} and {@link WebProperties} (E9); *
  • the production {@link PluginConfiguration} route, with mocks named {@value #PLUGIN_MANAGER_BEAN_NAME} (its * {@code @DependsOn}) and {@value #PLUGIN_ENDPOINT_HANDLER_BEAN_NAME} that registers no plugin endpoint (E10).
  • * @@ -215,7 +214,7 @@ public ContractTestClient build() { singletons.forEach(context.getBeanFactory()::registerSingleton); context.registerBean(ErrorAttributes.class, DefaultErrorAttributes::new); context.registerBean(WebProperties.Resources.class, WebProperties.Resources::new); - context.registerBean(ServerProperties.class, ServerProperties::new); + context.registerBean(WebProperties.class, WebProperties::new); for (int i = 0; i < webFilters.size(); i++) { WebFilter filter = webFilters.get(i); context.registerBean("testWebFilter" + i, WebFilter.class, () -> filter); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/StoredValues.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/StoredValues.java index 1c8ef5acd..91468f85e 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/StoredValues.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/StoredValues.java @@ -7,13 +7,13 @@ import org.springframework.data.mongodb.core.convert.NoOpDbRefResolver; import org.springframework.data.mongodb.core.mapping.MongoMappingContext; -import java.util.List; import java.util.Map; /** * Values as the store gives them back (docs/API_PAYLOAD_TEST_PLAN.md §9 O19): written into a document by Spring - * Data's {@link MappingMongoConverter} and read back, the converter built as Spring Boot builds it (an empty - * {@link MongoCustomConversions}) with the map-key dot replacement that {@code MongoConfig#init} sets. Limit: the + * Data's {@link MappingMongoConverter} and read back, the converter built as Spring Boot builds it (no custom + * converters, {@code spring.data.mongodb.representation.big-decimal: string} as the application's {@code application.yaml} + * sets it) with the map-key dot replacement that {@code MongoConfig#init} sets. Limit: the * database driver's encoding between write and read is not run. */ public final class StoredValues { @@ -26,7 +26,8 @@ private StoredValues() { /** {@code dsl} as a record's or an application's DSL read from the store holds it. */ public static Map dsl(Map dsl) { - MongoCustomConversions conversions = new MongoCustomConversions(List.of()); + MongoCustomConversions conversions = MongoCustomConversions.create( + configurer -> configurer.bigDecimal(MongoCustomConversions.BigDecimalRepresentation.STRING)); MongoMappingContext context = new MongoMappingContext(); context.setSimpleTypeHolder(conversions.getSimpleTypeHolder()); context.afterPropertiesSet(); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandlerTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandlerTest.java index ef9f79a32..4b20648c8 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandlerTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandlerTest.java @@ -21,9 +21,8 @@ import org.lowcoder.sdk.exception.BizException; import org.lowcoder.sdk.util.LocaleUtils; import org.springframework.beans.factory.ObjectProvider; -import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.WebProperties; -import org.springframework.boot.web.reactive.error.DefaultErrorAttributes; +import org.springframework.boot.webflux.error.DefaultErrorAttributes; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.HttpHeaders; @@ -80,7 +79,7 @@ void setUp() { apiPerfHelper = mock(ApiPerfHelper.class); ObjectProvider viewResolvers = mock(ObjectProvider.class); when(viewResolvers.orderedStream()).thenAnswer(invocation -> Stream.empty()); - handler = new CustomErrorWebExceptionHandler(new DefaultErrorAttributes(), new WebProperties.Resources(), new ServerProperties(), + handler = new CustomErrorWebExceptionHandler(new DefaultErrorAttributes(), new WebProperties.Resources(), new WebProperties(), new StaticApplicationContext(), viewResolvers, ServerCodecConfigurer.create()); ReflectionTestUtils.setField(handler, "apiPerfHelper", apiPerfHelper); ReflectionTestUtils.setField(handler, "globalContextService", new GlobalContextServiceImpl()); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/GlobalExceptionHandlerTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/GlobalExceptionHandlerTest.java index ac4d39c18..46f54a499 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/GlobalExceptionHandlerTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/GlobalExceptionHandlerTest.java @@ -137,7 +137,7 @@ void bizException_withoutHeaders_addsNone() { body(handler.catchBizException(new BizException(BizError.USER_BANNED, "USER_BANNED"), exchange), Locale.ENGLISH); - assertThat(exchange.getResponse().getHeaders()).doesNotContainKey("X-ORG-ID"); + assertThat(exchange.getResponse().getHeaders().containsHeader("X-ORG-ID")).as("X-ORG-ID header on the error response").isFalse(); assertThat(exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/filter/RefererFilterChainTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/filter/RefererFilterChainTest.java index 5887328ee..3d1572c3b 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/filter/RefererFilterChainTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/filter/RefererFilterChainTest.java @@ -26,9 +26,8 @@ import org.lowcoder.sdk.constants.Authentication; import org.lowcoder.sdk.util.CookieHelper; import org.springframework.beans.factory.ObjectProvider; -import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.WebProperties; -import org.springframework.boot.web.reactive.error.DefaultErrorAttributes; +import org.springframework.boot.webflux.error.DefaultErrorAttributes; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.HttpHeaders; @@ -91,7 +90,7 @@ void setUp() { ObjectProvider viewResolvers = mock(ObjectProvider.class); when(viewResolvers.orderedStream()).thenAnswer(invocation -> Stream.empty()); CustomErrorWebExceptionHandler errorHandler = new CustomErrorWebExceptionHandler(new DefaultErrorAttributes(), - new WebProperties.Resources(), new ServerProperties(), new StaticApplicationContext(), viewResolvers, + new WebProperties.Resources(), new WebProperties(), new StaticApplicationContext(), viewResolvers, ServerCodecConfigurer.create()); ReflectionTestUtils.setField(errorHandler, "apiPerfHelper", mock(ApiPerfHelper.class)); ReflectionTestUtils.setField(errorHandler, "globalContextService", new GlobalContextServiceImpl()); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/plugin/security/PluginAuthorizationManagerTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/plugin/security/PluginAuthorizationManagerTest.java index 0da26744d..c98acec6f 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/plugin/security/PluginAuthorizationManagerTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/plugin/security/PluginAuthorizationManagerTest.java @@ -11,7 +11,7 @@ import org.lowcoder.plugin.api.EndpointExtension; import org.lowcoder.plugin.api.PluginEndpoint; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.authorization.AuthorizationDecision; +import org.springframework.security.authorization.AuthorizationResult; import org.springframework.security.core.Authentication; import org.springframework.security.core.authority.SimpleGrantedAuthority; @@ -89,8 +89,8 @@ private static Mono user(String... roles) { List.of(roles).stream().map(SimpleGrantedAuthority::new).toList())); } - private Mono check(String authorize, Mono auth) { - return manager.check(auth, invocation(extension(authorize))); + private Mono check(String authorize, Mono auth) { + return manager.authorize(auth, invocation(extension(authorize))); } /** Catches an endpoint without an expression being evaluated (the erroring authentication would fail it). */ @@ -99,17 +99,17 @@ void check_missingOrBlankExpression_grantsWithoutEvaluating() { Mono failing = Mono.error(new IllegalStateException("must not be read")); for (String authorize : new String[]{null, "", " "}) { - StepVerifier.create(check(authorize, failing)).expectNextMatches(AuthorizationDecision::isGranted).verifyComplete(); + StepVerifier.create(check(authorize, failing)).expectNextMatches(AuthorizationResult::isGranted).verifyComplete(); } - StepVerifier.create(manager.check(failing, invocation(null))).expectNextMatches(AuthorizationDecision::isGranted).verifyComplete(); + StepVerifier.create(manager.authorize(failing, invocation(null))).expectNextMatches(AuthorizationResult::isGranted).verifyComplete(); System.out.println("[PluginAuthorizationManagerTest] null/blank expression and null extension granted"); } /** Catches roles being ignored or inverted. */ @Test void check_roleExpressions_decideByTheAuthorities() { - StepVerifier.create(check("isAuthenticated()", user("ROLE_USER"))).expectNextMatches(AuthorizationDecision::isGranted).verifyComplete(); - StepVerifier.create(check("hasRole('USER')", user("ROLE_USER"))).expectNextMatches(AuthorizationDecision::isGranted).verifyComplete(); + StepVerifier.create(check("isAuthenticated()", user("ROLE_USER"))).expectNextMatches(AuthorizationResult::isGranted).verifyComplete(); + StepVerifier.create(check("hasRole('USER')", user("ROLE_USER"))).expectNextMatches(AuthorizationResult::isGranted).verifyComplete(); StepVerifier.create(check("hasRole('ADMIN')", user("ROLE_USER"))).expectNextMatches(d -> !d.isGranted()).verifyComplete(); System.out.println("[PluginAuthorizationManagerTest] role expressions decided by authorities"); } @@ -117,7 +117,7 @@ void check_roleExpressions_decideByTheAuthorities() { /** Catches a Mono-valued expression not being unwrapped (true and false both). */ @Test void check_monoBooleanExpression_isUnwrapped() { - StepVerifier.create(check("T(reactor.core.publisher.Mono).just(true)", user())).expectNextMatches(AuthorizationDecision::isGranted).verifyComplete(); + StepVerifier.create(check("T(reactor.core.publisher.Mono).just(true)", user())).expectNextMatches(AuthorizationResult::isGranted).verifyComplete(); StepVerifier.create(check("T(reactor.core.publisher.Mono).just(false)", user())).expectNextMatches(d -> !d.isGranted()).verifyComplete(); System.out.println("[PluginAuthorizationManagerTest] Mono unwrapped"); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/EnterpriseLicenseControllerTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/EnterpriseLicenseControllerTest.java index e8691970e..791ba6706 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/EnterpriseLicenseControllerTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/EnterpriseLicenseControllerTest.java @@ -4,10 +4,9 @@ import org.lowcoder.api.home.SessionUserService; import org.lowcoder.domain.enterprise.EnterpriseLicenseCapabilityService; import org.lowcoder.domain.enterprise.EnterpriseLicenseCapabilityService.PurchaseState; -import org.lowcoder.api.framework.exception.GlobalExceptionHandler; -import org.lowcoder.api.framework.exception.ApiPerfHelper; +import org.lowcoder.api.contract.support.ContractHarness; +import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.web.reactive.config.DelegatingWebFluxConfiguration; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.web.reactive.function.client.WebClientResponseException; import org.springframework.http.HttpHeaders; @@ -39,14 +38,13 @@ JsonNode relayResult() { JsonNode emptyLibrary() { return mapper.valueToTree(Map.of("success", true, "orders", List.of(), "licenses", List.of())); } final List contexts = new ArrayList<>(); WebTestClient webClient() { - var context = new AnnotationConfigApplicationContext(); + // the production server codecs: the request body is a Jackson 2 JsonNode + var context = ContractHarness.codecContext(); contexts.add(context); - context.register(DelegatingWebFluxConfiguration.class); context.registerBean(EnterpriseLicenseController.class, () -> controller); - context.getBeanFactory().registerSingleton("apiPerfHelper", mock(ApiPerfHelper.class)); - context.registerBean(GlobalExceptionHandler.class); context.refresh(); - return WebTestClient.bindToApplicationContext(context).build(); + // the request body is a Jackson 2 JsonNode, which the default client codecs (Jackson 3) would not write as its content + return WebTestClient.bindToApplicationContext(context).configureClient().codecs(Jackson2ClientCodecs::apply).build(); } @AfterEach void closeContexts() { contexts.forEach(AnnotationConfigApplicationContext::close); } @BeforeEach void setup() { diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/WorkspaceSeatSyncServiceTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/WorkspaceSeatSyncServiceTest.java index 16d71f768..52a753699 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/WorkspaceSeatSyncServiceTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/WorkspaceSeatSyncServiceTest.java @@ -13,6 +13,7 @@ import org.springframework.web.server.ResponseStatusException; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import java.time.Duration; import java.util.Map; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.*; @@ -29,7 +30,7 @@ class WorkspaceSeatSyncServiceTest { service = spy(new WorkspaceSeatSyncService(sessions, seats, redis, config, "server-only-test-token", "https://flow.lowcoder.cloud/webhook/secure/sync-workspace-seats")); when(sessions.getVisitorOrgMember()).thenReturn(Mono.just(new OrgMember("workspace", "user", MemberRole.ADMIN, "normal", 0))); when(config.deployment().ofString("id", "").get()).thenReturn("host"); - when(redis.opsForValue().setIfAbsent(anyString(), anyString(), any())).thenReturn(Mono.just(true)); + when(redis.opsForValue().setIfAbsent(anyString(), anyString(), any(Duration.class))).thenReturn(Mono.just(true)); when(redis.execute(any(), anyList(), anyList())).thenReturn(Flux.just(1L)); when(seats.count("workspace")).thenReturn(Mono.just(3)); } @@ -75,7 +76,7 @@ class WorkspaceSeatSyncServiceTest { } @Test void overlappingClientRequestDoesNotReachStripe() { - when(redis.opsForValue().setIfAbsent(anyString(), anyString(), any())).thenReturn(Mono.just(false)); + when(redis.opsForValue().setIfAbsent(anyString(), anyString(), any(Duration.class))).thenReturn(Mono.just(false)); assertThrows(ResponseStatusException.class, () -> service.synchronize("workspace").block()); verify(service, never()).send(anyMap()); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/infra/InfraMongoTestConfiguration.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/infra/InfraMongoTestConfiguration.java index e7a6f8035..efb828fd3 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/infra/InfraMongoTestConfiguration.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/infra/InfraMongoTestConfiguration.java @@ -7,9 +7,9 @@ import org.lowcoder.infra.mongo.MongoUpsertHelper; import org.lowcoder.sdk.event.BeforeSaveEvent; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; -import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration; -import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration; -import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveRepositoriesAutoConfiguration; +import org.springframework.boot.mongodb.autoconfigure.MongoReactiveAutoConfiguration; +import org.springframework.boot.data.mongodb.autoconfigure.DataMongoReactiveAutoConfiguration; +import org.springframework.boot.data.mongodb.autoconfigure.DataMongoReactiveRepositoriesAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.context.event.EventListener; @@ -28,8 +28,8 @@ * class to the full-application tests. A class passed in {@code @SpringBootTest(classes=...)} is processed as a lite * configuration (its {@code @Import}, {@code @Enable...} and {@code @Bean} methods), which is all this needs. */ -@ImportAutoConfiguration({MongoReactiveAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class, - MongoReactiveRepositoriesAutoConfiguration.class}) +@ImportAutoConfiguration({MongoReactiveAutoConfiguration.class, DataMongoReactiveAutoConfiguration.class, + DataMongoReactiveRepositoriesAutoConfiguration.class}) @org.springframework.data.mongodb.repository.config.EnableReactiveMongoRepositories(basePackages = "org.lowcoder.infra.birelation") @EnableReactiveMongoAuditing @Import({MongoUpsertHelper.class, BiRelationServiceImpl.class}) diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/infra/mongo/MongoBigNumberStorageTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/infra/mongo/MongoBigNumberStorageTest.java new file mode 100644 index 000000000..f3ed0f7cd --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/infra/mongo/MongoBigNumberStorageTest.java @@ -0,0 +1,56 @@ +package org.lowcoder.infra.mongo; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.Duration; +import java.util.UUID; + +import org.bson.Document; +import org.junit.jupiter.api.Test; +import org.lowcoder.infra.InfraMongoTestConfiguration; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.data.mongodb.core.ReactiveMongoTemplate; +import org.springframework.test.context.ActiveProfiles; + +/** + * How the application's converter stores a {@link BigInteger} and a {@link BigDecimal}, against a real MongoDB (the context + * and database of {@link InfraMongoTestConfiguration}, which reads the application's {@code application.yaml}). They have + * always been stored as strings, and documents written by earlier releases hold strings; Spring Data MongoDB 5 would write + * them as BSON decimals unless {@code spring.data.mongodb.representation.big-decimal} says {@code string}. A stored + * {@code Decimal128} would also reach the API as a JSON number where a string was returned, so the format is pinned here. + */ +@SpringBootTest(classes = InfraMongoTestConfiguration.class) +@ActiveProfiles(InfraMongoTestConfiguration.PROFILE) +class MongoBigNumberStorageTest { + + private static final Duration TIMEOUT = Duration.ofSeconds(20); + private static final String COLLECTION_PREFIX = "bigNumberStorage_"; + private static final BigInteger BEYOND_LONG = new BigInteger("9223372036854775808"); + private static final BigDecimal DECIMAL = new BigDecimal("12345678901234567890.125"); + + @Autowired + private ReactiveMongoTemplate template; + + /** Holder of the two values, written by the application's converter. */ + private record Amounts(String id, BigInteger beyondLong, BigDecimal decimal) { + } + + /** Catches the converter writing BSON decimals or numbers: both values must be stored as their decimal text. */ + @Test + void bigIntegerAndBigDecimalAreStoredAsStrings() { + String collection = COLLECTION_PREFIX + UUID.randomUUID(); + Amounts amounts = new Amounts("amounts", BEYOND_LONG, DECIMAL); + + template.save(amounts, collection).block(TIMEOUT); + Document stored = template.findAll(Document.class, collection).blockFirst(TIMEOUT); + template.dropCollection(collection).block(TIMEOUT); + + System.out.println("[MongoBigNumberStorageTest] stored document " + stored + " beyondLong " + + stored.get("beyondLong").getClass().getName() + " decimal " + stored.get("decimal").getClass().getName()); + assertThat(stored.get("beyondLong")).as("BigInteger beyond the long range as stored").isEqualTo(BEYOND_LONG.toString()); + assertThat(stored.get("decimal")).as("BigDecimal as stored").isEqualTo(DECIMAL.toString()); + } +} diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv b/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv index 182f5f5e9..5483367f0 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv @@ -19,12 +19,12 @@ lowcoder-plugins/googleSheetsPlugin/src/main/java/org/lowcoder/plugin/googleshee lowcoder-plugins/googleSheetsPlugin/src/main/java/org/lowcoder/plugin/googlesheets/model/GoogleSheetsDatasourceConfig.java:30 fromJson test:config-binding lowcoder-plugins/googleSheetsPlugin/src/main/java/org/lowcoder/plugin/googlesheets/model/GoogleSheetsDatasourceConfig.java#GoogleSheetsDatasourceConfig.buildFrom#fromJson#1 lowcoder-plugins/googleSheetsPlugin/src/main/java/org/lowcoder/plugin/googlesheets/model/GoogleSheetsDatasourceConfig.java:30 toJson test:config-binding lowcoder-plugins/googleSheetsPlugin/src/main/java/org/lowcoder/plugin/googlesheets/model/GoogleSheetsDatasourceConfig.java#GoogleSheetsDatasourceConfig.buildFrom#toJson#1 lowcoder-plugins/googleSheetsPlugin/src/main/java/org/lowcoder/plugin/googlesheets/model/ServiceAccountJsonUtils.java:23 fromJsonMap test:external-json service-account key JSON from the datasource config lowcoder-plugins/googleSheetsPlugin/src/main/java/org/lowcoder/plugin/googlesheets/model/ServiceAccountJsonUtils.java#ServiceAccountJsonUtils.getData#fromJsonMap#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:281 toEntity not-jackson toEntity(byte[].class): raw bytes lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.executeQuery#toEntity#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:386 toJsonThrows test:header-json lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.parseExecuteResultHeaders#toJsonThrows#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:393 readTree test:header-json lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.parseExecuteResultHeaders#readTree#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:404 readTree test:external-json lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.parseResponseDataInfo#readTree#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:446 BodyInserters.fromValue not-jackson byte[] body lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.buildBodyInserter#BodyInserters.fromValue#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:448 BodyInserters.fromValue test:downstream-encode Map{query, variables: JsonNode} from GraphQLBodyUtils.convertToGraphQLBody, encoded by the plugin client codecs (GraphQLExecutor.java:88-91) lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.buildBodyInserter#BodyInserters.fromValue#2 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:365 toEntity not-jackson toEntity(byte[].class): raw bytes lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.httpCall#toEntity#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:395 toJsonThrows test:header-json lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.parseExecuteResultHeaders#toJsonThrows#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:402 readTree test:header-json lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.parseExecuteResultHeaders#readTree#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:413 readTree test:external-json lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.parseResponseDataInfo#readTree#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:455 BodyInserters.fromValue not-jackson byte[] body lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.buildBodyInserter#BodyInserters.fromValue#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:457 BodyInserters.fromValue test:downstream-encode Map{query, variables: JsonNode} from GraphQLBodyUtils.convertToGraphQLBody, encoded by the plugin client codecs (GraphQLExecutor.java:90-96) lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.buildBodyInserter#BodyInserters.fromValue#2 lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryConfig.java:49 fromJson test:config-binding lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryConfig.java#GraphQLQueryConfig.from#fromJson#1 lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryConfig.java:49 toJson test:config-binding lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryConfig.java#GraphQLQueryConfig.from#toJson#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java:138 toJson not-jackson org.bson.Document#toJson lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java#MongoPlugin.MongoEngine.executeQuery#toJson#1 @@ -51,15 +51,15 @@ lowcoder-plugins/postgresPlugin/src/main/java/org/lowcoder/plugin/postgres/model lowcoder-plugins/postgresPlugin/src/main/java/org/lowcoder/plugin/postgres/utils/PostgresResultParser.java:231 readTree test:external-json JSON column values lowcoder-plugins/postgresPlugin/src/main/java/org/lowcoder/plugin/postgres/utils/PostgresResultParser.java#PostgresResultParser.parseValue#readTree#1 lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/model/RedisDatasourceConfig.java:39 fromJson test:config-binding lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/model/RedisDatasourceConfig.java#RedisDatasourceConfig.buildFrom#fromJson#1 lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/model/RedisDatasourceConfig.java:39 toJson test:config-binding lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/model/RedisDatasourceConfig.java#RedisDatasourceConfig.buildFrom#toJson#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:329 toEntity not-jackson toEntity(byte[].class): raw bytes lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.httpCall#toEntity#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:404 readTree test:external-json lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.parseResponseDataInfo#readTree#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:436 toJsonThrows test:header-json lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.parseExecuteResultHeaders#toJsonThrows#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:443 readTree test:header-json lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.parseExecuteResultHeaders#readTree#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:497 BodyInserters.fromValue not-jackson byte[] body lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:502 BodyInserters.fromValue not-jackson byte[] body lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#2 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:506 BodyInserters.fromValue test:tree-text body text is JsonNode#toString of the special-JSON QueryBody (:169), written by Jackson's internal default mapper lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#3 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:510 BodyInserters.fromValue test:downstream-encode JsonNode body encoded by the plugin client codecs (RestApiExecutor.java:102-105) lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#4 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:517 BodyInserters.fromValue not-jackson String body: QueryBody value is a String when not JSON (QueryBody.java:5-8, RestApiExecutor.java:171) lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#5 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:334 toEntity not-jackson toEntity(byte[].class): raw bytes lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.httpCall#toEntity#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:409 readTree test:external-json lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.parseResponseDataInfo#readTree#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:441 toJsonThrows test:header-json lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.parseExecuteResultHeaders#toJsonThrows#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:448 readTree test:header-json lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.parseExecuteResultHeaders#readTree#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:502 BodyInserters.fromValue not-jackson byte[] body lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:507 BodyInserters.fromValue not-jackson byte[] body lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#2 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:511 BodyInserters.fromValue test:tree-text body text is JsonNode#toString of the special-JSON QueryBody (:174), written by Jackson's internal default mapper lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#3 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:515 BodyInserters.fromValue test:downstream-encode JsonNode body encoded by the plugin client codecs (RestApiExecutor.java:104-110) lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#4 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:522 BodyInserters.fromValue not-jackson String body: QueryBody value is a String when not JSON (QueryBody.java:5-8, RestApiExecutor.java:176) lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildBodyInserter#BodyInserters.fromValue#5 lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/RestApiQueryConfig.java:52 fromJson test:config-binding lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/RestApiQueryConfig.java#RestApiQueryConfig.from#fromJson#1 lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/RestApiQueryConfig.java:52 toJson test:config-binding lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/RestApiQueryConfig.java#RestApiQueryConfig.from#toJson#1 lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/RestApiQueryConfig.java:54 toJson log lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/RestApiQueryConfig.java#RestApiQueryConfig.from#toJson#2 @@ -117,17 +117,17 @@ lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/Organizatio lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java:33 toJsonSafely test:payload-getters lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java#OrganizationDomain.beforeMongodbWrite#toJsonSafely#1 lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java:38 fromJsonSafely test:payload-getters lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java#OrganizationDomain.afterMongodbRead#fromJsonSafely#1 lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java:38 toJson test:payload-getters lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java#OrganizationDomain.afterMongodbRead#toJson#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:61 new ObjectMapper test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.OBJECT_MAPPER#new ObjectMapper#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:81 bodyValue test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.getPluginDynamicConfig#bodyValue#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:84 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.getPluginDynamicConfig#bodyToMono#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:111 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.getDatasourcePluginDefinitions#bodyToMono#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:138 writeValueAsString test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.executeQuery#writeValueAsString#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:155 bodyValue test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.executeQuery#bodyValue#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:158 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.executeQuery#bodyToMono#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:162 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.executeQuery#bodyToMono#2 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:180 bodyValue test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.test#bodyValue#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:183 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.test#bodyToMono#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:191 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.test#bodyToMono#2 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:65 new ObjectMapper test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.OBJECT_MAPPER#new ObjectMapper#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:85 bodyValue test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.getPluginDynamicConfig#bodyValue#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:88 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.getPluginDynamicConfig#bodyToMono#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:115 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.getDatasourcePluginDefinitions#bodyToMono#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:142 writeValueAsString test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.executeQuery#writeValueAsString#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:159 bodyValue test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.executeQuery#bodyValue#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:162 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.executeQuery#bodyToMono#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:166 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.executeQuery#bodyToMono#2 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:184 bodyValue test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.test#bodyValue#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:187 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.test#bodyToMono#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:195 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.test#bodyToMono#2 lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQuery.java:33 fromJson test:payload-getters lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQuery.java#LibraryQuery.baseQuerySupplier#fromJson#1 lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQuery.java:33 toJson test:payload-getters lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQuery.java#LibraryQuery.baseQuerySupplier#toJson#1 lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQueryRecord.java:37 fromJson test:payload-getters lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQueryRecord.java#LibraryQueryRecord.baseQuerySupplier#fromJson#1 @@ -150,11 +150,11 @@ lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceI lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java:66 fromJsonMap test:config-center config-center value parsed from JSON text lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java#AutoReloadConfigInstanceImpl.ofMap#fromJsonMap#1 lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java:71 fromJson test:config-center config-center value parsed from JSON text lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java#AutoReloadConfigInstanceImpl.fromJson#fromJson#1 lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java:76 fromJsonList test:config-center config-center value parsed from JSON text lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java#AutoReloadConfigInstanceImpl.fromJsonList#fromJsonList#1 -lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java:33 toJson log lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java#NetworkUtils.getRemoteIp#toJson#1 +lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java:34 toJson log lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java#NetworkUtils.getRemoteIp#toJson#1 lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java:34 new ObjectMapper test:marketplace-render the snapshot mapper, ORDER_MAP_ENTRIES_BY_KEYS: the layout text and its hash do not depend on map order lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java#MarketplacePreviewWorker.JSON#new ObjectMapper#1 lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java:115 writeValueAsString test:marketplace-render layout snapshot of maps, lists and scalars from the stored DSL (staticDsl, :124-141), hashed with the render version (:116-117) and sent as the render payload lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java#MarketplacePreviewWorker.snapshotOf#writeValueAsString#1 -lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:41 bodyValue test:marketplace-render Map.of of the Long timestamp and two Strings (payload, signature); default client codecs (:21-22) lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.render#bodyValue#1 -lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:42 bodyToMono not-jackson byte[] response, decoded by the byte-array decoder, not Jackson lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.render#bodyToMono#1 +lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:49 bodyValue test:marketplace-render Map.of of the Long timestamp and two Strings (payload, signature); default client codecs (:23-28) lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.render#bodyValue#1 +lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:50 bodyToMono not-jackson byte[] response, decoded by the byte-array decoder, not Jackson lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.render#bodyToMono#1 lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/AbstractOauth2Request.java:36 toJson log lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/AbstractOauth2Request.java#AbstractOauth2Request.auth#toJson#1 lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/GenericAuthRequest.java:50 bodyToMono test:oauth provider JSON decoded by WebClientBuildHelper client codecs (E8) lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/GenericAuthRequest.java#GenericAuthRequest.getAuthToken#bodyToMono#1 lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/GenericAuthRequest.java:53 toJson test:error-message-json AuthException message; becomes a FAIL_TO_GET_OIDC_INFO argument (AbstractOauth2Request.java:35-37) lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/GenericAuthRequest.java#GenericAuthRequest.getAuthToken#toJson#1 @@ -190,37 +190,42 @@ lowcoder-server/src/main/java/org/lowcoder/api/datasource/UpsertDatasourceReques lowcoder-server/src/main/java/org/lowcoder/api/datasource/UpsertDatasourceRequestMapper.java:43 toJson test:upsert-datasource lowcoder-server/src/main/java/org/lowcoder/api/datasource/UpsertDatasourceRequestMapper.java#UpsertDatasourceRequestMapper.resolve#toJson#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java:85 BodyInserters.fromValue test:error-handler lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java#CustomErrorWebExceptionHandler.render#BodyInserters.fromValue#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java:103 BodyInserters.fromValue test:error-handler lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java#CustomErrorWebExceptionHandler.render#BodyInserters.fromValue#2 -lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java:50 bodyToMono not-jackson byte[] request body lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java#PluginServerRequest.fromServerRequest#bodyToMono#1 +lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java:51 bodyToMono not-jackson byte[] request body lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java#PluginServerRequest.fromServerRequest#bodyToMono#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/endpoint/PluginEndpointHandlerImpl.java:279 bodyValue not-jackson byte[] plugin response body (EndpointResponse.body()) lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/endpoint/PluginEndpointHandlerImpl.java#PluginEndpointHandlerImpl.createServerResponse#bodyValue#1 lowcoder-server/src/main/java/org/lowcoder/api/home/SessionUserServiceImpl.java:141 fromJsonQuietly test:session-cache legacy User JSON or a plain user id; fromJsonQuietly must return null for the latter lowcoder-server/src/main/java/org/lowcoder/api/home/SessionUserServiceImpl.java#SessionUserServiceImpl.resolveSessionUserFromCookie#fromJsonQuietly#1 lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:82 new ObjectMapper test:api-flow lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#new ObjectMapper#1 lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:83 writeValueAsString test:api-flow lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#writeValueAsString#1 lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:90 BodyInserters.fromValue not-jackson String body (already serialized at :83) lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#BodyInserters.fromValue#1 lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:93 bodyToMono not-jackson String response lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#bodyToMono#1 -lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:75 fromJsonSafely test:js-library lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.#fromJsonSafely#1 -lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:91 toJson log lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.#toJson#1 -lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:157 bodyToMono test:js-library lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.fetch#bodyToMono#1 +lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:79 fromJsonSafely test:js-library lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.#fromJsonSafely#1 +lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:95 toJson log lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.#toJson#1 +lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:161 bodyToMono test:js-library lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.fetch#bodyToMono#1 lowcoder-server/src/main/java/org/lowcoder/api/npm/PrivateNpmRegistryController.java:77 BodyInserters.fromValue test:npm-outbound lowcoder-server/src/main/java/org/lowcoder/api/npm/PrivateNpmRegistryController.java#PrivateNpmRegistryController.forwardToNodeService#BodyInserters.fromValue#1 lowcoder-server/src/main/java/org/lowcoder/api/npm/PrivateNpmRegistryController.java:79 toEntity not-jackson Resource bytes lowcoder-server/src/main/java/org/lowcoder/api/npm/PrivateNpmRegistryController.java#PrivateNpmRegistryController.forwardToNodeService#toEntity#1 lowcoder-server/src/main/java/org/lowcoder/api/npm/PrivateNpmRegistryController.java:96 BodyInserters.fromValue test:npm-outbound lowcoder-server/src/main/java/org/lowcoder/api/npm/PrivateNpmRegistryController.java#PrivateNpmRegistryController.forwardToNodeService#BodyInserters.fromValue#2 lowcoder-server/src/main/java/org/lowcoder/api/npm/PrivateNpmRegistryController.java:97 toEntity not-jackson Resource bytes lowcoder-server/src/main/java/org/lowcoder/api/npm/PrivateNpmRegistryController.java#PrivateNpmRegistryController.forwardToNodeService#toEntity#2 -lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java:202 bodyValue test:subscription-relay payload map of strings, the Long issuedAt and, for checkout, request members as JsonNode (:84-87); default client codecs (WebClientBuildHelper.java:131-134) lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java#EnterpriseLicenseController.send#bodyValue#1 +lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java:202 bodyValue test:subscription-relay payload map of strings, the Long issuedAt and, for checkout, request members as JsonNode (:84-87); default client codecs (WebClientBuildHelper.java:131-136) lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java#EnterpriseLicenseController.send#bodyValue#1 lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java:202 bodyToMono test:subscription-relay relay answer as JsonNode, by the default client codecs; validated by relay (:153-163) and answered as the envelope's data by the server codec (:117) lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java#EnterpriseLicenseController.send#bodyToMono#1 lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java:83 bodyValue test:subscription-relay Map.of of strings, the Integer quantity and the Long issuedAt (:61-63); default client codecs lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java#WorkspaceSeatSyncService.send#bodyValue#1 lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java:83 bodyToMono test:subscription-relay relay answer as JsonNode, read with path(...).asBoolean/asText/asInt (:65-67) lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java#WorkspaceSeatSyncService.send#bodyToMono#1 lowcoder-server/src/main/java/org/lowcoder/runner/eventlistener/OrgAndGroupEventListener.java:71 toJson log lowcoder-server/src/main/java/org/lowcoder/runner/eventlistener/OrgAndGroupEventListener.java#OrgAndGroupEventListener.onOrgDeleted#toJson#1 lowcoder-server/src/main/java/org/lowcoder/runner/eventlistener/OrgAndGroupEventListener.java:157 toJson log lowcoder-server/src/main/java/org/lowcoder/runner/eventlistener/OrgAndGroupEventListener.java#OrgAndGroupEventListener.onGroupDeleted#toJson#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:90 codecs test:client-codec-guard default codecs, maxInMemorySize only lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.EXCHANGE_STRATEGIES#codecs#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:104 codecs test:client-codec-guard default codecs, maxInMemorySize only lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.exchangeStrategies#codecs#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java:132 codecs test:client-codec-guard default codecs, maxInMemorySize only lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java#WebClientBuildHelper.toWebClientBuilder#codecs#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:44 codecs test:client-codec-guard default codecs, maxInMemorySize only lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.EXCHANGE_STRATEGIES#codecs#1 -lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:64 codecs test:client-codec-guard default codecs, maxInMemorySize only lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.EXCHANGE_STRATEGY#codecs#1 -lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:21 codecs test:client-codec-guard default codecs, maxInMemorySize only (2 MiB, in effect as MarketplaceRenderContractTest#renderEnforcesItsDeclaredLimit shows) lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.client#codecs#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:92 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.EXCHANGE_STRATEGIES#codecs#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:106 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.exchangeStrategies#codecs#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java:132 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java#WebClientBuildHelper.toWebClientBuilder#codecs#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:45 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.EXCHANGE_STRATEGIES#codecs#1 +lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:65 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.EXCHANGE_STRATEGY#codecs#1 +lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:0 import test:client-codec-guard sha256=e272a285100971a9; imports Jackson2ClientCodecs, whose use is the listed codecs site lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:24 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize (2 MiB, in effect as MarketplaceRenderContractTest#renderEnforcesItsDeclaredLimit shows) lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.EXCHANGE_STRATEGIES#codecs#1 +lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:0 import test:client-codec-guard sha256=87625933b753d6d5; imports Jackson2ClientCodecs, whose use is the listed codecs site lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java:32 jackson2JsonEncoder test:client-codec-guard explicit Jackson 2 client codec, one per client slot lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java#Jackson2ClientCodecs.apply#jackson2JsonEncoder#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java:33 jackson2JsonDecoder test:client-codec-guard explicit Jackson 2 client codec, one per client slot lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java#Jackson2ClientCodecs.apply#jackson2JsonDecoder#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java:0 import test:client-codec-guard sha256=3b1d91bd170767cc; imports the Jackson 2 codec types it constructs; the only use is the two listed sites lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:34 getObjectMapper test:server-codec-guard production mapper bean for the server codecs lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.objectMapper#getObjectMapper#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:49 jackson2JsonDecoder test:server-codec-guard server decoder with the production mapper lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jackson2JsonDecoder#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:51 jackson2JsonEncoder test:server-codec-guard server encoder with the production mapper lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jackson2JsonEncoder#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java:0 import unreachable sha256=a8f23c404bf9f11b; only Jackson use is the never-read field at :71 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java##import#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:0 import test:node-service sha256=c94453e304c1445c; OBJECT_MAPPER (:61) is used only at :138, a listed site lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java##import#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:0 import test:node-service sha256=c3a7bd47e8d0cd8e; OBJECT_MAPPER (:65) is used only at :142, a listed site lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java:0 import test:jwt-claims sha256=5869011927b2fe4f; objectMapper (:9) is used only at :33, a listed site lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java:0 import test:marketplace-render sha256=fa0b872f2c0cea8b; the mapper of :34 is used only at :115, a listed site; SerializationFeature is its configuration lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:0 import test:server-codec-guard sha256=ecf32a99e3566ae1; Jackson uses are :34, :49, :51, all listed sites lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java##import#1 @@ -232,14 +237,14 @@ lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/req lowcoder-domain/src/main/java/org/lowcoder/domain/configurations/RedisConfig.java:0 import test:session-cache sha256=5cf1d318355bc001; the Jackson2JsonRedisSerializer bean (:22-27) is never injected: every ReactiveRedisTemplate injection point receives reactiveStringRedisTemplate (E12, docs/tools/redis-probe.out); session-cache asserts that wiring lowcoder-domain/src/main/java/org/lowcoder/domain/configurations/RedisConfig.java##import#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonParser.java:19 createParser not-jackson tv.twelvetone RJsonParserFactory#createParser (import RjsonParser.java:7, field :11), not Jackson lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonParser.java#RjsonParser.getJsonParser#createParser#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java:0 import test:tree-text sha256=1e233267739a881e; renderMustacheJsonString returns renderMustacheJson(...).toString() (:33), a JsonNode written by Jackson's internal default mapper; :94 and :179 call toString on an rjson JsonValue and on non-Number/Boolean param values, :127 textValue reads a node lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java##import#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:0 import test:tree-text sha256=6ddd44372f7b74e6; the special-JSON body is queryBody.getJsonValue().toString() (:506); other tree use builds ObjectNodes whose conversions are listed sites lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java##import#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:0 import test:tree-text sha256=76f021ca76899eae; the special-JSON body is queryBody.getJsonValue().toString() (:511); other tree use builds ObjectNodes whose conversions are listed sites lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java##import#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/utils/MongoQueryUtils.java:0 import test:tree-text sha256=d1e03c988e7b34fe; resultNode.toString() (:204) is re-read by the listed readTree at :204; the other toString calls (:158-202) are org.json JSONObject/JSONArray lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/utils/MongoQueryUtils.java##import#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:0 import tree-only sha256=ed09595a4676c041; the ObjectMapper field (:55, :63-64) is never read; renderMustacheJson nodes are navigated, asText only after isTextual (:203-212), and parseJsonBody's node is encoded at the listed RawHttpHandlerHelper.java:42; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none else lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java##import#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:0 import tree-only sha256=4c58b7c10217c6e9; ObjectNodes are built for headers and request params; their conversions are listed sites (header-json, codecs); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java##import#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:0 import tree-only sha256=3fe1a2f213b9500b; ObjectNodes are built for headers and request params; their conversions are listed sites (header-json, codecs); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java##import#1 lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryExecutionContext.java:0 import tree-only sha256=ca8494af6557abc9; holds variablesParams as a JsonNode (:31); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryExecutionContext.java##import#1 lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/utils/GraphQLBodyUtils.java:0 import tree-only sha256=ee5f8671e61ff22c; puts the variables JsonNode into the body map (:20-22), encoded by GraphQLExecutor's listed codec site; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/utils/GraphQLBodyUtils.java##import#1 lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/QueryBody.java:0 import tree-only sha256=78fab8baf8c11727; holds a JsonNode or String (:6-11); the JsonNode is written at RestApiExecutor.java:506 (tree-text); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/QueryBody.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java:0 import tree-only sha256=7de7af1d27feb18e; holds response headers as a JsonNode (:23, :75), serialized by the server codec with QueryResultView (WP5); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java:0 import tree-only sha256=e1475f77c404b933; holds response headers as a JsonNode (:34, :91), serialized by the server codec with QueryResultView (WP5); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java:0 import tree-only sha256=32e890eadd5cf0d5; exposes headers as a JsonNode (:36), serialized by the server codec (WP5 QueryResultView test); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java##import#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java:0 import tree-only sha256=a832da76a4fb79e7; renderMustacheJson result navigated (:23); values converted at listed jsonNodeToObject/fromJsonNode sites; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java##import#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java:0 import tree-only sha256=8df07e85d3a90bf5; iterates ObjectNode fields (:36) and converts values with the listed JsonUtils.jsonNodeToObject; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java##import#1 @@ -268,8 +273,8 @@ lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/BulkObje lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java:23 renderMustacheJson test:node-conversion SQL object change set lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java#ObjectChangeSet.render#renderMustacheJson#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java:94 renderMustacheJson test:node-conversion renderPsBindValue, read back by the listed jsonNodeToObject at :95 lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java#SqlGuiUtils.renderPsBindValue#renderMustacheJson#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:181 renderMustacheJson test:node-conversion multipart file value: object or array of {data, name} text nodes lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java#DataUtils.convertToMultiformFileValue#renderMustacheJson#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:146 renderMustacheJson test:downstream-encode GraphQL variables node, encoded at the listed :448 lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.buildQueryExecutionContext#renderMustacheJson#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:169 renderMustacheJson test:downstream-encode REST JSON body node, encoded at the listed :510 or written at :506 (tree-text) lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildQueryExecutionContext#renderMustacheJson#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:151 renderMustacheJson test:downstream-encode GraphQL variables node, encoded at the listed :457 lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.buildQueryExecutionContext#renderMustacheJson#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:174 renderMustacheJson test:downstream-encode REST JSON body node, encoded at the listed :515 or written at :511 (tree-text) lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.buildQueryExecutionContext#renderMustacheJson#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:98 renderMustacheJson test:downstream-encode raw HTTP JSON body node, encoded at the listed RawHttpHandlerHelper.java:42 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java#DataUtils.parseJsonBody#renderMustacheJson#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java:143 parseResultBody test:external-json Mongo command result tree from the listed readTree sites of MongoQueryUtils lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java#MongoPlugin.MongoEngine.executeQuery#parseResultBody#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/command/BulkInsertCommand.java:70 getConcatSqlStr test:downstream-render SQL text from GuiSqlValue.getConcatSqlStr (listed toJson at SqlGuiUtils.java:149) lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/command/BulkInsertCommand.java#BulkInsertCommand.render#getConcatSqlStr#1 diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv b/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv index 397d0aae7..e98a6d8ae 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv @@ -28,9 +28,9 @@ ApplicationEndpoints#update(String, Application, Boolean) codec WP2 org.lowcoder ApplicationEndpoints#updateEditState(String, UpdateEditStateRequest) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationEndpointsContractTest pass-through 174 return=updateEditState ApplicationEndpoints#updatePermission(String, String, UpdatePermissionRequest) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationEndpointsContractTest pass-through 231 return=updatePermissionWithUnknownRole; 233 return=updatePermission ApplicationEndpoints#updateSlug(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationEndpointsContractTest pass-through 181 return=updateSlug -ApplicationHistorySnapshotEndpoints#create(ApplicationHistorySnapshotRequest) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest pass-through 49 return=create -ApplicationHistorySnapshotEndpoints#getHistorySnapshotDsl(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling 136 return=getHistorySnapshotDsl; 142 switchIfEmpty=getHistorySnapshotDslOfAnotherApplication; 148 return=getHistorySnapshotDsl -ApplicationHistorySnapshotEndpoints#getHistorySnapshotDslArchived(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling 164 return=getHistorySnapshotDslArchived; 170 switchIfEmpty=getHistorySnapshotDslArchivedOfAnotherApplication; 176 return=getHistorySnapshotDslArchived +ApplicationHistorySnapshotEndpoints#create(ApplicationHistorySnapshotRequest) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest pass-through 47 return=create +ApplicationHistorySnapshotEndpoints#getHistorySnapshotDsl(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling 136 return=getHistorySnapshotDsl; 145 return=getHistorySnapshotDsl +ApplicationHistorySnapshotEndpoints#getHistorySnapshotDslArchived(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling 161 return=getHistorySnapshotDslArchived; 170 return=getHistorySnapshotDslArchived ApplicationHistorySnapshotEndpoints#listAllHistorySnapshotBriefInfo(String, int, int, String, String, Instant, Instant) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling org.lowcoder.api.application.ApplicationHistorySnapshotEndpoints$ApplicationHistorySnapshotBriefInfo 70 return=listAllHistorySnapshotBriefInfo; 90 return=listAllHistorySnapshotBriefInfo ApplicationHistorySnapshotEndpoints#listAllHistorySnapshotBriefInfoArchived(String, int, int, String, String, Instant, Instant) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling org.lowcoder.api.application.ApplicationHistorySnapshotEndpoints$ApplicationHistorySnapshotBriefInfo 107 return=listAllHistorySnapshotBriefInfoArchived; 127 return=listAllHistorySnapshotBriefInfoArchived ApplicationRecordEndpoints#delete(String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationRecordEndpointsContractTest pass-through 24 return=delete @@ -109,10 +109,10 @@ MaterialEndpoints#getFileList() codec WP7 org.lowcoder.api.contract.endpoint.Mat MaterialEndpoints#upload(UploadMaterialRequestDTO) codec WP7 org.lowcoder.api.contract.endpoint.MaterialEndpointsContractTest assembling 32 return=upload; 39 return=upload MetaEndpoints#getMetaData(GetMetaDataRequest) codec WP7 org.lowcoder.api.contract.endpoint.MetaEndpointsContractTest assembling 54 return=getMetaData ApiFlowEndpoints#flow(FlowRequest) decode-only WP7 org.lowcoder.api.contract.endpoint.ApiFlowEndpointsContractTest pass-through 64 return=flowSeatSyncWithAnotherMethod; 64 Mono.error=flowSeatSyncWithAnotherMethod; 68 return=flowSeatSyncWithRetriesOutOfRange; 71 return=flowSeatSync; 74 return=flowWithoutMethod; 78 return=flowWithRetriesOrTimeoutOutOfRange; 84 return=flow; 94 onErrorResume=flowUpstreamFailed; 98 return=flowFailingBeforeTheRequest; 98 Mono.error=flowFailingBeforeTheRequest §1.3: the outbound HTTPS client is built inline (ApiFlowController.java:84-93; the seat-sync path (:62-72) delegates to WorkspaceSeatSyncService) and the answer is the upstream's text, not JSON; FlowRequest is decoded at codec level, the outbound request is run against a local server through a test subclass that redirects the client, and the outbound body is pinned by api-flow -JsLibraryEndpoints#getMeta(Collection) codec WP7 org.lowcoder.api.contract.endpoint.JsLibraryEndpointsContractTest pass-through 110 return=getMetaWithoutNames; 112 return=getMeta; 115 return=getMetaRecommended; 116 defaultIfEmpty=getMetaRecommendedNotLoadedYet; 118 return=getMeta; 119 onErrorReturn=getMetaFetchFailed -JsLibraryEndpoints#getRecommendationMetas() codec WP7 org.lowcoder.api.contract.endpoint.JsLibraryEndpointsContractTest pass-through 104 return=getRecommendationMetas -PrivateNpmRegistryEndpoint#getNpmPackageAsset(String, String) codec WP7 org.lowcoder.api.contract.endpoint.PrivateNpmRegistryEndpointContractTest pass-through 49 return=getNpmPackageAsset -PrivateNpmRegistryEndpoint#getNpmPackageMeta(String, String) codec WP7 org.lowcoder.api.contract.endpoint.PrivateNpmRegistryEndpointContractTest pass-through 44 return=getNpmPackageMeta +JsLibraryEndpoints#getMeta(Collection) codec WP7 org.lowcoder.api.contract.endpoint.JsLibraryEndpointsContractTest pass-through 114 return=getMetaWithoutNames; 116 return=getMeta; 119 return=getMetaRecommended; 120 defaultIfEmpty=getMetaRecommendedNotLoadedYet; 122 return=getMeta; 123 onErrorReturn=getMetaFetchFailed +JsLibraryEndpoints#getRecommendationMetas() codec WP7 org.lowcoder.api.contract.endpoint.JsLibraryEndpointsContractTest pass-through 108 return=getRecommendationMetas +PrivateNpmRegistryEndpoint#getNpmPackageAsset(String, String) codec WP7 org.lowcoder.api.contract.endpoint.PrivateNpmRegistryEndpointContractTest pass-through 46 return=getNpmPackageAsset +PrivateNpmRegistryEndpoint#getNpmPackageMeta(String, String) codec WP7 org.lowcoder.api.contract.endpoint.PrivateNpmRegistryEndpointContractTest pass-through 41 return=getNpmPackageMeta LibraryQueryEndpoints#create(LibraryQuery) codec WP6 org.lowcoder.api.contract.endpoint.LibraryQueryEndpointsContractTest pass-through 72 return=create LibraryQueryEndpoints#delete(String) codec WP6 org.lowcoder.api.contract.endpoint.LibraryQueryEndpointsContractTest pass-through 93 return=delete LibraryQueryEndpoints#dropDownList(String) codec WP6 org.lowcoder.api.contract.endpoint.LibraryQueryEndpointsContractTest pass-through 51 return=dropDownList @@ -158,24 +158,24 @@ OrganizationEndpoints#updateOrgCommonSettings(String, UpdateOrgCommonSettingsReq OrganizationEndpoints#updateRoleForMember(UpdateRoleRequest, String) codec WP4 org.lowcoder.api.contract.endpoint.OrganizationEndpointsContractTest pass-through 122 return=updateRoleForMember OrganizationEndpoints#updateSlug(String, String) codec WP4 org.lowcoder.api.contract.endpoint.OrganizationEndpointsContractTest pass-through 190 return=updateSlug OrganizationEndpoints#uploadLogo(String, Mono) codec WP4 org.lowcoder.api.contract.endpoint.OrganizationEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 98 return=uploadLogo -UserEndpoints#createSCIMUserAndAddToOrg(String, CreateUserRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.User 93 return=createSCIMUserAndAddToOrg; 96 return=createSCIMUserAndAddToOrgWithInvalidEmail; 103 return=createSCIMUserAndAddToOrg; 106 return=createSCIMUserAndAddToOrg; 109 switchIfEmpty=createSCIMUserAndAddToOrgForNewUser; 120 return=createSCIMUserAndAddToOrgForNewUser -UserEndpoints#createUserAndAddToOrg(String, CreateUserRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.User 69 return=createUserAndAddToOrg -UserEndpoints#deleteProfilePhoto() codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 238 return=deleteProfilePhoto -UserEndpoints#deleteProfilePhotoById(String, String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 245 return=deleteProfilePhotoById -UserEndpoints#getCurrentUser(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 326 return=getCurrentUser -UserEndpoints#getProfilePhoto(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 252 return=getProfilePhoto; 258 return=getProfilePhoto; 259 switchIfEmpty=getProfilePhotoNotFound -UserEndpoints#getProfilePhoto(ServerWebExchange, String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 258 return=getProfilePhotoOfUser; 259 switchIfEmpty=getProfilePhotoOfUserNotFound -UserEndpoints#getUserDetail(String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.UserDetail 333 return=getUserDetail -UserEndpoints#getUserOrgs(ServerWebExchange, String, Integer, Integer) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest assembling org.lowcoder.api.usermanagement.view.OrgView 143 return=getUserOrgs; 149 return=getUserOrgs; 165 return=getUserOrgs; 170 return=getUserOrgs -UserEndpoints#getUserProfile(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.api.usermanagement.view.UserProfileView,org.lowcoder.api.authentication.dto.RedirectView 131 return=getUserProfileRedirect; 135 switchIfEmpty=getUserProfile -UserEndpoints#lostPassword(LostPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 291 return=lostPasswordWithoutEmail; 293 return=lostPassword -UserEndpoints#markStatus(MarkUserStatusRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 187 return=markStatusWithUnknownType; 190 return=markStatus -UserEndpoints#newUserGuidanceShown() codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 178 return=newUserGuidanceShown -UserEndpoints#resetLostPassword(ResetLostPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 301 return=resetLostPasswordWithMissingField; 304 return=resetLostPasswordTooWeak; 307 return=resetLostPassword -UserEndpoints#resetPassword(ResetPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 278 return=resetPasswordOutsideEnterpriseMode; 281 return=resetPasswordWithoutUserId; 283 return=resetPassword -UserEndpoints#setPassword(String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 314 return=setPasswordEmpty; 317 return=setPasswordTooWeak; 319 return=setPassword -UserEndpoints#update(String, String, UpdateUserRequest, ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 203 return=updateById -UserEndpoints#update(UpdateUserRequest, ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 197 return=update; 203 return=update -UserEndpoints#updatePassword(UpdatePasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 265 return=updatePasswordWithEmptyPassword; 268 return=updatePasswordTooWeak; 270 return=updatePassword -UserEndpoints#uploadProfilePhoto(Mono) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 223 return=uploadProfilePhoto -UserEndpoints#uploadProfilePhotoById(String, String, Mono) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 230 return=uploadProfilePhotoById +UserEndpoints#createSCIMUserAndAddToOrg(String, CreateUserRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.User 92 return=createSCIMUserAndAddToOrg; 95 return=createSCIMUserAndAddToOrgWithInvalidEmail; 102 return=createSCIMUserAndAddToOrg; 105 return=createSCIMUserAndAddToOrg; 108 switchIfEmpty=createSCIMUserAndAddToOrgForNewUser; 119 return=createSCIMUserAndAddToOrgForNewUser +UserEndpoints#createUserAndAddToOrg(String, CreateUserRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.User 68 return=createUserAndAddToOrg +UserEndpoints#deleteProfilePhoto() codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 237 return=deleteProfilePhoto +UserEndpoints#deleteProfilePhotoById(String, String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 244 return=deleteProfilePhotoById +UserEndpoints#getCurrentUser(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 316 return=getCurrentUser +UserEndpoints#getProfilePhoto(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 251 return=getProfilePhoto; 257 return=getProfilePhoto; 258 switchIfEmpty=getProfilePhotoNotFound +UserEndpoints#getProfilePhoto(ServerWebExchange, String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 257 return=getProfilePhotoOfUser; 258 switchIfEmpty=getProfilePhotoOfUserNotFound +UserEndpoints#getUserDetail(String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.UserDetail 323 return=getUserDetail +UserEndpoints#getUserOrgs(ServerWebExchange, String, Integer, Integer) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest assembling org.lowcoder.api.usermanagement.view.OrgView 142 return=getUserOrgs; 148 return=getUserOrgs; 164 return=getUserOrgs; 169 return=getUserOrgs +UserEndpoints#getUserProfile(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.api.usermanagement.view.UserProfileView,org.lowcoder.api.authentication.dto.RedirectView 130 return=getUserProfileRedirect; 134 switchIfEmpty=getUserProfile +UserEndpoints#lostPassword(LostPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 287 return=lostPasswordWithoutEmail; 289 return=lostPassword +UserEndpoints#markStatus(MarkUserStatusRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 186 return=markStatusWithUnknownType; 189 return=markStatus +UserEndpoints#newUserGuidanceShown() codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 177 return=newUserGuidanceShown +UserEndpoints#resetLostPassword(ResetLostPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 297 return=resetLostPasswordWithMissingField; 300 return=resetLostPassword +UserEndpoints#resetPassword(ResetPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 274 return=resetPasswordOutsideEnterpriseMode; 277 return=resetPasswordWithoutUserId; 279 return=resetPassword +UserEndpoints#setPassword(String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 307 return=setPasswordEmpty; 309 return=setPassword +UserEndpoints#update(String, String, UpdateUserRequest, ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 202 return=updateById +UserEndpoints#update(UpdateUserRequest, ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 196 return=update; 202 return=update +UserEndpoints#updatePassword(UpdatePasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 264 return=updatePasswordWithEmptyPassword; 266 return=updatePassword +UserEndpoints#uploadProfilePhoto(Mono) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 222 return=uploadProfilePhoto +UserEndpoints#uploadProfilePhotoById(String, String, Mono) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 229 return=uploadProfilePhotoById From 97195365c7e2ab35695c956970a2e123eb79f4c5 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Fri, 20 Nov 2026 14:04:47 +0100 Subject: [PATCH 08/40] test: cover the plugins end to end 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 --- .../plugin/graphql/GraphQLHttpsTest.java | 121 ++++ .../mongo/MongoAuthContainerSupport.java | 150 +++++ .../mongo/MongoEngineAuthContainerTest.java | 204 ++++++ .../plugin/mysql/MysqlDatabaseTest.java | 37 ++ .../plugin/restapi/RestApiHttpsTest.java | 163 +++++ .../lowcoder-plugins/smtpPlugin/pom.xml | 7 + .../plugins/Smtp4DevContainerSupport.java | 140 +++++ .../plugins/SmtpStartTlsContainerTest.java | 116 ++++ .../snowflake/SnowflakeDriverStubTest.java | 311 +++++++++ .../sdk/contract/ContainerImages.java | 10 +- .../sdk/contract/RecordingHttpServer.java | 43 +- .../RecordingHttpServerSecureTest.java | 117 ++++ .../sdk/contract/SelfSignedCertificate.java | 95 +++ server/api-service/lowcoder-server/pom.xml | 14 + .../lowcoder/api/plugin/PluginServers.java | 132 ++++ .../api/plugin/ShadedPluginHarness.java | 133 ++++ .../ShadedPluginJarsIntegrationTest.java | 592 ++++++++++++++++++ ...adedPluginJarsNegativeIntegrationTest.java | 157 +++++ 18 files changed, 2536 insertions(+), 6 deletions(-) create mode 100644 server/api-service/lowcoder-plugins/graphqlPlugin/src/test/java/org/lowcoder/plugin/graphql/GraphQLHttpsTest.java create mode 100644 server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoAuthContainerSupport.java create mode 100644 server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoEngineAuthContainerTest.java create mode 100644 server/api-service/lowcoder-plugins/restApiPlugin/src/test/java/org/lowcoder/plugin/restapi/RestApiHttpsTest.java create mode 100644 server/api-service/lowcoder-plugins/smtpPlugin/src/test/java/org/lowcoder/plugins/Smtp4DevContainerSupport.java create mode 100644 server/api-service/lowcoder-plugins/smtpPlugin/src/test/java/org/lowcoder/plugins/SmtpStartTlsContainerTest.java create mode 100644 server/api-service/lowcoder-plugins/snowflakePlugin/src/test/java/org/lowcoder/plugin/snowflake/SnowflakeDriverStubTest.java create mode 100644 server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServerSecureTest.java create mode 100644 server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/SelfSignedCertificate.java create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/PluginServers.java create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginHarness.java create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsIntegrationTest.java create mode 100644 server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsNegativeIntegrationTest.java diff --git a/server/api-service/lowcoder-plugins/graphqlPlugin/src/test/java/org/lowcoder/plugin/graphql/GraphQLHttpsTest.java b/server/api-service/lowcoder-plugins/graphqlPlugin/src/test/java/org/lowcoder/plugin/graphql/GraphQLHttpsTest.java new file mode 100644 index 000000000..1d832ad09 --- /dev/null +++ b/server/api-service/lowcoder-plugins/graphqlPlugin/src/test/java/org/lowcoder/plugin/graphql/GraphQLHttpsTest.java @@ -0,0 +1,121 @@ +package org.lowcoder.plugin.graphql; + +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.lowcoder.sdk.contract.RecordingHttpServer; +import org.lowcoder.sdk.contract.RecordingHttpServer.Response; +import org.lowcoder.sdk.contract.SelfSignedCertificate; +import org.lowcoder.sdk.exception.PluginException; +import org.lowcoder.sdk.plugin.graphql.GraphQLDatasourceConfig; + +import java.nio.charset.StandardCharsets; +import java.nio.file.Path; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * The GraphQL executor against an HTTPS server with a self-signed certificate generated in the test + * ({@link SelfSignedCertificate}, {@link RecordingHttpServer#startSecure}). The GraphQL datasource has no SSL setting (unlike + * the REST API datasource: {@code GraphQLDatasourceConfig} has no {@code sslConfig}, and {@code GraphQLExecutor} builds its + * WebClient without one), so the only mode is the JDK's default trust. The tests pin what that means: a self-signed server is + * refused in the handshake and reaches no handler, also when the client sends the REST API datasource's + * {@code sslConfig} with {@code DISABLED} (it is ignored, not applied); and the same server over plain HTTP, the control + * of the same query on a {@link RecordingHttpServer}, is answered, so the refusal is the certificate's and not the query's. + * + *

    Limits: no CA-signed certificate (the default trust is shown only by its refusal), no client certificate. + */ +public class GraphQLHttpsTest { + + static final String TAG = "[GraphQLHttpsTest] "; + static final String PATH = "/graphql"; + static final String ANSWER_JSON = "{\"data\":{\"hero\":{\"name\":\"R2-D2\"}}}"; + static final String URL_KEY = "url"; + static final String SSL_KEY = "sslConfig"; + static final String TYPE_KEY = "sslCertVerificationType"; + static final String DISABLED = "DISABLED"; + static final int OK = 200; + + @TempDir + static Path directory; + private static RecordingHttpServer secure; + private static RecordingHttpServer plain; + + private final GraphQLCallSupport calls = new GraphQLCallSupport(); + + @BeforeAll + static void startServers() { + SelfSignedCertificate certificate = SelfSignedCertificate.generate(directory, "graphql"); + Response answer = new Response(OK, Map.of("Content-Type", List.of("application/json")), ANSWER_JSON.getBytes(StandardCharsets.UTF_8)); + secure = RecordingHttpServer.startSecure(certificate.serverContext(), Map.of(PATH, answer)); + plain = RecordingHttpServer.start(Map.of(PATH, answer)); + System.out.println(TAG + "HTTPS server on " + secure.baseUrl() + ", HTTP control on " + plain.baseUrl()); + } + + @AfterAll + static void stopServers() { + secure.close(); + plain.close(); + } + + private static GraphQLDatasourceConfig datasource(RecordingHttpServer server, Map sslConfig) { + Map map = new HashMap<>(); + map.put(URL_KEY, server.baseUrl()); + if (sslConfig != null) { + map.put(SSL_KEY, sslConfig); + } + return GraphQLDatasourceConfig.buildFrom(map); + } + + private Throwable failureOver(Map sslConfig) { + Throwable failure = calls.failureOf(datasource(secure, sslConfig), GraphQLCallSupport.query(Map.of("path", PATH)), + GraphQLCallSupport.visitor(null, null)); + System.out.println(TAG + "sslConfig=" + sslConfig + " -> " + failure); + return failure; + } + + private static boolean causedByHandshake(Throwable failure) { + for (Throwable t = failure; t != null; t = t.getCause()) { + String text = t.getClass().getName() + " " + t.getMessage(); + if (text.contains("SSLHandshakeException") || text.contains("SSLException") || text.contains("PKIX") || text.contains("certificate")) { + return true; + } + } + return false; + } + + @Test + public void aSelfSignedServerIsRefusedByTheDefaultTrust() { + int before = secure.requests().size(); + Throwable failure = failureOver(null); + assertInstanceOf(Throwable.class, failure, "the call must fail"); + assertInstanceOf(PluginException.class, failure, "mapped to a PluginException: " + failure); + assertTrue(causedByHandshake(failure), "the failure names the TLS handshake: " + failure + " / " + failure.getCause()); + assertEquals(before, secure.requests().size(), "a refused handshake reaches no handler"); + } + + @Test + public void anSslConfigThatDisablesVerificationIsIgnoredBecauseTheDatasourceHasNoSslMode() { + int before = secure.requests().size(); + Throwable failure = failureOver(Map.of(TYPE_KEY, DISABLED)); + assertInstanceOf(Throwable.class, failure, "DISABLED must not make the call succeed: the GraphQL datasource has no SSL setting"); + assertTrue(causedByHandshake(failure), "still a handshake failure: " + failure + " / " + failure.getCause()); + assertEquals(before, secure.requests().size(), "no request passed the handshake"); + } + + @Test + public void theSameQueryOverPlainHttpIsAnswered() { + var result = calls.run(datasource(plain, null), GraphQLCallSupport.query(Map.of("path", PATH)), GraphQLCallSupport.visitor(null, null)); + System.out.println(TAG + "plain HTTP control -> " + result.getQueryCode() + " " + result.getData()); + assertTrue(result.isSuccess(), "the control query succeeds: " + result); + assertTrue(String.valueOf(result.getData()).contains("R2-D2"), "the answer body is returned: " + result.getData()); + assertEquals(1, plain.requests().size(), "one request reached the HTTP server"); + assertEquals("POST", plain.requests().get(0).method()); + } +} diff --git a/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoAuthContainerSupport.java b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoAuthContainerSupport.java new file mode 100644 index 000000000..ed9f8d560 --- /dev/null +++ b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoAuthContainerSupport.java @@ -0,0 +1,150 @@ +package org.lowcoder.plugin.mongo; + +import org.lowcoder.plugin.mongo.model.MongoConnection; +import org.lowcoder.plugin.mongo.model.MongoDatasourceConfig; +import org.lowcoder.plugin.mongo.utils.MongoQueryUtils; +import org.lowcoder.sdk.config.dynamic.ConfigCenterForTest; +import org.lowcoder.sdk.contract.ContainerImages; +import org.testcontainers.containers.Container.ExecResult; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.wait.strategy.Wait; +import org.testcontainers.utility.DockerImageName; + +import java.io.IOException; +import java.time.Duration; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * The shared MongoDB 7.0 container with authentication of the Mongo authentication tests (default build, not + * heavy-container: one per test JVM, started on first use, removed by Testcontainers' reaper when the JVM exits). The image's + * {@code MONGO_INITDB_ROOT_USERNAME} and {@code MONGO_INITDB_ROOT_PASSWORD} create the root user in the {@code admin} + * database, and the server then runs with authentication on; this class adds the user {@link #APP_USER} in database + * {@link #DATABASE} with {@code mongosh} run in the container (an exec, no file is copied in). A generic container, as in + * {@link MongoContainerSupport}. The image's init phase starts a temporary server, so readiness is the second "Waiting for + * connections" line, then a bounded loop until the root user can ping. No Docker guard on purpose (owner decision D-7). + * Not a test. + */ +final class MongoAuthContainerSupport { + + static final String DATABASE = "app"; + static final String ADMIN_DATABASE = "admin"; + static final String ROOT_USER = "root"; + static final String ROOT_PASSWORD = "root-pw"; + static final String APP_USER = "appuser"; + static final String APP_PASSWORD = "app:p@ss/w#rd%1"; + static final String WRONG_PASSWORD = "not-the-password"; + static final int MONGO_PORT = 27017; + private static final String READY_PATTERN = ".*[Ww]aiting for connections.*"; + private static final int READY_MESSAGES = 2; + private static final Duration START_TIMEOUT = Duration.ofMinutes(2); + private static final Duration PING_TIMEOUT = Duration.ofSeconds(10); + private static final int PING_ATTEMPTS = 30; + private static final long PING_PAUSE_MILLIS = 500; + static final Duration BLOCK_TIMEOUT = Duration.ofSeconds(30); + + private static final GenericContainer MONGO = new GenericContainer<>(DockerImageName.parse(ContainerImages.MONGO_7_0)) + .withEnv("MONGO_INITDB_ROOT_USERNAME", ROOT_USER).withEnv("MONGO_INITDB_ROOT_PASSWORD", ROOT_PASSWORD) + .withExposedPorts(MONGO_PORT) + .waitingFor(Wait.forLogMessage(READY_PATTERN, READY_MESSAGES).withStartupTimeout(START_TIMEOUT)); + + static final MongoPlugin.MongoEngine ENGINE = new MongoPlugin.MongoEngine(new ConfigCenterForTest()); + + static { + long start = System.nanoTime(); + MONGO.start(); + System.out.println("[MongoAuthContainerSupport] " + ContainerImages.MONGO_7_0 + " with authentication started in " + + (System.nanoTime() - start) / 1_000_000 + " ms on " + MONGO.getHost() + ":" + MONGO.getMappedPort(MONGO_PORT)); + awaitRootPing(); + createAppUser(); + } + + private MongoAuthContainerSupport() { + } + + static String host() { + return MONGO.getHost(); + } + + static int port() { + return MONGO.getMappedPort(MONGO_PORT); + } + + /** A host-mode config ({@code usingUri} false); the authentication database is {@code database}, there is no field for another one. */ + static MongoDatasourceConfig hostConfig(String database, String username, String password, String authMechanism) { + Map values = new LinkedHashMap<>(); + values.put("host", host()); + values.put("port", port()); + values.put("database", database); + if (username != null) { + values.put("username", username); + } + if (password != null) { + values.put("password", password); + } + if (authMechanism != null) { + values.put("authMechanism", authMechanism); + } + return MongoDatasourceConfig.buildFrom(values); + } + + static MongoDatasourceConfig uriConfig(String uri) { + return MongoDatasourceConfig.buildFrom(Map.of("usingUri", true, "uri", uri)); + } + + /** {@code mongodb://:@host:port/} plus {@code query} (with its leading {@code ?}, or empty); user and password are percent-encoded. */ + static String uri(String user, String password, String database, String query) { + return "mongodb://" + (user == null ? "" : MongoQueryUtils.urlEncode(user) + ":" + MongoQueryUtils.urlEncode(password) + "@") + host() + ":" + port() + + "/" + database + query; + } + + private static void awaitRootPing() { + RuntimeException last = null; + for (int attempt = 1; attempt <= PING_ATTEMPTS; attempt++) { + MongoConnection connection = null; + try { + connection = ENGINE.createConnection(hostConfig(ADMIN_DATABASE, ROOT_USER, ROOT_PASSWORD, null)).block(BLOCK_TIMEOUT); + System.out.println("[MongoAuthContainerSupport] root ping answered on attempt " + attempt + ": " + + connection.ping().block(PING_TIMEOUT).toJson()); + return; + } catch (RuntimeException e) { + last = e; + pause(); + } finally { + if (connection != null) { + connection.close().block(BLOCK_TIMEOUT); + } + } + } + throw new IllegalStateException("MongoDB with authentication did not answer a root ping after " + PING_ATTEMPTS + " attempts", last); + } + + /** The user of {@link #DATABASE}: read and write there only, so only a login that authenticates against {@code app} reaches it. */ + private static void createAppUser() { + String script = "db.getSiblingDB('" + DATABASE + "').createUser({user: '" + APP_USER + "', pwd: '" + APP_PASSWORD + + "', roles: [{role: 'readWrite', db: '" + DATABASE + "'}]})"; + try { + ExecResult result = MONGO.execInContainer("mongosh", "--quiet", "-u", ROOT_USER, "-p", ROOT_PASSWORD, + "--authenticationDatabase", ADMIN_DATABASE, "--eval", script); + System.out.println("[MongoAuthContainerSupport] createUser exit " + result.getExitCode() + ": " + result.getStdout().trim() + + result.getStderr().trim()); + if (result.getExitCode() != 0) { + throw new IllegalStateException("cannot create " + APP_USER + ": " + result.getStdout() + result.getStderr()); + } + } catch (IOException e) { + throw new IllegalStateException("cannot run mongosh in the container", e); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new IllegalStateException("interrupted while creating " + APP_USER, e); + } + } + + private static void pause() { + try { + Thread.sleep(PING_PAUSE_MILLIS); + } catch (InterruptedException interrupted) { + Thread.currentThread().interrupt(); + throw new IllegalStateException("interrupted while waiting for MongoDB", interrupted); + } + } +} diff --git a/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoEngineAuthContainerTest.java b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoEngineAuthContainerTest.java new file mode 100644 index 000000000..3e8e2f59b --- /dev/null +++ b/server/api-service/lowcoder-plugins/mongoPlugin/src/test/java/org/lowcoder/plugin/mongo/MongoEngineAuthContainerTest.java @@ -0,0 +1,204 @@ +package org.lowcoder.plugin.mongo; + +import com.fasterxml.jackson.databind.JsonNode; +import org.junit.jupiter.api.Test; +import org.lowcoder.plugin.mongo.model.MongoConnection; +import org.lowcoder.plugin.mongo.model.MongoDatasourceConfig; +import org.lowcoder.plugin.mongo.model.MongoQueryExecutionContext; +import org.lowcoder.sdk.exception.PluginException; +import org.lowcoder.sdk.models.DatasourceTestResult; +import org.lowcoder.sdk.models.QueryExecutionResult; + +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; +import java.util.UUID; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.ADMIN_DATABASE; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.APP_PASSWORD; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.APP_USER; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.BLOCK_TIMEOUT; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.DATABASE; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.ENGINE; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.ROOT_PASSWORD; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.ROOT_USER; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.WRONG_PASSWORD; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.hostConfig; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.uri; +import static org.lowcoder.plugin.mongo.MongoAuthContainerSupport.uriConfig; + +/** + * Unit MG-7: the Mongo engine against a MongoDB 7.0 that requires authentication ({@link MongoAuthContainerSupport}), with SCRAM + * through a host config and through a URI config: test-connection, a connection that inserts a document and finds it again, a wrong + * password, and the authentication database. A host config has no authentication-database field, so the user is authenticated + * against the config's {@code database} (the driver's default for a connection string without {@code authSource}); a URI + * config names it with {@code ?authSource=}. The tests pin both consequences: the root user (defined in {@code admin}) works in + * a host config whose database is {@code admin} and in a URI with {@code authSource=admin}, and fails in a host config whose + * database is {@code app}. + * + *

    Observed behaviour pinned here: {@code ping} needs no authentication on MongoDB 7.0, so a config without credentials + * passes test-connection against this server and is refused only by the first command that needs a role. + * + *

    Limits: SCRAM-SHA-1 and SCRAM-SHA-256 only (the {@code MONGODB-X509} value of the enum needs client certificates and TLS, + * which the image does not offer); no TLS; each test uses its own collection. + */ +public class MongoEngineAuthContainerTest { + + static final String TAG = "[MongoEngineAuthContainerTest] "; + static final String QUERY_CODE_OK = "OK"; + static final String SCRAM_SHA_1 = "SCRAM_SHA_1"; + static final String SCRAM_SHA_256 = "SCRAM_SHA_256"; + static final String AUTH_SOURCE_ADMIN = "?authSource=" + ADMIN_DATABASE; + static final String UNAUTHORIZED_KEY = "QUERY_ARGUMENT_ERROR"; + static final String REQUIRES_AUTHENTICATION = "requires authentication"; + static final String AUTHENTICATION_FAILED = "Exception authenticating MongoCredential"; + static final String SOURCE_APP = "source='app'"; + + private static String collection(String prefix) { + return prefix + "_" + UUID.randomUUID().toString().substring(0, 8); + } + + private static Map form(String type, String collection, Object... compKeysAndValues) { + Map comp = new HashMap<>(); + for (int i = 0; i < compKeysAndValues.length; i += 2) { + comp.put((String) compKeysAndValues[i], compKeysAndValues[i + 1]); + } + Map form = new HashMap<>(); + form.put("compType", type); + form.put("collection", collection); + form.put("comp", comp); + return form; + } + + private static QueryExecutionResult run(MongoDatasourceConfig config, MongoConnection connection, Map form) { + MongoQueryExecutionContext context = ENGINE.buildQueryExecutionContext(config, form, Map.of(), null); + QueryExecutionResult result = ENGINE.executeQuery(connection, context).block(BLOCK_TIMEOUT); + System.out.println(TAG + context.getCommand().toJson() + " -> " + result.getQueryCode() + " " + result.getData()); + return result; + } + + private static DatasourceTestResult test(String label, MongoDatasourceConfig config) { + DatasourceTestResult result = ENGINE.testConnection(config).block(BLOCK_TIMEOUT); + assertNotNull(result, "testConnection emits a result: " + label); + System.out.println(TAG + "test connection " + label + ": success=" + result.isSuccess() + + (result.isSuccess() ? "" : " message=" + result.getInvalidMessage(Locale.ENGLISH))); + return result; + } + + /** Connects, inserts one document, finds it, and closes the connection. */ + private static void insertAndFind(String label, MongoDatasourceConfig config) { + MongoConnection connection = ENGINE.createConnection(config).block(BLOCK_TIMEOUT); + try { + String c = collection("auth"); + QueryExecutionResult inserted = run(config, connection, form("INSERT", c, "documents", "{\"n\": 1, \"who\": \"" + label + "\"}")); + assertEquals(QUERY_CODE_OK, inserted.getQueryCode(), label + ": the insert succeeds"); + assertEquals("{\"n\":1}", inserted.getData().toString(), label + ": one document inserted"); + QueryExecutionResult found = run(config, connection, form("FIND", c, "projection", "{\"_id\": 0}")); + assertEquals(QUERY_CODE_OK, found.getQueryCode(), label + ": the find succeeds"); + JsonNode rows = (JsonNode) found.getData(); + assertEquals("[{\"n\":1,\"who\":\"" + label + "\"}]", rows.toString(), label + ": the inserted document is read back"); + } finally { + ENGINE.destroyConnection(connection).block(BLOCK_TIMEOUT); + } + } + + // ---- host config + + @Test + public void hostConfigWithTheAppUserAuthenticatesAgainstItsDatabaseWithEachScramMechanism() { + for (String mechanism : new String[] {null, SCRAM_SHA_1, SCRAM_SHA_256}) { + MongoDatasourceConfig config = hostConfig(DATABASE, APP_USER, APP_PASSWORD, mechanism); + assertTrue(test("host app user, mechanism " + mechanism, config).isSuccess(), "test connection passes with mechanism " + mechanism); + insertAndFind("host-" + mechanism, config); + } + } + + @Test + public void hostConfigWithTheRootUserWorksWhenTheDatabaseIsAdminAndFailsWhenItIsApp() { + MongoDatasourceConfig admin = hostConfig(ADMIN_DATABASE, ROOT_USER, ROOT_PASSWORD, SCRAM_SHA_256); + assertTrue(test("host root user in admin", admin).isSuccess()); + insertAndFind("host-root-admin", admin); + + MongoDatasourceConfig app = hostConfig(DATABASE, ROOT_USER, ROOT_PASSWORD, null); + DatasourceTestResult failed = test("host root user in app", app); + assertFalse(failed.isSuccess(), "the root user is defined in admin; a host config authenticates against its database (app)"); + assertTrue(failed.getInvalidMessage(Locale.ENGLISH).contains(AUTHENTICATION_FAILED), failed.getInvalidMessage(Locale.ENGLISH)); + assertTrue(failed.getInvalidMessage(Locale.ENGLISH).contains(SOURCE_APP), "the credential's source is the config's database: " + failed.getInvalidMessage(Locale.ENGLISH)); + } + + @Test + public void hostConfigWithAWrongPasswordFailsTestConnectionWithAuthenticationFailed() { + for (String mechanism : new String[] {null, SCRAM_SHA_1, SCRAM_SHA_256}) { + DatasourceTestResult failed = test("host wrong password, mechanism " + mechanism, + hostConfig(DATABASE, APP_USER, WRONG_PASSWORD, mechanism)); + assertFalse(failed.isSuccess(), "a wrong password fails the test with mechanism " + mechanism); + assertTrue(failed.getInvalidMessage(Locale.ENGLISH).contains(AUTHENTICATION_FAILED), failed.getInvalidMessage(Locale.ENGLISH)); + } + } + + @Test + public void hostConfigWithAWrongUserFailsTestConnection() { + DatasourceTestResult failed = test("host unknown user", hostConfig(DATABASE, "nobody", APP_PASSWORD, null)); + assertFalse(failed.isSuccess(), "an unknown user fails the test"); + assertTrue(failed.getInvalidMessage(Locale.ENGLISH).contains(AUTHENTICATION_FAILED), failed.getInvalidMessage(Locale.ENGLISH)); + } + + // ---- URI config + + @Test + public void uriConfigWithTheAppUserAuthenticatesAgainstItsDatabase() { + MongoDatasourceConfig config = uriConfig(uri(APP_USER, APP_PASSWORD, DATABASE, "")); + assertTrue(test("uri app user", config).isSuccess()); + insertAndFind("uri-app", config); + + MongoDatasourceConfig sha256 = uriConfig(uri(APP_USER, APP_PASSWORD, DATABASE, "?authMechanism=SCRAM-SHA-256")); + assertTrue(test("uri app user, SCRAM-SHA-256", sha256).isSuccess()); + insertAndFind("uri-app-sha256", sha256); + } + + @Test + public void uriConfigWithTheRootUserNeedsAuthSourceAdmin() { + MongoDatasourceConfig withSource = uriConfig(uri(ROOT_USER, ROOT_PASSWORD, DATABASE, AUTH_SOURCE_ADMIN)); + assertTrue(test("uri root user with authSource=admin", withSource).isSuccess()); + insertAndFind("uri-root-authsource", withSource); + + DatasourceTestResult without = test("uri root user without authSource", uriConfig(uri(ROOT_USER, ROOT_PASSWORD, DATABASE, ""))); + assertFalse(without.isSuccess(), "without authSource the root user is looked up in app, where it does not exist"); + assertTrue(without.getInvalidMessage(Locale.ENGLISH).contains(AUTHENTICATION_FAILED), without.getInvalidMessage(Locale.ENGLISH)); + assertTrue(without.getInvalidMessage(Locale.ENGLISH).contains(SOURCE_APP), "the credential's source defaults to the URI's database: " + without.getInvalidMessage(Locale.ENGLISH)); + } + + @Test + public void uriConfigWithAWrongPasswordFailsTestConnectionWithAuthenticationFailed() { + DatasourceTestResult failed = test("uri wrong password", uriConfig(uri(APP_USER, WRONG_PASSWORD, DATABASE, ""))); + assertFalse(failed.isSuccess(), "a wrong password fails the test"); + assertTrue(failed.getInvalidMessage(Locale.ENGLISH).contains(AUTHENTICATION_FAILED), failed.getInvalidMessage(Locale.ENGLISH)); + DatasourceTestResult wrongSource = test("uri wrong password, authSource=admin", uriConfig(uri(ROOT_USER, WRONG_PASSWORD, DATABASE, AUTH_SOURCE_ADMIN))); + assertFalse(wrongSource.isSuccess()); + } + + // ---- no credentials + + @Test + public void aConfigWithoutCredentialsPassesTestConnectionBecausePingNeedsNoRoleButItsQueriesAreRefused() { + MongoDatasourceConfig anonymous = hostConfig(DATABASE, null, null, null); + assertTrue(test("host without credentials", anonymous).isSuccess(), "ping needs no authentication on this server"); + + MongoConnection connection = ENGINE.createConnection(anonymous).block(BLOCK_TIMEOUT); + try { + PluginException refused = assertThrows(PluginException.class, + () -> run(anonymous, connection, form("FIND", collection("anon")))); + System.out.println(TAG + "find without credentials: " + refused.getError() + " " + refused.getMessageKey() + " " + + java.util.List.of(refused.getArgs())); + assertEquals(UNAUTHORIZED_KEY, refused.getMessageKey()); + assertTrue(String.valueOf(refused.getArgs()[0]).contains(REQUIRES_AUTHENTICATION), String.valueOf(refused.getArgs()[0])); + } finally { + ENGINE.destroyConnection(connection).block(BLOCK_TIMEOUT); + } + } +} diff --git a/server/api-service/lowcoder-plugins/mysqlPlugin/src/test/java/org/lowcoder/plugin/mysql/MysqlDatabaseTest.java b/server/api-service/lowcoder-plugins/mysqlPlugin/src/test/java/org/lowcoder/plugin/mysql/MysqlDatabaseTest.java index b6a8ca4fe..c370c915e 100644 --- a/server/api-service/lowcoder-plugins/mysqlPlugin/src/test/java/org/lowcoder/plugin/mysql/MysqlDatabaseTest.java +++ b/server/api-service/lowcoder-plugins/mysqlPlugin/src/test/java/org/lowcoder/plugin/mysql/MysqlDatabaseTest.java @@ -4,6 +4,7 @@ import org.junit.jupiter.api.Test; import org.lowcoder.sdk.exception.PluginException; import org.lowcoder.sdk.models.DatasourceStructure; +import org.lowcoder.sdk.models.DatasourceTestResult; import org.lowcoder.sdk.models.DatasourceStructure.Column; import org.lowcoder.sdk.models.DatasourceStructure.ForeignKey; import org.lowcoder.sdk.models.DatasourceStructure.PrimaryKey; @@ -16,16 +17,20 @@ import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Random; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.lowcoder.sdk.exception.PluginCommonError.INVALID_GUI_SETTINGS; import static org.lowcoder.sdk.exception.PluginCommonError.QUERY_EXECUTION_ERROR; +import static org.lowcoder.plugin.mysql.MysqlContainerSupport.CONNECTOR; import static org.lowcoder.plugin.mysql.MysqlContainerSupport.app; import static org.lowcoder.plugin.mysql.MysqlContainerSupport.config; import static org.lowcoder.plugin.mysql.MysqlContainerSupport.connect; @@ -105,6 +110,38 @@ public void poolOpensAndReturnsRealColumnTypes() throws Exception { } } + @Test + public void testConnectionSucceedsWithoutAndWithSsl() { + for (boolean ssl : new boolean[] {false, true}) { + MysqlDatasourceConfig config = config(MysqlContainerSupport.DATABASE, MysqlContainerSupport.PASSWORD, ssl, false, false); + long start = System.nanoTime(); + DatasourceTestResult test = CONNECTOR.testConnection(config).block(); + System.out.println("[MysqlDatabaseTest] test connection, ssl=" + ssl + ": success=" + (test != null && test.isSuccess()) + + " after " + (System.nanoTime() - start) / 1_000_000 + " ms"); + assertNotNull(test, "testConnection emits a result (ssl=" + ssl + ")"); + assertTrue(test.isSuccess(), "the right credentials pass the test (ssl=" + ssl + ")"); + } + } + + @Test + public void testConnectionWithAWrongPasswordErrorsWithAccessDeniedAndTheServerMapsItToAFailedResult() { + for (boolean ssl : new boolean[] {false, true}) { + MysqlDatasourceConfig config = config(MysqlContainerSupport.DATABASE, WRONG_PASSWORD, ssl, false, false); + RuntimeException thrown = assertThrows(RuntimeException.class, () -> CONNECTOR.testConnection(config).block(), + "a wrong password must not give a successful result (ssl=" + ssl + ")"); + System.out.println("[MysqlDatabaseTest] test connection with a wrong password, ssl=" + ssl + ": " + thrown.getClass().getSimpleName() + + ": " + thrown.getMessage()); + assertTrue(String.valueOf(thrown.getMessage()).contains(ACCESS_DENIED), "the error names the refusal (ssl=" + ssl + "): " + thrown.getMessage()); + // what DatasourceServiceImpl.testDatasourceLocally does with the error + DatasourceTestResult mapped = CONNECTOR.testConnection(config).onErrorResume(error -> reactor.core.publisher.Mono.just(DatasourceTestResult.testFail(error))).block(); + assertNotNull(mapped); + assertFalse(mapped.isSuccess(), "the mapped result is a failure (ssl=" + ssl + ")"); + String message = mapped.getInvalidMessage(Locale.ENGLISH); + System.out.println("[MysqlDatabaseTest] mapped failed result, ssl=" + ssl + ": " + message); + assertTrue(String.valueOf(message).contains(ACCESS_DENIED), "the failed result carries the refusal (ssl=" + ssl + "): " + message); + } + } + @Test public void wrongPasswordFailsTheConnectionCreationWithAccessDeniedBF054() { long start = System.nanoTime(); diff --git a/server/api-service/lowcoder-plugins/restApiPlugin/src/test/java/org/lowcoder/plugin/restapi/RestApiHttpsTest.java b/server/api-service/lowcoder-plugins/restApiPlugin/src/test/java/org/lowcoder/plugin/restapi/RestApiHttpsTest.java new file mode 100644 index 000000000..f60019101 --- /dev/null +++ b/server/api-service/lowcoder-plugins/restApiPlugin/src/test/java/org/lowcoder/plugin/restapi/RestApiHttpsTest.java @@ -0,0 +1,163 @@ +package org.lowcoder.plugin.restapi; + +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.lowcoder.sdk.contract.RecordingHttpServer; +import org.lowcoder.sdk.contract.RecordingHttpServer.Response; +import org.lowcoder.sdk.contract.SelfSignedCertificate; +import org.lowcoder.sdk.exception.PluginException; +import org.lowcoder.sdk.models.QueryExecutionResult; +import org.lowcoder.sdk.plugin.common.ssl.DisableVerifySslConfig; +import org.lowcoder.sdk.plugin.common.ssl.SslCertVerificationType; +import org.lowcoder.sdk.plugin.common.ssl.VerifyCACertSslConfig; +import org.lowcoder.sdk.plugin.common.ssl.VerifySelfSignedCertSslConfig; +import org.lowcoder.sdk.plugin.restapi.RestApiDatasourceConfig; + +import java.nio.charset.StandardCharsets; +import java.nio.file.Path; +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * The REST API executor against an HTTPS server with a self-signed certificate generated in the test + * ({@link SelfSignedCertificate}, {@link RecordingHttpServer#startSecure}), once for each SSL mode the datasource offers + * ({@code sslConfig.sslCertVerificationType}): the default (no {@code sslConfig}), {@code VERIFY_CA_CERT}, {@code DISABLED}, + * {@code VERIFY_SELF_SIGNED_CERT} with the server's certificate and with another certificate. The datasource is bound from + * the JSON map the client sends ({@code RestApiDatasourceConfig.buildFrom}), so the polymorphic {@code sslConfig} binding is + * part of the path. A request that passes the handshake is recorded by the server; one that is refused by it is not. + * + *

    Limits: one self-signed certificate (CN=localhost, SAN 127.0.0.1); no CA-signed certificate, so "verify the CA" is + * shown only by its refusal of the self-signed one; no client certificate. + */ +public class RestApiHttpsTest { + + static final String TAG = "[RestApiHttpsTest] "; + static final String PATH = "/secure"; + static final String ANSWER_JSON = "{\"secure\":true}"; + static final String TYPE_KEY = "sslCertVerificationType"; + static final String CERT_KEY = "selfSignedCert"; + static final String SSL_KEY = "sslConfig"; + static final String URL_KEY = "url"; + static final int OK = 200; + + @TempDir + static Path directory; + private static SelfSignedCertificate serverCertificate; + private static SelfSignedCertificate otherCertificate; + private static RecordingHttpServer server; + + private final RestApiCallSupport calls = new RestApiCallSupport(); + + @BeforeAll + static void startServer() { + serverCertificate = SelfSignedCertificate.generate(directory, "server"); + otherCertificate = SelfSignedCertificate.generate(directory, "other"); + server = RecordingHttpServer.startSecure(serverCertificate.serverContext(), Map.of(PATH, + new Response(OK, Map.of("Content-Type", List.of("application/json")), ANSWER_JSON.getBytes(StandardCharsets.UTF_8)))); + System.out.println(TAG + "HTTPS server on " + server.baseUrl()); + } + + @AfterAll + static void stopServer() { + server.close(); + } + + private static RestApiDatasourceConfig datasource(Map sslConfig) { + Map map = new java.util.HashMap<>(); + map.put(URL_KEY, server.baseUrl()); + if (sslConfig != null) { + map.put(SSL_KEY, sslConfig); + } + return RestApiDatasourceConfig.buildFrom(map); + } + + private Object call(Map sslConfig) { + int before = server.requests().size(); + Object outcome; + try { + outcome = calls.run(datasource(sslConfig), Map.of("httpMethod", "GET", "path", PATH), RestApiCallSupport.visitor(null, null)); + } catch (RuntimeException e) { + outcome = e; + } + System.out.println(TAG + "sslConfig=" + sslConfig + " -> " + outcome + " (requests recorded: " + (server.requests().size() - before) + ")"); + return outcome; + } + + private static boolean causedBy(Throwable failure, String className) { + for (Throwable t = failure; t != null; t = t.getCause()) { + if (t.getClass().getName().contains(className) || String.valueOf(t.getMessage()).contains(className)) { + return true; + } + } + return false; + } + + private void assertAnswered(Object outcome, int recordedBefore) { + QueryExecutionResult result = assertInstanceOf(QueryExecutionResult.class, outcome, String.valueOf(outcome)); + assertTrue(result.isSuccess(), "the call over TLS succeeded: " + result); + assertTrue(String.valueOf(result.getData()).contains("secure"), "the answer body is returned: " + result.getData()); + assertEquals(recordedBefore + 1, server.requests().size(), "the server recorded the request that passed the handshake"); + } + + private void assertRefused(Object outcome, int recordedBefore) { + Throwable failure = assertInstanceOf(Throwable.class, outcome, "the call must fail, it returned " + outcome); + assertInstanceOf(PluginException.class, failure, "the executor maps the failure to a PluginException: " + failure); + assertTrue(causedBy(failure, "SSLHandshakeException") || causedBy(failure, "SSLException") || causedBy(failure, "PKIX") + || causedBy(failure, "CertificateException") || causedBy(failure, "certificate"), + "the failure names the TLS handshake: " + failure + " / " + failure.getCause()); + assertEquals(recordedBefore, server.requests().size(), "a refused handshake reaches no handler"); + } + + @Test + public void withoutAnSslConfigTheDefaultTrustRefusesTheSelfSignedServer() { + int before = server.requests().size(); + assertRefused(call(null), before); + } + + @Test + public void verifyCaCertRefusesTheSelfSignedServerLikeTheDefault() { + int before = server.requests().size(); + assertRefused(call(Map.of(TYPE_KEY, SslCertVerificationType.VERIFY_CA_CERT.name())), before); + } + + @Test + public void disabledVerificationAcceptsTheSelfSignedServer() { + RestApiDatasourceConfig bound = datasource(Map.of(TYPE_KEY, SslCertVerificationType.DISABLED.name())); + assertInstanceOf(DisableVerifySslConfig.class, bound.getSslConfig(), "DISABLED binds to the disable-verification config"); + int before = server.requests().size(); + assertAnswered(call(Map.of(TYPE_KEY, SslCertVerificationType.DISABLED.name())), before); + } + + @Test + public void verifySelfSignedCertAcceptsTheServerWhoseCertificateIsGiven() { + Map ssl = Map.of(TYPE_KEY, SslCertVerificationType.VERIFY_SELF_SIGNED_CERT.name(), CERT_KEY, serverCertificate.pem()); + RestApiDatasourceConfig bound = datasource(ssl); + assertInstanceOf(VerifySelfSignedCertSslConfig.class, bound.getSslConfig(), "VERIFY_SELF_SIGNED_CERT binds to the pinned-certificate config"); + assertEquals(serverCertificate.pem(), ((VerifySelfSignedCertSslConfig) bound.getSslConfig()).getSelfSignedCert()); + int before = server.requests().size(); + assertAnswered(call(ssl), before); + } + + @Test + public void verifySelfSignedCertRefusesAServerWhoseCertificateIsNotTheGivenOne() { + Map ssl = Map.of(TYPE_KEY, SslCertVerificationType.VERIFY_SELF_SIGNED_CERT.name(), CERT_KEY, otherCertificate.pem()); + int before = server.requests().size(); + assertRefused(call(ssl), before); + } + + @Test + public void anSslConfigWithoutATypeBindsToTheCaVerifyingDefault() { + RestApiDatasourceConfig bound = datasource(Map.of()); + assertNotNull(bound.getSslConfig(), "an empty sslConfig object still binds"); + assertInstanceOf(VerifyCACertSslConfig.class, bound.getSslConfig(), "the default type is VERIFY_CA_CERT"); + int before = server.requests().size(); + assertRefused(call(Map.of()), before); + } +} diff --git a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml index 1d9c29fe5..fc3209971 100644 --- a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml @@ -35,6 +35,13 @@ provided + + + org.testcontainers + testcontainers + test + + diff --git a/server/api-service/lowcoder-plugins/smtpPlugin/src/test/java/org/lowcoder/plugins/Smtp4DevContainerSupport.java b/server/api-service/lowcoder-plugins/smtpPlugin/src/test/java/org/lowcoder/plugins/Smtp4DevContainerSupport.java new file mode 100644 index 000000000..66a5cc54b --- /dev/null +++ b/server/api-service/lowcoder-plugins/smtpPlugin/src/test/java/org/lowcoder/plugins/Smtp4DevContainerSupport.java @@ -0,0 +1,140 @@ +package org.lowcoder.plugins; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.lowcoder.sdk.contract.ContainerImages; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.wait.strategy.Wait; +import org.testcontainers.lifecycle.Startables; +import org.testcontainers.utility.DockerImageName; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.UncheckedIOException; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * The two smtp4dev containers of the SMTP STARTTLS tests (default build, not heavy-container: started once per test JVM on + * first use, in parallel, removed by Testcontainers' reaper when the JVM exits): {@link #STARTTLS}, whose server offers + * STARTTLS with the self-signed certificate smtp4dev generates at start ({@code ServerOptions__TlsMode=StartTls}), and + * {@link #PLAIN}, the control that offers no TLS ({@code None}). No file is copied into either. Messages the servers received are + * read from smtp4dev's HTTP API ({@code /api/messages}); {@link #capabilities} asks a server what its EHLO answer advertises. + * A generic container, as elsewhere in this module's siblings. No Docker guard on purpose (owner decision D-7). Not a test. + */ +final class Smtp4DevContainerSupport { + + static final int SMTP_PORT = 25; + static final int HTTP_PORT = 80; + static final String TLS_MODE_ENV = "ServerOptions__TlsMode"; + static final String TLS_MODE_STARTTLS = "StartTls"; + static final String TLS_MODE_NONE = "None"; + static final String MESSAGES_PATH = "/api/messages"; + static final String STARTTLS_CAPABILITY = "STARTTLS"; + private static final String EHLO_NAME = "test.local"; + private static final int CONNECT_TIMEOUT_MILLIS = 5000; + private static final int READ_TIMEOUT_MILLIS = 10_000; + private static final Duration START_TIMEOUT = Duration.ofMinutes(2); + private static final Duration HTTP_TIMEOUT = Duration.ofSeconds(10); + private static final ObjectMapper JSON = new ObjectMapper(); + private static final HttpClient HTTP = HttpClient.newHttpClient(); + + private Smtp4DevContainerSupport() { + } + + /** A started smtp4dev and the ways to reach it. */ + static final class Server { + private final GenericContainer container; + private final String name; + + private Server(String name, String tlsMode) { + this.name = name; + this.container = new GenericContainer<>(DockerImageName.parse(ContainerImages.SMTP4DEV_3_6)) + .withEnv(TLS_MODE_ENV, tlsMode).withExposedPorts(SMTP_PORT, HTTP_PORT) + .waitingFor(Wait.forHttp(MESSAGES_PATH).forPort(HTTP_PORT).forStatusCode(200).withStartupTimeout(START_TIMEOUT)); + } + + String host() { + return container.getHost(); + } + + int smtpPort() { + return container.getMappedPort(SMTP_PORT); + } + + /** The datasource config map of this server, without credentials (smtp4dev accepts any sender and needs no login). */ + Map configMap() { + return Map.of("host", host(), "port", smtpPort()); + } + + /** The subjects of the messages the server has stored, in the order its API lists them. */ + List subjects() { + try { + HttpResponse response = HTTP.send(HttpRequest.newBuilder(URI.create("http://" + host() + ":" + + container.getMappedPort(HTTP_PORT) + MESSAGES_PATH)).timeout(HTTP_TIMEOUT).GET().build(), + HttpResponse.BodyHandlers.ofString()); + JsonNode results = JSON.readTree(response.body()).path("results"); + List subjects = new ArrayList<>(); + results.forEach(message -> subjects.add(message.path("subject").asText())); + return subjects; + } catch (IOException e) { + throw new UncheckedIOException("cannot read the messages of " + name, e); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new IllegalStateException("interrupted while reading the messages of " + name, e); + } + } + + /** The capability lines of the server's answer to EHLO, read over a plain socket (the part of the answer after "250-" or "250 "). */ + List capabilities() { + try (Socket socket = new Socket()) { + socket.connect(new InetSocketAddress(host(), smtpPort()), CONNECT_TIMEOUT_MILLIS); + socket.setSoTimeout(READ_TIMEOUT_MILLIS); + BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream(), StandardCharsets.US_ASCII)); + in.readLine(); + socket.getOutputStream().write(("EHLO " + EHLO_NAME + "\r\n").getBytes(StandardCharsets.US_ASCII)); + socket.getOutputStream().flush(); + List capabilities = new ArrayList<>(); + String line; + while ((line = in.readLine()) != null) { + capabilities.add(line.substring(4)); + if (line.charAt(3) == ' ') { + break; + } + } + return capabilities; + } catch (IOException e) { + throw new UncheckedIOException("cannot read the EHLO answer of " + name, e); + } + } + + @Override + public String toString() { + return name + " " + host() + ":" + smtpPort(); + } + } + + static final Server STARTTLS; + static final Server PLAIN; + + static { + long start = System.nanoTime(); + Server starttls = new Server("smtp4dev-starttls", TLS_MODE_STARTTLS); + Server plain = new Server("smtp4dev-plain", TLS_MODE_NONE); + Startables.deepStart(starttls.container, plain.container).join(); + STARTTLS = starttls; + PLAIN = plain; + System.out.println("[Smtp4DevContainerSupport] " + ContainerImages.SMTP4DEV_3_6 + " started twice in " + + (System.nanoTime() - start) / 1_000_000 + " ms: " + STARTTLS + ", " + PLAIN); + } +} diff --git a/server/api-service/lowcoder-plugins/smtpPlugin/src/test/java/org/lowcoder/plugins/SmtpStartTlsContainerTest.java b/server/api-service/lowcoder-plugins/smtpPlugin/src/test/java/org/lowcoder/plugins/SmtpStartTlsContainerTest.java new file mode 100644 index 000000000..c6ebbb302 --- /dev/null +++ b/server/api-service/lowcoder-plugins/smtpPlugin/src/test/java/org/lowcoder/plugins/SmtpStartTlsContainerTest.java @@ -0,0 +1,116 @@ +package org.lowcoder.plugins; + +import jakarta.mail.Session; +import org.junit.jupiter.api.Test; +import org.lowcoder.plugins.SmtpPlugin.SmtpEngine; +import org.lowcoder.sdk.exception.PluginCommonError; +import org.lowcoder.sdk.models.DatasourceTestResult; +import org.lowcoder.sdk.models.QueryExecutionResult; + +import java.time.Duration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.lowcoder.plugins.Smtp4DevContainerSupport.PLAIN; +import static org.lowcoder.plugins.Smtp4DevContainerSupport.STARTTLS; +import static org.lowcoder.plugins.Smtp4DevContainerSupport.STARTTLS_CAPABILITY; + +/** + * Unit SM-3: the SMTP engine against a server that offers STARTTLS with a self-signed certificate it generated itself + * ({@link Smtp4DevContainerSupport#STARTTLS}, the pinned smtp4dev image; no certificate is made or copied by the test). The + * engine enables STARTTLS ({@code mail.smtp.starttls.enable}) without a trust setting, so JavaMail upgrades the connection + * and verifies the server's certificate against the JDK's default trust (the host name is not checked, + * {@code mail.smtp.ssl.checkserveridentity=false}). The tests pin what that gives for an untrusted certificate: the TLS + * handshake fails, test-connection reports a failed result naming it, a send is an error result and the server stores no + * message. The control is the same engine against a server that offers no STARTTLS ({@link Smtp4DevContainerSupport#PLAIN}): + * test-connection succeeds and the mail is stored, so the failure is the certificate's, not the engine's or the image's. + * + *

    Limits: only the refusal of an untrusted certificate is shown; there is no setting for trusting one, so a successful + * STARTTLS session with a trusted certificate is not tested; the TLS version is the engine's TLSv1.2. + */ +public class SmtpStartTlsContainerTest { + + static final String TAG = "[SmtpStartTlsContainerTest] "; + static final Duration BLOCK_TIMEOUT = Duration.ofSeconds(30); + static final String QUERY_CODE_OK = "OK"; + static final String FROM = "sender@example.com"; + static final String TO = "to@example.com"; + static final String CONNECT_FAILURE_TEXT = "Could not convert socket to TLS"; + static final String HANDSHAKE_TEXT = "SSLHandshakeException"; + static final String PKIX_TEXT = "PKIX path building failed"; + static final String QUERY_EXECUTION_ERROR_KEY = "QUERY_EXECUTION_ERROR"; + + private final SmtpEngine engine = new SmtpEngine(); + + private static Map query(String subject) { + Map query = new HashMap<>(); + query.put("from", FROM); + query.put("to", "[\"" + TO + "\"]"); + query.put("subject", subject); + query.put("content", "

    over STARTTLS?

    "); + return query; + } + + @Test + public void theStarttlsServerAdvertisesStarttlsAndThePlainControlDoesNot() { + List starttls = STARTTLS.capabilities(); + List plain = PLAIN.capabilities(); + System.out.println(TAG + "EHLO of " + STARTTLS + ": " + starttls); + System.out.println(TAG + "EHLO of " + PLAIN + ": " + plain); + assertTrue(starttls.contains(STARTTLS_CAPABILITY), "the STARTTLS server advertises STARTTLS: " + starttls); + assertFalse(plain.contains(STARTTLS_CAPABILITY), "the control server does not: " + plain); + } + + @Test + public void testConnectionAgainstAnUntrustedStarttlsCertificateIsAFailedResultNamingTheHandshake() { + DatasourceTestResult result = engine.testConnection(engine.resolveConfig(STARTTLS.configMap())).block(BLOCK_TIMEOUT); + assertNotNull(result); + String message = result.isSuccess() ? "" : result.getInvalidMessage(Locale.ENGLISH); + System.out.println(TAG + "test connection against " + STARTTLS + ": success=" + result.isSuccess() + " message=" + message); + assertFalse(result.isSuccess(), "an untrusted certificate must fail the test"); + assertTrue(message.contains(CONNECT_FAILURE_TEXT) || message.contains(HANDSHAKE_TEXT) || message.contains(PKIX_TEXT), + "the message names the TLS failure: " + message); + } + + @Test + public void aSendThroughAnUntrustedStarttlsCertificateIsAnErrorResultNamingTheHandshakeAndTheServerStoresNothing() { + var datasource = engine.resolveConfig(STARTTLS.configMap()); + Session session = engine.createConnection(datasource).block(BLOCK_TIMEOUT); + String subject = "starttls-refused"; + var context = engine.buildQueryExecutionContext(datasource, query(subject), Map.of(), null); + QueryExecutionResult result = engine.executeQuery(session, context).block(BLOCK_TIMEOUT); + assertNotNull(result); + System.out.println(TAG + "send against " + STARTTLS + ": code=" + result.getQueryCode() + " key=" + result.getMessageKey() + + " args=" + Arrays.toString(result.getMessageArgs())); + assertEquals(PluginCommonError.QUERY_EXECUTION_ERROR.name(), result.getQueryCode(), "the engine reports the refused TLS upgrade as an error result"); + assertEquals(QUERY_EXECUTION_ERROR_KEY, result.getMessageKey()); + String detail = Arrays.toString(result.getMessageArgs()); + assertTrue(detail.contains(CONNECT_FAILURE_TEXT) || detail.contains(HANDSHAKE_TEXT) || detail.contains(PKIX_TEXT), + "the error names the TLS failure: " + detail); + assertFalse(STARTTLS.subjects().contains(subject), "the refused send stored no message: " + STARTTLS.subjects()); + } + + @Test + public void theSameEngineTestsAndSendsAgainstTheServerWithoutStarttls() { + var datasource = engine.resolveConfig(PLAIN.configMap()); + DatasourceTestResult result = engine.testConnection(datasource).block(BLOCK_TIMEOUT); + assertNotNull(result); + System.out.println(TAG + "control test connection against " + PLAIN + ": success=" + result.isSuccess()); + assertTrue(result.isSuccess(), "the control server passes the test"); + + Session session = engine.createConnection(datasource).block(BLOCK_TIMEOUT); + String subject = "plain-control"; + var context = engine.buildQueryExecutionContext(datasource, query(subject), Map.of(), null); + QueryExecutionResult sent = engine.executeQuery(session, context).block(BLOCK_TIMEOUT); + System.out.println(TAG + "control send -> " + sent.getQueryCode() + "; stored subjects " + PLAIN.subjects()); + assertEquals(QUERY_CODE_OK, sent.getQueryCode()); + assertTrue(PLAIN.subjects().contains(subject), "the control server stored the message: " + PLAIN.subjects()); + } +} diff --git a/server/api-service/lowcoder-plugins/snowflakePlugin/src/test/java/org/lowcoder/plugin/snowflake/SnowflakeDriverStubTest.java b/server/api-service/lowcoder-plugins/snowflakePlugin/src/test/java/org/lowcoder/plugin/snowflake/SnowflakeDriverStubTest.java new file mode 100644 index 000000000..bcc9f13ae --- /dev/null +++ b/server/api-service/lowcoder-plugins/snowflakePlugin/src/test/java/org/lowcoder/plugin/snowflake/SnowflakeDriverStubTest.java @@ -0,0 +1,311 @@ +package org.lowcoder.plugin.snowflake; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.zaxxer.hikari.HikariDataSource; +import org.junit.jupiter.api.Test; +import org.lowcoder.sdk.contract.RecordingHttpServer; +import org.lowcoder.sdk.contract.RecordingHttpServer.Handler; +import org.lowcoder.sdk.contract.RecordingHttpServer.Request; +import org.lowcoder.sdk.contract.RecordingHttpServer.Response; +import org.lowcoder.sdk.exception.PluginException; +import org.lowcoder.sdk.models.DatasourceTestResult; +import org.lowcoder.sdk.models.QueryExecutionResult; +import org.lowcoder.sdk.plugin.common.sql.HikariPerfWrapper; +import org.lowcoder.sdk.plugin.common.sql.SqlBasedQueryExecutionContext; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.SQLException; +import java.time.Duration; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit SN-3: the real Snowflake JDBC driver (snowflake-jdbc 3.22.0), loaded by {@link SnowflakeConnector} and talking to a local + * stand-in of the Snowflake REST API ({@link RecordingHttpServer} answering the login, query, heartbeat and logout requests in + * the shape of the service's JSON answers), so the driver loads, the Hikari pool initialises, a test connection succeeds and a + * SELECT returns rows through {@link SnowflakeQueryExecutor}. Nothing of the driver is mocked, and nothing is set JVM-wide. + * + *

    How the driver is pointed at the stand-in: {@code SnowflakeConnector} fixes the host ({@code .snowflakecomputing.com}) + * and passes the datasource's {@code extParams} to the driver as connection properties ({@code SqlBasedConnector}). Those + * properties are the driver's own ({@code SFSessionProperty}, read from the 3.22.0 jar): {@code useProxy}, {@code proxyHost}, + * {@code proxyPort} and {@code proxyProtocol=http} send every request, as a plain HTTP request with the full URL, to the stand-in + * as if it were a proxy, and {@code ssl=off} makes the driver use {@code http} for the account host (no TLS, no OCSP). + * {@code gzipDisabled=true} sends the query body as plain JSON, which the test reads. {@code JDBC_QUERY_RESULT_FORMAT=JSON} asks for the JSON result format, which the stand-in answers ({@code rowset}); Arrow, the + * service's default, is not served. + * + *

    Limits: the answers are made to resemble the service's, not recorded from an account (there is none in the tests), so they + * show that the driver and the plugin work against that protocol shape, not that Snowflake answers so; only the JSON result + * format, one chunk, no bind parameters, no MFA, key-pair or OAuth login; the structure query is not served. + */ +public class SnowflakeDriverStubTest { + + static final String TAG = "[SnowflakeDriverStubTest] "; + static final Duration TIMEOUT = Duration.ofSeconds(60); + static final ObjectMapper JSON = new ObjectMapper(); + static final String LOGIN_PATH = "/session/v1/login-request"; + static final String QUERY_PATH = "/queries/v1/query-request"; + static final String HEARTBEAT_PATH = "/session/heartbeat"; + static final String SESSION_PATH = "/session"; + static final String HOST = "stub"; + static final String ACCOUNT_SUFFIX = ".snowflakecomputing.com"; + static final String DATABASE = "ANALYTICS"; + static final String USER = "LOADER"; + static final String PASSWORD = "stub-secret-pw"; + static final String SELECT_SQL = "SELECT 1 AS ID, 'x' AS NAME"; + static final String BAD_SQL = "SELECT * FROM MISSING_TABLE"; + static final String WRONG_LOGIN_CODE = "390100"; + static final String WRONG_LOGIN_MESSAGE = "Incorrect username or password was specified."; + static final String COMPILATION_ERROR_CODE = "002003"; + static final String COMPILATION_ERROR_MESSAGE = "SQL compilation error:\nObject 'MISSING_TABLE' does not exist or not authorized."; + static final String LOGOUT_QUERY = "delete=true"; + static final int OK = 200; + + /** The session parameters of a login answer, as the service sends them (a subset); the driver reads AUTOCOMMIT from them. */ + static final String LOGIN_PARAMETERS = "[" + + "{\"name\":\"AUTOCOMMIT\",\"value\":true}," + + "{\"name\":\"CLIENT_SESSION_KEEP_ALIVE\",\"value\":false}," + + "{\"name\":\"CLIENT_PREFETCH_THREADS\",\"value\":4}," + + "{\"name\":\"CLIENT_RESULT_CHUNK_SIZE\",\"value\":160}," + + "{\"name\":\"CLIENT_MEMORY_LIMIT\",\"value\":1536}," + + "{\"name\":\"CLIENT_STAGE_ARRAY_BINDING_THRESHOLD\",\"value\":65280}," + + "{\"name\":\"JDBC_QUERY_RESULT_FORMAT\",\"value\":\"JSON\"}," + + "{\"name\":\"TIMEZONE\",\"value\":\"America/Los_Angeles\"}," + + "{\"name\":\"DATE_OUTPUT_FORMAT\",\"value\":\"YYYY-MM-DD\"}," + + "{\"name\":\"TIME_OUTPUT_FORMAT\",\"value\":\"HH24:MI:SS\"}," + + "{\"name\":\"TIMESTAMP_OUTPUT_FORMAT\",\"value\":\"YYYY-MM-DD HH24:MI:SS.FF3 TZHTZM\"}," + + "{\"name\":\"BINARY_OUTPUT_FORMAT\",\"value\":\"HEX\"}]"; + + private static Response json(String body) { + return new Response(OK, Map.of("Content-Type", List.of("application/json")), body.getBytes(StandardCharsets.UTF_8)); + } + + private static Response loginAccepted() { + return json("{\"data\":{\"masterToken\":\"master-token\",\"token\":\"session-token\",\"validityInSeconds\":3600," + + "\"masterValidityInSeconds\":14400,\"displayUserName\":\"" + USER + "\",\"serverVersion\":\"8.40.0\",\"firstLogin\":false," + + "\"remMeToken\":null,\"remMeValidityInSeconds\":0,\"healthCheckInterval\":45,\"newClientForUpgrade\":null," + + "\"sessionId\":1001,\"parameters\":" + LOGIN_PARAMETERS + ",\"sessionInfo\":{\"databaseName\":\"" + DATABASE + + "\",\"schemaName\":\"PUBLIC\",\"warehouseName\":\"WH\",\"roleName\":\"ANALYST\"},\"idToken\":null," + + "\"idTokenValidityInSeconds\":0,\"responseData\":null,\"mfaToken\":null,\"mfaTokenValidityInSeconds\":0}," + + "\"code\":null,\"message\":null,\"success\":true}"); + } + + private static Response loginRefused() { + return json("{\"data\":{\"nextAction\":\"RETRY_LOGIN\",\"authnMethod\":\"USERNAME_PASSWORD\",\"signInOptions\":{}}," + + "\"code\":\"" + WRONG_LOGIN_CODE + "\",\"message\":\"" + WRONG_LOGIN_MESSAGE + "\",\"success\":false,\"headers\":null}"); + } + + private static Response selectAnswered() { + return json("{\"data\":{\"parameters\":" + LOGIN_PARAMETERS + ",\"rowtype\":[" + + "{\"name\":\"ID\",\"database\":\"\",\"schema\":\"\",\"table\":\"\",\"nullable\":false,\"length\":null,\"type\":\"fixed\"," + + "\"scale\":0,\"precision\":1,\"byteLength\":null,\"collation\":null}," + + "{\"name\":\"NAME\",\"database\":\"\",\"schema\":\"\",\"table\":\"\",\"nullable\":false,\"length\":1,\"type\":\"text\"," + + "\"scale\":null,\"precision\":null,\"byteLength\":4,\"collation\":null}]," + + "\"rowset\":[[\"1\",\"x\"]],\"total\":1,\"returned\":1,\"queryId\":\"01b0a8c1-0000-0000-0000-000000000001\"," + + "\"databaseProvider\":null,\"finalDatabaseName\":\"" + DATABASE + "\",\"finalSchemaName\":\"PUBLIC\"," + + "\"finalWarehouseName\":\"WH\",\"finalRoleName\":\"ANALYST\",\"numberOfBinds\":0,\"arrayBindSupported\":false," + + "\"statementTypeId\":4096,\"version\":1,\"sendResultTime\":1700000000000,\"queryResultFormat\":\"json\"}," + + "\"code\":null,\"message\":null,\"success\":true}"); + } + + private static Response compilationError() { + return json("{\"data\":{\"internalError\":false,\"errorCode\":\"" + COMPILATION_ERROR_CODE + "\",\"age\":0,\"sqlState\":\"42S02\"," + + "\"queryId\":\"01b0a8c1-0000-0000-0000-000000000002\",\"line\":1,\"pos\":14,\"type\":\"COMPILATION\"}," + + "\"code\":\"" + COMPILATION_ERROR_CODE + "\",\"message\":\"SQL compilation error:\\nObject 'MISSING_TABLE' does not exist or not authorized.\"," + + "\"success\":false,\"headers\":null}"); + } + + private static Response acknowledged() { + return json("{\"data\":null,\"code\":null,\"message\":null,\"success\":true}"); + } + + /** The stand-in: login, query, heartbeat and logout, each answered by the given response of its path. */ + private static RecordingHttpServer standIn(Response login, Response query) { + Map handlers = new LinkedHashMap<>(); + handlers.put(LOGIN_PATH, request -> login); + handlers.put(QUERY_PATH, request -> query); + handlers.put(HEARTBEAT_PATH, request -> acknowledged()); + handlers.put(SESSION_PATH, request -> acknowledged()); + return RecordingHttpServer.serve(handlers); + } + + /** The datasource of the stand-in: the driver's proxy properties name the stand-in's port. */ + private static SnowflakeDatasourceConfig datasource(RecordingHttpServer server, String password) { + Map extParams = new LinkedHashMap<>(); + extParams.put("useProxy", "true"); + extParams.put("proxyHost", RecordingHttpServer.LOOPBACK); + extParams.put("proxyPort", String.valueOf(server.port())); + extParams.put("proxyProtocol", "http"); + extParams.put("ssl", "off"); + extParams.put("JDBC_QUERY_RESULT_FORMAT", "JSON"); + extParams.put("gzipDisabled", "true"); + extParams.put("loginTimeout", "20"); + return SnowflakeDatasourceConfig.builder().host(HOST).database(DATABASE).username(USER).password(password).extParams(extParams).build(); + } + + private static String pathOf(Request request) { + return request.pathAndQuery().split("\\?")[0]; + } + + private static List requestsTo(RecordingHttpServer server, String path) { + return server.requests().stream().filter(request -> pathOf(request).equals(path)).toList(); + } + + private static JsonNode bodyOf(Request request) { + try { + return JSON.readTree(request.bodyText()); + } catch (IOException e) { + throw new IllegalStateException("not JSON: " + request.pathAndQuery(), e); + } + } + + private static void printRequests(RecordingHttpServer server) { + server.requests().forEach(request -> System.out.println(TAG + "recorded " + request.method() + " " + request.pathAndQuery() + + " (" + request.body().length + " bytes)")); + } + + /** Waits for a logout the driver sends when its pool closes; it is sent from the closing thread, so it is there on return, with a short grace for the stand-in's own bookkeeping. */ + private static List logoutsOf(RecordingHttpServer server) { + long deadline = System.nanoTime() + Duration.ofSeconds(10).toNanos(); + List logouts = requestsTo(server, SESSION_PATH).stream().filter(request -> request.pathAndQuery().contains(LOGOUT_QUERY)).toList(); + while (logouts.isEmpty() && System.nanoTime() < deadline) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new IllegalStateException(e); + } + logouts = requestsTo(server, SESSION_PATH).stream().filter(request -> request.pathAndQuery().contains(LOGOUT_QUERY)).toList(); + } + return logouts; + } + + @Test + public void testConnectionLoadsTheDriverLogsInThroughTheProxyPropertiesAndLogsOut() { + try (RecordingHttpServer server = standIn(loginAccepted(), selectAnswered())) { + DatasourceTestResult result = new SnowflakeConnector().testConnection(datasource(server, PASSWORD)).block(TIMEOUT); + printRequests(server); + assertNotNull(result, "testConnection emits a result"); + assertTrue(result.isSuccess(), "the stand-in accepted the login, so the test passes"); + + List logins = requestsTo(server, LOGIN_PATH); + assertFalse(logins.isEmpty(), "the driver sent a login request to the stand-in: " + server.requests().stream().map(Request::pathAndQuery).toList()); + Request login = logins.get(0); + assertEquals("POST", login.method()); + assertTrue(login.pathAndQuery().contains("databaseName=" + DATABASE), "the db property is the login's database: " + login.pathAndQuery()); + JsonNode data = bodyOf(login).path("data"); + assertEquals(HOST, data.path("ACCOUNT_NAME").asText(), "the account is the datasource's host"); + assertEquals(USER, data.path("LOGIN_NAME").asText(), "the user property is the login name"); + assertEquals(PASSWORD, data.path("PASSWORD").asText(), "the password property is the login password"); + assertEquals("JSON", data.path("SESSION_PARAMETERS").path("JDBC_QUERY_RESULT_FORMAT").asText(), "the extParams reach the driver as session parameters"); + assertEquals("JDBC", data.path("CLIENT_APP_ID").asText(), "the request is the JDBC driver's"); + + List logouts = logoutsOf(server); + assertFalse(logouts.isEmpty(), "closing the tested pool logged the session out: " + server.requests().stream().map(Request::pathAndQuery).toList()); + assertEquals("POST", logouts.get(0).method()); + } + } + + @Test + public void aSelectRunsThroughTheExecutorAndItsRowsComeFromTheJsonRowset() throws SQLException { + try (RecordingHttpServer server = standIn(loginAccepted(), selectAnswered())) { + SnowflakeConnector connector = new SnowflakeConnector(); + SnowflakeDatasourceConfig config = datasource(server, PASSWORD); + HikariPerfWrapper pool = connector.createConnection(config).block(TIMEOUT); + try { + assertNotNull(pool, "createConnection emits the pool"); + HikariDataSource dataSource = (HikariDataSource) pool.getHikariDataSource(); + assertTrue(dataSource.isRunning(), "the pool is running"); + assertEquals("net.snowflake.client.jdbc.SnowflakeDriver", dataSource.getDriverClassName()); + assertEquals("jdbc:snowflake://" + HOST + ACCOUNT_SUFFIX + "/", dataSource.getJdbcUrl()); + try (Connection connection = dataSource.getConnection()) { + DatabaseMetaData metaData = connection.getMetaData(); + System.out.println(TAG + "driver " + metaData.getDriverName() + " " + metaData.getDriverVersion()); + assertTrue(metaData.getDriverVersion().startsWith("3.22"), "the driver is snowflake-jdbc 3.22.x: " + metaData.getDriverVersion()); + } + + SnowflakeQueryExecutor executor = new SnowflakeQueryExecutor(); + Map queryConfig = new LinkedHashMap<>(); + queryConfig.put("mode", "SQL"); + queryConfig.put("sql", SELECT_SQL); + SqlBasedQueryExecutionContext context = executor.buildQueryExecutionContext(config, queryConfig, Map.of(), null); + QueryExecutionResult result = executor.executeQuery(pool, context).block(TIMEOUT); + printRequests(server); + assertNotNull(result); + System.out.println(TAG + "select -> " + result.getQueryCode() + " " + result.getData()); + assertEquals("OK", result.getQueryCode()); + @SuppressWarnings("unchecked") + List> rows = (List>) result.getData(); + assertEquals(1, rows.size(), "one row from the rowset"); + assertEquals(1L, ((Number) rows.get(0).get("ID")).longValue(), "the fixed(1,0) column is read as a number: " + rows.get(0)); + assertEquals("x", rows.get(0).get("NAME"), "the text column is read as text: " + rows.get(0)); + + List queries = requestsTo(server, QUERY_PATH); + assertEquals(1, queries.size(), "one query request reached the stand-in"); + JsonNode sent = bodyOf(queries.get(0)); + assertEquals(SELECT_SQL, sent.path("sqlText").asText(), "the statement is sent as written (no bind parameters: the executor forces a plain statement)"); + assertTrue(queries.get(0).header("Authorization").stream().anyMatch(value -> value.contains("session-token")), + "the query carries the session token of the login answer: " + queries.get(0).header("Authorization")); + } finally { + connector.destroyConnection(pool).block(TIMEOUT); + } + assertFalse(logoutsOf(server).isEmpty(), "destroying the pool logged the session out"); + } + } + + @Test + public void aRefusedLoginIsAFailedTestConnectionWithTheServicesMessage() { + try (RecordingHttpServer server = standIn(loginRefused(), selectAnswered())) { + SnowflakeConnector connector = new SnowflakeConnector(); + RuntimeException thrown = assertThrows(RuntimeException.class, + () -> connector.testConnection(datasource(server, "wrong-password")).block(TIMEOUT), "a refused login must not give a result"); + System.out.println(TAG + "refused login: " + thrown.getClass().getSimpleName() + ": " + thrown.getMessage()); + assertTrue(String.valueOf(thrown.getMessage()).contains(WRONG_LOGIN_MESSAGE), "the error carries the service's text: " + thrown.getMessage()); + assertFalse(requestsTo(server, LOGIN_PATH).isEmpty(), "the login request reached the stand-in"); + // what DatasourceServiceImpl.testDatasourceLocally does with the error + DatasourceTestResult mapped = connector.testConnection(datasource(server, "wrong-password")) + .onErrorResume(error -> reactor.core.publisher.Mono.just(DatasourceTestResult.testFail(error))).block(TIMEOUT); + assertNotNull(mapped); + assertFalse(mapped.isSuccess(), "the mapped result is a failure"); + String message = mapped.getInvalidMessage(Locale.ENGLISH); + System.out.println(TAG + "mapped failed result: " + message); + assertTrue(message.contains(WRONG_LOGIN_MESSAGE), message); + assertTrue(requestsTo(server, QUERY_PATH).isEmpty(), "no query was sent after a refused login"); + } + } + + @Test + public void aStatementTheServiceRefusesIsAPluginExceptionWithItsMessage() { + try (RecordingHttpServer server = standIn(loginAccepted(), compilationError())) { + SnowflakeConnector connector = new SnowflakeConnector(); + SnowflakeDatasourceConfig config = datasource(server, PASSWORD); + HikariPerfWrapper pool = connector.createConnection(config).block(TIMEOUT); + try { + SnowflakeQueryExecutor executor = new SnowflakeQueryExecutor(); + Map queryConfig = new LinkedHashMap<>(); + queryConfig.put("mode", "SQL"); + queryConfig.put("sql", BAD_SQL); + SqlBasedQueryExecutionContext context = executor.buildQueryExecutionContext(config, queryConfig, Map.of(), null); + Throwable failure = assertThrows(Throwable.class, () -> executor.executeQuery(pool, context).block(TIMEOUT)); + System.out.println(TAG + "refused statement: " + failure.getClass().getSimpleName() + ": " + failure.getMessage()); + assertInstanceOf(PluginException.class, failure, "the executor maps the driver's SQLException: " + failure); + assertTrue(String.valueOf(failure.getMessage()).contains("MISSING_TABLE"), "the service's message is kept: " + failure.getMessage()); + assertEquals(1, requestsTo(server, QUERY_PATH).size(), "the statement reached the stand-in"); + } finally { + connector.destroyConnection(pool).block(TIMEOUT); + } + } + } +} diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ContainerImages.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ContainerImages.java index abec2da1b..4e23238c2 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ContainerImages.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ContainerImages.java @@ -18,7 +18,7 @@ *

    Licences (confirmed from each image's documentation, 2026-10-04): MySQL GPLv2; PostgreSQL License; Redis 7.2.4 * BSD-3; MongoDB SSPL; ClickHouse Apache-2.0; SQL Server under its EULA (Developer/Express editions, no production use); * Elasticsearch 8.15 Elastic License 2.0; Oracle Database Free under the Oracle Free Use Terms (the image packaging - * Apache-2.0). They are used for tests only (owner decision D-5). + * Apache-2.0). smtp4dev BSD-3-Clause (the repository's licence on GitHub, 2026-11-20). They are used for tests only (owner decision D-5). */ public final class ContainerImages { @@ -33,6 +33,14 @@ public final class ContainerImages { "mysql:8.0@sha256:7dcddc01f13bab2f15cde676d44d01f61fc9f99fe7785e86196dfc07d358ae2b"; public static final String CLICKHOUSE_24_8 = "clickhouse/clickhouse-server:24.8-alpine@sha256:b002e56ed5c16e224c312527f6fcba7e77216fec5d7a88a7828f59efc614feb5"; + /** + * An SMTP server that generates its own self-signed certificate at start and offers STARTTLS when started with + * {@code ServerOptions__TlsMode=StartTls} (smtpPlugin's STARTTLS tests); its HTTP API on port 80 lists the messages it received. + * The digest is the registry's index digest, read with {@code docker pull} and {@code docker inspect --format '{{index .RepoDigests 0}}'} + * on 2026-11-20. + */ + public static final String SMTP4DEV_3_6 = + "rnwood/smtp4dev:3.6.1@sha256:912304153668068188d83b612fe0b7c4ec852dddb45fb2946895c7a72e89c6f2"; /** Heavy: started only by tests tagged {@code heavy-container} (task P0-6). */ public static final String MSSQL_2022 = "mcr.microsoft.com/mssql/server:2022-CU27-ubuntu-22.04@sha256:4402d880dd4c34bfa7d8705e56a86cd6c88da80a1f6bbbe741f999e76264a090"; diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServer.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServer.java index a84a2afdd..bebc13f96 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServer.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServer.java @@ -3,6 +3,10 @@ import com.fasterxml.jackson.databind.util.RawValue; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpServer; +import com.sun.net.httpserver.HttpsConfigurator; +import com.sun.net.httpserver.HttpsServer; + +import javax.net.ssl.SSLContext; import java.io.IOException; import java.io.UncheckedIOException; @@ -21,6 +25,9 @@ * same technique as the {@code npm-outbound} tests of §4.9). The answer to a path is either fixed ({@link #start}) or * computed from the request ({@link #serve}), e.g. an echo of what the client sent. * + *

    {@link #startSecure} and {@link #serveSecure} start the same server over TLS with the server certificate of the given + * {@link SSLContext} ({@code https://127.0.0.1:}); {@link SelfSignedCertificate} generates one in the test. + * *

    Limits: it binds {@code 127.0.0.1} on a free port; the JDK server adds a {@code Date} header to every answer (the * tests drop it as volatile) and writes header values one byte per character, so a header value is sent as the * ISO-8859-1 bytes of its characters. A path without a response answers 404 with an empty body. @@ -76,10 +83,20 @@ public Map jsonBodyReport() { } private final HttpServer server; + private final String scheme; private final List requests = Collections.synchronizedList(new ArrayList<>()); - private RecordingHttpServer(Map handlers) throws IOException { - server = HttpServer.create(new InetSocketAddress(InetAddress.getByName(LOOPBACK), ANY_PORT), BACKLOG); + private RecordingHttpServer(Map handlers, SSLContext tls) throws IOException { + InetSocketAddress address = new InetSocketAddress(InetAddress.getByName(LOOPBACK), ANY_PORT); + if (tls == null) { + server = HttpServer.create(address, BACKLOG); + scheme = "http"; + } else { + HttpsServer secure = HttpsServer.create(address, BACKLOG); + secure.setHttpsConfigurator(new HttpsConfigurator(tls)); + server = secure; + scheme = "https"; + } server.createContext("/", exchange -> answer(exchange, handlers)); server.start(); } @@ -93,16 +110,32 @@ public static RecordingHttpServer start(Map responses) { /** Starts a server answering each request with the handler of its exact path (without query). */ public static RecordingHttpServer serve(Map handlers) { + return serve(handlers, null); + } + + /** Starts a TLS server, with the certificate of {@code tls}, answering {@code responses} by exact path (without query). */ + public static RecordingHttpServer startSecure(SSLContext tls, Map responses) { + Map handlers = new LinkedHashMap<>(); + responses.forEach((path, response) -> handlers.put(path, request -> response)); + return serveSecure(tls, handlers); + } + + /** Starts a TLS server, with the certificate of {@code tls}, answering each request with the handler of its exact path (without query). */ + public static RecordingHttpServer serveSecure(SSLContext tls, Map handlers) { + return serve(handlers, tls); + } + + private static RecordingHttpServer serve(Map handlers, SSLContext tls) { try { - return new RecordingHttpServer(handlers); + return new RecordingHttpServer(handlers, tls); } catch (IOException e) { throw new UncheckedIOException("cannot start the local HTTP server", e); } } - /** {@code http://127.0.0.1:}. */ + /** {@code http://127.0.0.1:}, or {@code https://...} for a TLS server. */ public String baseUrl() { - return "http://" + LOOPBACK + ":" + server.getAddress().getPort(); + return scheme + "://" + LOOPBACK + ":" + server.getAddress().getPort(); } public int port() { diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServerSecureTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServerSecureTest.java new file mode 100644 index 000000000..8c7632bc3 --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServerSecureTest.java @@ -0,0 +1,117 @@ +package org.lowcoder.sdk.contract; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.lowcoder.sdk.contract.RecordingHttpServer.Response; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLException; +import javax.net.ssl.TrustManagerFactory; +import java.io.ByteArrayInputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.nio.file.Path; +import java.security.KeyStore; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.time.Duration; +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * The TLS variant of {@link RecordingHttpServer} with a certificate of {@link SelfSignedCertificate}: a client that trusts + * only that certificate reads the answer and the server records the request; a client with the JDK's default trust refuses + * the handshake, so the server never sees a request. The test is the proof that the variant really serves TLS and that the + * generated certificate is the one the server presents. + */ +public class RecordingHttpServerSecureTest { + + static final String TAG = "[RecordingHttpServerSecureTest] "; + static final String PATH = "/secure"; + static final String ANSWER = "over tls"; + static final String HTTPS_PREFIX = "https://127.0.0.1:"; + static final Duration TIMEOUT = Duration.ofSeconds(20); + static final int OK = 200; + + @TempDir + static Path directory; + private static SelfSignedCertificate certificate; + + @BeforeAll + static void generate() { + certificate = SelfSignedCertificate.generate(directory, "recording"); + System.out.println(TAG + "certificate PEM starts with " + certificate.pem().lines().findFirst().orElse("")); + } + + private static Map answers() { + return Map.of(PATH, new Response(OK, Map.of(), ANSWER.getBytes(StandardCharsets.UTF_8))); + } + + private static SSLContext trusting(String pem) throws Exception { + X509Certificate cert = (X509Certificate) CertificateFactory.getInstance("X.509") + .generateCertificate(new ByteArrayInputStream(pem.getBytes(StandardCharsets.UTF_8))); + KeyStore trust = KeyStore.getInstance(KeyStore.getDefaultType()); + trust.load(null, null); + trust.setCertificateEntry("server", cert); + TrustManagerFactory factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + factory.init(trust); + SSLContext context = SSLContext.getInstance("TLS"); + context.init(null, factory.getTrustManagers(), null); + return context; + } + + private static HttpResponse get(HttpClient client, String url) throws Exception { + return client.send(HttpRequest.newBuilder(URI.create(url + PATH)).timeout(TIMEOUT).GET().build(), + HttpResponse.BodyHandlers.ofString()); + } + + @Test + public void aClientTrustingTheGeneratedCertificateReadsTheAnswerAndTheRequestIsRecorded() throws Exception { + try (RecordingHttpServer server = RecordingHttpServer.startSecure(certificate.serverContext(), answers())) { + assertTrue(server.baseUrl().startsWith(HTTPS_PREFIX), server.baseUrl()); + HttpClient client = HttpClient.newBuilder().sslContext(trusting(certificate.pem())).build(); + HttpResponse response = get(client, server.baseUrl()); + System.out.println(TAG + server.baseUrl() + PATH + " -> " + response.statusCode() + " " + response.body()); + assertEquals(OK, response.statusCode()); + assertEquals(ANSWER, response.body()); + List requests = server.requests(); + assertEquals(1, requests.size(), "the server recorded exactly the one request: " + requests); + assertEquals(PATH, requests.get(0).pathAndQuery()); + } + } + + @Test + public void aClientWithTheDefaultTrustRefusesTheSelfSignedHandshakeSoNoRequestIsRecorded() throws Exception { + try (RecordingHttpServer server = RecordingHttpServer.startSecure(certificate.serverContext(), answers())) { + HttpClient client = HttpClient.newHttpClient(); + Exception failure = assertThrows(Exception.class, () -> get(client, server.baseUrl())); + System.out.println(TAG + "default trust -> " + failure); + assertInstanceOf(SSLException.class, failure.getCause() == null ? failure : failure.getCause(), failure.toString()); + assertEquals(0, server.requests().size(), "a refused handshake reaches no handler: " + server.requests()); + } + } + + @Test + public void aCertificateOfAnotherGenerationIsNotTheOneTheServerPresents() throws Exception { + SelfSignedCertificate other = SelfSignedCertificate.generate(directory, "other"); + assertNotNull(other.pem()); + assertNotEquals(certificate.pem(), other.pem(), "two generations give two certificates"); + try (RecordingHttpServer server = RecordingHttpServer.startSecure(certificate.serverContext(), answers())) { + HttpClient client = HttpClient.newBuilder().sslContext(trusting(other.pem())).build(); + Exception failure = assertThrows(Exception.class, () -> get(client, server.baseUrl())); + System.out.println(TAG + "trusting the other certificate -> " + failure); + assertEquals(0, server.requests().size(), "no request passed a handshake against an untrusted certificate"); + } + } +} diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/SelfSignedCertificate.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/SelfSignedCertificate.java new file mode 100644 index 000000000..1df6518c2 --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/SelfSignedCertificate.java @@ -0,0 +1,95 @@ +package org.lowcoder.sdk.contract; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.util.concurrent.TimeUnit; + +/** + * A self-signed server certificate generated in the test with the JDK's {@code keytool} (the technique of + * {@code WebClientBuildHelperTest}): a PKCS12 key store in the given directory, the certificate as PEM (what a datasource's + * "verify self-signed certificate" setting holds) and an {@link SSLContext} that serves it, for + * {@link RecordingHttpServer#startSecure}. The certificate names {@code CN=localhost} with the subject alternative names + * {@code 127.0.0.1} and {@code localhost}. Nothing is copied anywhere: the key store stays in the test's own directory. + */ +public final class SelfSignedCertificate { + + private static final String STORE_PASSWORD = "changeit"; + private static final String ALIAS = "test"; + private static final String STORE_TYPE = "PKCS12"; + private static final int KEY_SIZE = 2048; + private static final int VALIDITY_DAYS = 1; + private static final String SUBJECT = "CN=localhost"; + private static final String SUBJECT_ALTERNATIVE_NAMES = "san=ip:127.0.0.1,dns:localhost"; + private static final long KEYTOOL_TIMEOUT_SECONDS = 60; + private static final String TLS = "TLS"; + + private final Path keyStore; + private final String pem; + + private SelfSignedCertificate(Path keyStore, String pem) { + this.keyStore = keyStore; + this.pem = pem; + } + + /** Generates a certificate whose key store is {@code directory/.p12}. */ + public static SelfSignedCertificate generate(Path directory, String name) { + Path store = directory.resolve(name + ".p12"); + String keytool = Path.of(System.getProperty("java.home"), "bin", "keytool").toString(); + run(keytool, "-genkeypair", "-alias", ALIAS, "-keyalg", "RSA", "-keysize", String.valueOf(KEY_SIZE), "-dname", SUBJECT, + "-ext", SUBJECT_ALTERNATIVE_NAMES, "-validity", String.valueOf(VALIDITY_DAYS), "-storetype", STORE_TYPE, + "-keystore", store.toString(), "-storepass", STORE_PASSWORD, "-keypass", STORE_PASSWORD); + String pem = run(keytool, "-exportcert", "-alias", ALIAS, "-rfc", "-keystore", store.toString(), "-storepass", STORE_PASSWORD); + return new SelfSignedCertificate(store, pem); + } + + /** The certificate in PEM form ({@code -----BEGIN CERTIFICATE-----}...). */ + public String pem() { + return pem; + } + + /** An SSL context whose server identity is this certificate. */ + public SSLContext serverContext() { + try { + KeyStore keys = KeyStore.getInstance(STORE_TYPE); + try (InputStream in = Files.newInputStream(keyStore)) { + keys.load(in, STORE_PASSWORD.toCharArray()); + } + KeyManagerFactory keyManagers = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); + keyManagers.init(keys, STORE_PASSWORD.toCharArray()); + SSLContext context = SSLContext.getInstance(TLS); + context.init(keyManagers.getKeyManagers(), null, null); + return context; + } catch (IOException e) { + throw new UncheckedIOException("cannot read the key store " + keyStore, e); + } catch (GeneralSecurityException e) { + throw new IllegalStateException("cannot build the SSL context of " + keyStore, e); + } + } + + private static String run(String... command) { + try { + Process process = new ProcessBuilder(command).redirectErrorStream(true).start(); + String output; + try (InputStream in = process.getInputStream()) { + output = new String(in.readAllBytes(), StandardCharsets.UTF_8); + } + if (!process.waitFor(KEYTOOL_TIMEOUT_SECONDS, TimeUnit.SECONDS) || process.exitValue() != 0) { + throw new IllegalStateException(String.join(" ", command) + " failed:\n" + output); + } + return output; + } catch (IOException e) { + throw new UncheckedIOException("cannot run " + command[0], e); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new IllegalStateException("interrupted while running " + command[0], e); + } + } +} diff --git a/server/api-service/lowcoder-server/pom.xml b/server/api-service/lowcoder-server/pom.xml index 8fc6658ef..04ee33f31 100644 --- a/server/api-service/lowcoder-server/pom.xml +++ b/server/api-service/lowcoder-server/pom.xml @@ -193,6 +193,20 @@ testcontainers test + + + com.icegreen + greenmail + 2.0.1 + test + + + junit + junit + + + com.jayway.jsonpath json-path diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/PluginServers.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/PluginServers.java new file mode 100644 index 000000000..77560181a --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/PluginServers.java @@ -0,0 +1,132 @@ +package org.lowcoder.api.plugin; + +import org.lowcoder.sdk.contract.ContainerImages; +import org.testcontainers.containers.Container.ExecResult; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.wait.strategy.Wait; +import org.testcontainers.lifecycle.Startables; +import org.testcontainers.utility.DockerImageName; + +import java.io.IOException; +import java.time.Duration; + +/** + * The database servers of {@link ShadedPluginJarsIntegrationTest}: PostgreSQL, MySQL, ClickHouse, MongoDB with authentication and a + * password-protected Redis, all pinned images of {@link ContainerImages}, started once per test JVM, in parallel, on first use, and removed by + * Testcontainers' reaper when the JVM exits (the shared-container pattern of {@code TestContainers}). Generic containers, as in + * the plugins' own tests; nothing is copied into a container. No Docker guard on purpose: without a Docker daemon the first use fails. + * Not a test. + */ +final class PluginServers { + + static final String DATABASE = "app"; + static final String USER = "appuser"; + static final String PASSWORD = "apppass"; + static final String WRONG_PASSWORD = "not-the-password"; + static final String MONGO_ROOT_USER = "root"; + static final String MONGO_ROOT_PASSWORD = "root-pw"; + static final String REDIS_PASSWORD = "s3cret-pass"; + + static final int POSTGRES_PORT = 5432; + static final int MYSQL_PORT = 3306; + static final int CLICKHOUSE_HTTP_PORT = 8123; + static final int MONGO_PORT = 27017; + static final int REDIS_PORT = 6379; + + private static final Duration START_TIMEOUT = Duration.ofMinutes(3); + private static final int POSTGRES_READY_MESSAGES = 2; + private static final int MONGO_READY_MESSAGES = 2; + private static final int MONGOSH_ATTEMPTS = 20; + private static final long MONGOSH_PAUSE_MILLIS = 500; + + private static final GenericContainer POSTGRES = new GenericContainer<>(DockerImageName.parse(ContainerImages.POSTGRES_16)) + .withEnv("POSTGRES_DB", DATABASE).withEnv("POSTGRES_USER", USER).withEnv("POSTGRES_PASSWORD", PASSWORD) + .withExposedPorts(POSTGRES_PORT) + .waitingFor(Wait.forLogMessage(".*database system is ready to accept connections.*", POSTGRES_READY_MESSAGES).withStartupTimeout(START_TIMEOUT)); + + private static final GenericContainer MYSQL = new GenericContainer<>(DockerImageName.parse(ContainerImages.MYSQL_8_0)) + .withEnv("MYSQL_DATABASE", DATABASE).withEnv("MYSQL_USER", USER).withEnv("MYSQL_PASSWORD", PASSWORD) + .withEnv("MYSQL_ROOT_PASSWORD", PASSWORD) + .withExposedPorts(MYSQL_PORT) + .waitingFor(Wait.forLogMessage(".*ready for connections.*port: 3306.*", 1).withStartupTimeout(START_TIMEOUT)); + + private static final GenericContainer CLICKHOUSE = new GenericContainer<>(DockerImageName.parse(ContainerImages.CLICKHOUSE_24_8)) + .withEnv("CLICKHOUSE_DB", DATABASE).withEnv("CLICKHOUSE_USER", USER).withEnv("CLICKHOUSE_PASSWORD", PASSWORD) + .withExposedPorts(CLICKHOUSE_HTTP_PORT) + .waitingFor(Wait.forHttp("/ping").forStatusCode(200).withStartupTimeout(START_TIMEOUT)); + + /** The image's init phase starts a temporary server, so readiness is the second "Waiting for connections" line. */ + private static final GenericContainer MONGO = new GenericContainer<>(DockerImageName.parse(ContainerImages.MONGO_7_0)) + .withEnv("MONGO_INITDB_ROOT_USERNAME", MONGO_ROOT_USER).withEnv("MONGO_INITDB_ROOT_PASSWORD", MONGO_ROOT_PASSWORD) + .withExposedPorts(MONGO_PORT) + .waitingFor(Wait.forLogMessage(".*[Ww]aiting for connections.*", MONGO_READY_MESSAGES).withStartupTimeout(START_TIMEOUT)); + + private static final GenericContainer REDIS = new GenericContainer<>(DockerImageName.parse(ContainerImages.REDIS_7_2)) + .withExposedPorts(REDIS_PORT).withCommand("redis-server", "--requirepass", REDIS_PASSWORD) + .waitingFor(Wait.forLogMessage(".*Ready to accept connections.*", 1).withStartupTimeout(START_TIMEOUT)); + + static { + long start = System.nanoTime(); + Startables.deepStart(POSTGRES, MYSQL, CLICKHOUSE, MONGO, REDIS).join(); + createMongoAppUser(); + System.out.println("[PluginServers] postgres " + postgresPort() + ", mysql " + mysqlPort() + ", clickhouse " + clickhousePort() + + ", mongo " + mongoPort() + ", redis " + redisPort() + " started in " + (System.nanoTime() - start) / 1_000_000 + " ms"); + } + + private PluginServers() { + } + + static String host() { + return POSTGRES.getHost(); + } + + static int postgresPort() { + return POSTGRES.getMappedPort(POSTGRES_PORT); + } + + static int mysqlPort() { + return MYSQL.getMappedPort(MYSQL_PORT); + } + + static int clickhousePort() { + return CLICKHOUSE.getMappedPort(CLICKHOUSE_HTTP_PORT); + } + + static int mongoPort() { + return MONGO.getMappedPort(MONGO_PORT); + } + + static int redisPort() { + return REDIS.getMappedPort(REDIS_PORT); + } + + /** The user of database {@link #DATABASE}, created with {@code mongosh} run in the container (an exec; the root user lives in {@code admin}). */ + private static void createMongoAppUser() { + String script = "db.getSiblingDB('" + DATABASE + "').createUser({user: '" + USER + "', pwd: '" + PASSWORD + + "', roles: [{role: 'readWrite', db: '" + DATABASE + "'}]})"; + RuntimeException last = null; + for (int attempt = 1; attempt <= MONGOSH_ATTEMPTS; attempt++) { + try { + ExecResult result = MONGO.execInContainer("mongosh", "--quiet", "-u", MONGO_ROOT_USER, "-p", MONGO_ROOT_PASSWORD, + "--authenticationDatabase", "admin", "--eval", script); + if (result.getExitCode() == 0) { + System.out.println("[PluginServers] mongo user " + USER + " created on attempt " + attempt + ": " + result.getStdout().trim()); + return; + } + last = new IllegalStateException("mongosh exit " + result.getExitCode() + ": " + result.getStdout() + result.getStderr()); + } catch (IOException e) { + last = new IllegalStateException("cannot run mongosh in the container", e); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new IllegalStateException("interrupted while creating the mongo user", e); + } + try { + Thread.sleep(MONGOSH_PAUSE_MILLIS); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new IllegalStateException("interrupted while creating the mongo user", e); + } + } + throw new IllegalStateException("cannot create the mongo user " + USER + " after " + MONGOSH_ATTEMPTS + " attempts", last); + } +} diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginHarness.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginHarness.java new file mode 100644 index 000000000..b8011858d --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginHarness.java @@ -0,0 +1,133 @@ +package org.lowcoder.api.plugin; + +import org.lowcoder.api.framework.configuration.ApplicationConfiguration; +import org.lowcoder.domain.plugin.service.impl.DatasourceMetaInfoServiceImpl; +import org.lowcoder.sdk.config.CommonConfig; +import org.lowcoder.sdk.config.dynamic.ConfigCenter; +import org.lowcoder.sdk.config.dynamic.ConfigCenterForTest; +import org.pf4j.PluginManager; +import org.pf4j.PluginState; +import org.pf4j.PluginWrapper; +import org.pf4j.spring.SpringPluginManager; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.test.util.ReflectionTestUtils; + +import java.nio.file.Path; +import java.util.List; + +/** + * A pf4j plugin manager over a directory of shaded plugin jars, set up as the server sets it up: a Spring context in which the + * server's own {@link ApplicationConfiguration} defines the {@link SpringPluginManager} bean, whose {@code init()} loads and starts the + * plugins and registers their extensions as beans (built by pf4j-spring's extension factory, which injects the beans the extension + * constructors ask for: the {@link ConfigCenter} of the Mongo and ClickHouse plugins, the {@link CommonConfig} of the REST API and + * GraphQL plugins). The context holds only those two beans of its own, so nothing else of the server is started. + * + *

    {@link #production()} uses the server's bean as it is ({@code new SpringPluginManager()}, whose directory is the + * {@code pf4j.pluginsDir} system property, which the failsafe configuration of lowcoder-server sets). {@link #over} uses a + * {@code SpringPluginManager} over the given directory (the way a test builds a directory of its own, as the system property is + * JVM-wide). {@link #metaInfoService()} is the server's {@link DatasourceMetaInfoServiceImpl} over the same manager, so the lookup of a + * connector or an executor by datasource type is the server's. + */ +final class ShadedPluginHarness implements AutoCloseable { + + static final String SESSION_COOKIE = "LOWCODER_SESSION"; + static final String PLUGINS_DIR_PROPERTY = "pf4j.pluginsDir"; + + private final AnnotationConfigApplicationContext context; + private final SpringPluginManager manager; + + private ShadedPluginHarness(AnnotationConfigApplicationContext context, SpringPluginManager manager) { + this.context = context; + this.manager = manager; + } + + /** + * The context's own beans: what the plugins' extension constructors are injected with. Not annotated {@code @Configuration}: the + * server's component scan covers this package, and a stereotype would put these beans into the server's own test contexts. + */ + static class PluginDependencies { + + @Bean + ConfigCenter configCenter() { + return new ConfigCenterForTest(); + } + + @Bean + CommonConfig commonConfig() { + CommonConfig config = new CommonConfig(); + config.setCookieName(SESSION_COOKIE); + return config; + } + } + + /** The same with a plugin manager over {@code directory} instead of the server's no-argument one (not a {@code @Configuration}, see above). */ + static class DirectoryPluginManager { + + static volatile Path directory; + + @Bean + SpringPluginManager pluginManager() { + return new SpringPluginManager(directory); + } + } + + /** The server's own configuration; the plugin directory is the {@code pf4j.pluginsDir} system property. */ + static ShadedPluginHarness production() { + String directory = System.getProperty(PLUGINS_DIR_PROPERTY); + if (directory == null) { + throw new IllegalStateException("-D" + PLUGINS_DIR_PROPERTY + " is not set: the failsafe configuration of lowcoder-server sets it" + + " (../lowcoder-plugins/plugins, filled by the copy-plugins-jar-for-integration-tests step); run the test through failsafe"); + } + AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); + context.register(PluginDependencies.class, ApplicationConfiguration.class); + context.refresh(); + return new ShadedPluginHarness(context, context.getBean(SpringPluginManager.class)); + } + + /** A plugin manager over {@code directory}. */ + static synchronized ShadedPluginHarness over(Path directory) { + DirectoryPluginManager.directory = directory; + AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); + context.register(PluginDependencies.class, DirectoryPluginManager.class); + context.refresh(); + return new ShadedPluginHarness(context, context.getBean(SpringPluginManager.class)); + } + + PluginManager manager() { + return manager; + } + + /** The extensions of {@code type} of plugin {@code pluginId}, as {@code DatasourceMetaInfoServiceImpl} asks for them. */ + List extensions(Class type, String pluginId) { + return manager.getExtensions(type, pluginId); + } + + PluginWrapper plugin(String pluginId) { + return manager.getPlugin(pluginId); + } + + boolean isStarted(String pluginId) { + PluginWrapper wrapper = manager.getPlugin(pluginId); + return wrapper != null && wrapper.getPluginState() == PluginState.STARTED; + } + + /** The server's service that resolves a connector or an executor by datasource type, over this manager. */ + DatasourceMetaInfoServiceImpl metaInfoService() { + DatasourceMetaInfoServiceImpl service = new DatasourceMetaInfoServiceImpl(); + ReflectionTestUtils.setField(service, "pluginManager", manager); + return service; + } + + ConfigurableApplicationContext context() { + return context; + } + + @Override + public void close() { + manager.stopPlugins(); + manager.unloadPlugins(); + context.close(); + } +} diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsIntegrationTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsIntegrationTest.java new file mode 100644 index 000000000..7d702ff8b --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsIntegrationTest.java @@ -0,0 +1,592 @@ +package org.lowcoder.api.plugin; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.icegreen.greenmail.configuration.GreenMailConfiguration; +import com.icegreen.greenmail.util.GreenMail; +import com.icegreen.greenmail.util.ServerSetup; +import jakarta.mail.Multipart; +import jakarta.mail.internet.InternetAddress; +import jakarta.mail.internet.MimeMessage; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.lowcoder.domain.plugin.service.impl.DatasourceMetaInfoServiceImpl; +import org.lowcoder.sdk.contract.RecordingHttpServer; +import org.lowcoder.sdk.contract.RecordingHttpServer.Handler; +import org.lowcoder.sdk.contract.RecordingHttpServer.Response; +import org.lowcoder.sdk.models.DatasourceConnectionConfig; +import org.lowcoder.sdk.models.DatasourceTestResult; +import org.lowcoder.sdk.models.QueryExecutionResult; +import org.lowcoder.sdk.plugin.common.DatasourceConnector; +import org.lowcoder.sdk.plugin.common.QueryExecutor; +import org.lowcoder.sdk.query.QueryExecutionContext; +import org.lowcoder.sdk.query.QueryVisitorContext; +import org.pf4j.PluginClassLoader; +import org.pf4j.PluginWrapper; +import reactor.core.publisher.Mono; + +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotSame; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.lowcoder.api.plugin.PluginServers.DATABASE; +import static org.lowcoder.api.plugin.PluginServers.PASSWORD; +import static org.lowcoder.api.plugin.PluginServers.USER; +import static org.lowcoder.api.plugin.PluginServers.WRONG_PASSWORD; + +/** + * The datasource plugins as production loads them: the shaded plugin jars that lowcoder-server's build copies into the plugins + * directory ({@code pf4j.pluginsDir}), loaded by a pf4j plugin manager set up the way the server sets it up + * ({@link ShadedPluginHarness}), then driven through the {@code do*} wrappers of {@link DatasourceConnector} and + * {@link QueryExecutor} that the server calls, in the server's order: resolve the config from its JSON map, validate it, test the + * connection, create the connection, build the query context ({@code buildQueryExecutionContextMono}), execute, destroy. + * No plugin module is on this module's test class path, so everything that runs here is a class of a shaded jar, loaded by the plugin's + * own class loader. + * + *

    Covered: the 13 shipped jars load and start; for postgres, mysql, clickhouse, mongo, redis (pinned containers, {@link PluginServers}), + * smtp (GreenMail) and restapi, graphql ({@link RecordingHttpServer}) the plugin class, its extensions and its shaded libraries come from + * the plugin's class loader while the {@code provided} classes (SDK, reactor, the Mongo driver, jakarta.mail, Spring WebClient) resolve + * through the parent; {@code DatasourceMetaInfoServiceImpl} finds the same extensions by datasource type; and each of those eight + * datasources passes test-connection (and, where the plugin has credentials, fails it with a wrong one), creates a connection, runs one + * write and one read (REST and GraphQL: a mutating and a reading request; SMTP: a mail sent and read back from the server; Redis: SET and + * GET; Mongo: insert and find). + * + *

    Limits: mssql, oracle, elasticsearch (heavy containers), googleSheets (needs a Google account) and snowflake (its stand-in test is in + * the plugin) only load here; the validation step is run for every datasource and pinned for the two plugins that refuse a loopback host + * (Mongo and Redis: the containers are on loopback, so their execution steps skip the validation the server would apply first); the + * negative cases (a jar without its extension index) are in {@link ShadedPluginJarsNegativeIntegrationTest}. + */ +@SuppressWarnings({"rawtypes", "unchecked"}) +public class ShadedPluginJarsIntegrationTest { + + static final String TAG = "[ShadedPluginJarsIntegrationTest] "; + static final Duration TIMEOUT = Duration.ofSeconds(60); + static final String QUERY_CODE_OK = "OK"; + static final ObjectMapper JSON = new ObjectMapper(); + + static final String POSTGRES = "postgres-plugin"; + static final String MYSQL = "mysql-plugin"; + static final String CLICKHOUSE = "clickHouse-plugin"; + static final String MONGO = "mongo-plugin"; + static final String REDIS = "redis-plugin"; + static final String SMTP = "smtp-plugin"; + static final String RESTAPI = "restapi-plugin"; + static final String GRAPHQL = "graphql-plugin"; + static final Set SHIPPED_PLUGIN_IDS = Set.of(POSTGRES, MYSQL, CLICKHOUSE, MONGO, REDIS, SMTP, RESTAPI, GRAPHQL, + "mssql-plugin", "oracle-plugin", "es-plugin", "googleSheets-plugin", "snowflake-plugin"); + + static final String SDK_CONNECTOR_CLASS = "org.lowcoder.sdk.plugin.common.DatasourceConnector"; + static final String REACTOR_CLASS = "reactor.core.publisher.Mono"; + static final String MONGO_DRIVER_CLASS = "com.mongodb.reactivestreams.client.MongoClients"; + static final String JAKARTA_MAIL_CLASS = "jakarta.mail.Session"; + static final String WEB_CLIENT_CLASS = "org.springframework.web.reactive.function.client.WebClient"; + static final String COMMONS_COLLECTIONS_CLASS = "org.apache.commons.collections4.ListUtils"; + + static final String SMTP_LOGIN = "mailer"; + static final String SMTP_PASSWORD = "mailer-pw"; + static final String SMTP_LOGIN_EMAIL = "mailer@example.com"; + static final String LOOPBACK = "127.0.0.1"; + static final String INVALID_HOST = "INVALID_HOST"; + static final String REST_ITEMS_PATH = "/items"; + static final String GRAPHQL_PATH = "/graphql"; + static final long MAIL_WAIT_MILLIS = 10_000; + + private static ShadedPluginHarness harness; + private static DatasourceMetaInfoServiceImpl metaInfo; + private static GreenMail mailServer; + private static RecordingHttpServer restServer; + private static RecordingHttpServer graphqlServer; + + @BeforeAll + static void start() { + long start = System.nanoTime(); + harness = ShadedPluginHarness.production(); + metaInfo = harness.metaInfoService(); + System.out.println(TAG + "plugin manager loaded " + harness.manager().getPlugins().size() + " plugins from " + System.getProperty(ShadedPluginHarness.PLUGINS_DIR_PROPERTY) + + " in " + (System.nanoTime() - start) / 1_000_000 + " ms"); + + mailServer = new GreenMail(new ServerSetup(0, LOOPBACK, ServerSetup.PROTOCOL_SMTP)); + mailServer.withConfiguration(GreenMailConfiguration.aConfig().withUser(SMTP_LOGIN_EMAIL, SMTP_LOGIN, SMTP_PASSWORD)); + mailServer.start(); + + restServer = RecordingHttpServer.serve(restHandlers()); + graphqlServer = RecordingHttpServer.serve(graphqlHandlers()); + PluginServers.host(); + System.out.println(TAG + "all servers up after " + (System.nanoTime() - start) / 1_000_000 + " ms: smtp " + mailServer.getSmtp().getPort() + + ", rest " + restServer.baseUrl() + ", graphql " + graphqlServer.baseUrl()); + } + + @AfterAll + static void stop() { + if (harness != null) { + harness.close(); + } + if (mailServer != null) { + mailServer.stop(); + } + if (restServer != null) { + restServer.close(); + } + if (graphqlServer != null) { + graphqlServer.close(); + } + } + + // ---- the stand-in HTTP servers + + private static Response jsonResponse(int status, String body) { + return new Response(status, Map.of("Content-Type", List.of("application/json")), body.getBytes(StandardCharsets.UTF_8)); + } + + private static Map restHandlers() { + Map handlers = new LinkedHashMap<>(); + handlers.put(REST_ITEMS_PATH, request -> "POST".equals(request.method()) + ? jsonResponse(201, "{\"id\":7,\"created\":" + request.bodyText() + "}") + : jsonResponse(200, "{\"items\":[{\"id\":7,\"name\":\"widget\"}]}")); + return handlers; + } + + private static Map graphqlHandlers() { + Map handlers = new LinkedHashMap<>(); + handlers.put(GRAPHQL_PATH, request -> request.bodyText().contains("mutation") + ? jsonResponse(200, "{\"data\":{\"addHero\":{\"id\":\"42\"}}}") + : jsonResponse(200, "{\"data\":{\"hero\":{\"name\":\"R2-D2\"}}}")); + return handlers; + } + + // ---- one datasource driven through the server's wrappers + + /** A datasource of a plugin: its connector and executor extensions (by plugin id) and the config the connector resolves from the JSON map. */ + private static final class Datasource { + final String pluginId; + final DatasourceConnector connector; + final QueryExecutor executor; + final DatasourceConnectionConfig config; + + Datasource(String pluginId, Map configMap) { + this.pluginId = pluginId; + List connectors = harness.extensions(DatasourceConnector.class, pluginId); + List executors = harness.extensions(QueryExecutor.class, pluginId); + assertEquals(1, connectors.size(), pluginId + ": exactly one DatasourceConnector extension, found " + connectors); + assertEquals(1, executors.size(), pluginId + ": exactly one QueryExecutor extension, found " + executors); + this.connector = connectors.get(0); + this.executor = executors.get(0); + this.config = connector.resolveConfig(configMap); + assertNotNull(config, pluginId + ": resolveConfig answered a config"); + } + + Set validate() { + return connector.doValidateConfig(config); + } + + /** As {@code DatasourceServiceImpl.testDatasourceLocally}: an error of the test is a failed result. */ + DatasourceTestResult test() { + DatasourceTestResult result = (DatasourceTestResult) connector.doTestConnection(config) + .timeout(TIMEOUT) + .onErrorResume(error -> Mono.just(DatasourceTestResult.testFail((Throwable) error))) + .block(TIMEOUT); + assertNotNull(result, pluginId + ": test connection emitted a result"); + System.out.println(TAG + pluginId + " test connection: success=" + result.isSuccess() + + (result.isSuccess() ? "" : " message=" + result.getInvalidMessage(Locale.ENGLISH))); + return result; + } + + Object connect() { + Object connection = connector.doCreateConnection(config).block(TIMEOUT); + assertNotNull(connection, pluginId + ": doCreateConnection emitted a connection"); + return connection; + } + + /** As {@code QueryExecutionServiceImpl.executeLocally}: build the context, then execute it on the connection. */ + QueryExecutionResult run(Object connection, Map queryConfig) { + QueryVisitorContext visitor = new QueryVisitorContext("userId1", "workspace1", 8080, null, null, null); + Object context = executor.buildQueryExecutionContextMono(config, queryConfig, Map.of(), visitor).block(TIMEOUT); + assertNotNull(context, pluginId + ": the query context was built"); + QueryExecutionResult result = (QueryExecutionResult) executor.doExecuteQuery(connection, (QueryExecutionContext) context).block(TIMEOUT); + assertNotNull(result, pluginId + ": the query emitted a result"); + System.out.println(TAG + pluginId + " query " + queryConfig + " -> " + result.getQueryCode() + " " + result.getData()); + return result; + } + + void destroy(Object connection) { + connector.destroyConnection(connection).block(TIMEOUT); + } + } + + private static String unique(String prefix) { + return prefix + "_" + UUID.randomUUID().toString().replace("-", "").substring(0, 8); + } + + // ---- the jars load, and from the plugin's class loader + + @Test + public void everyShippedPluginJarLoadsAndStarts() { + Set loaded = new java.util.TreeSet<>(); + harness.manager().getPlugins().forEach(plugin -> loaded.add(plugin.getPluginId())); + System.out.println(TAG + "loaded plugins: " + loaded); + assertEquals(new java.util.TreeSet<>(SHIPPED_PLUGIN_IDS), loaded, "the plugins directory holds exactly the 13 shaded plugin jars"); + for (String pluginId : SHIPPED_PLUGIN_IDS) { + assertTrue(harness.isStarted(pluginId), pluginId + " is STARTED, it is " + harness.plugin(pluginId).getPluginState()); + } + } + + static Stream loaders() { + return Stream.of( + Arguments.of(POSTGRES, "org.lowcoder.plugin.postgres.PostgresPlugin", "org.postgresql.Driver", List.of(SDK_CONNECTOR_CLASS, REACTOR_CLASS)), + Arguments.of(MYSQL, "org.lowcoder.plugin.mysql.MysqlPlugin", "com.mysql.cj.jdbc.Driver", List.of(SDK_CONNECTOR_CLASS, REACTOR_CLASS)), + Arguments.of(CLICKHOUSE, "org.lowcoder.plugin.clickhouse.ClickHousePlugin", "com.clickhouse.jdbc.ClickHouseDriver", List.of(SDK_CONNECTOR_CLASS, REACTOR_CLASS)), + Arguments.of(MONGO, "org.lowcoder.plugin.mongo.MongoPlugin", COMMONS_COLLECTIONS_CLASS, List.of(SDK_CONNECTOR_CLASS, REACTOR_CLASS, MONGO_DRIVER_CLASS)), + Arguments.of(REDIS, "org.lowcoder.plugin.redis.RedisPlugin", "redis.clients.jedis.Jedis", List.of(SDK_CONNECTOR_CLASS, REACTOR_CLASS)), + Arguments.of(SMTP, "org.lowcoder.plugins.SmtpPlugin", COMMONS_COLLECTIONS_CLASS, List.of(SDK_CONNECTOR_CLASS, REACTOR_CLASS, JAKARTA_MAIL_CLASS)), + Arguments.of(RESTAPI, "org.lowcoder.plugin.restapi.RestApiPlugin", COMMONS_COLLECTIONS_CLASS, List.of(SDK_CONNECTOR_CLASS, REACTOR_CLASS, WEB_CLIENT_CLASS)), + Arguments.of(GRAPHQL, "org.lowcoder.plugin.graphql.GraphQLPlugin", COMMONS_COLLECTIONS_CLASS, List.of(SDK_CONNECTOR_CLASS, REACTOR_CLASS, WEB_CLIENT_CLASS))); + } + + @ParameterizedTest(name = "{0}") + @MethodSource("loaders") + public void pluginExtensionsAndShadedLibrariesComeFromThePluginClassLoaderAndProvidedClassesFromTheParent(String pluginId, + String pluginClass, String shadedClass, List providedClasses) throws Exception { + ClassLoader appLoader = ShadedPluginJarsIntegrationTest.class.getClassLoader(); + PluginWrapper wrapper = harness.plugin(pluginId); + assertNotNull(wrapper, pluginId + " is loaded"); + ClassLoader pluginLoader = harness.manager().getPluginClassLoader(pluginId); + System.out.println(TAG + pluginId + ": plugin loader " + pluginLoader.getClass().getName() + ", parent " + pluginLoader.getParent() + + ", test loader " + appLoader); + assertInstanceOf(PluginClassLoader.class, pluginLoader, "the plugin has a pf4j PluginClassLoader"); + assertNotSame(appLoader, pluginLoader, "the plugin's loader is not the application's"); + + Object plugin = wrapper.getPlugin(); + assertEquals(pluginClass, plugin.getClass().getName()); + assertSame(pluginLoader, plugin.getClass().getClassLoader(), "the Plugin class is loaded by the plugin's loader"); + + for (Class type : List.of(DatasourceConnector.class, QueryExecutor.class)) { + List extensions = harness.extensions(type, pluginId); + assertEquals(1, extensions.size(), pluginId + ": one " + type.getSimpleName() + " extension"); + Class extensionClass = extensions.get(0).getClass(); + System.out.println(TAG + pluginId + ": " + type.getSimpleName() + " extension " + extensionClass.getName() + " loaded by " + extensionClass.getClassLoader()); + assertSame(pluginLoader, extensionClass.getClassLoader(), type.getSimpleName() + " extension class comes from the plugin's loader"); + assertTrue(type.isAssignableFrom(extensionClass), "the extension implements the application's " + type.getName()); + } + + Class shaded = Class.forName(shadedClass, false, pluginLoader); + System.out.println(TAG + pluginId + ": shaded " + shadedClass + " loaded by " + shaded.getClassLoader()); + assertSame(pluginLoader, shaded.getClassLoader(), shadedClass + " is a library shaded into the jar, loaded by the plugin's loader"); + + for (String provided : providedClasses) { + Class viaPlugin = Class.forName(provided, false, pluginLoader); + Class viaApplication = Class.forName(provided, false, appLoader); + System.out.println(TAG + pluginId + ": provided " + provided + " loaded by " + viaPlugin.getClassLoader()); + assertSame(viaApplication, viaPlugin, provided + " is the application's class, resolved through the plugin's parent"); + assertNotSame(pluginLoader, viaPlugin.getClassLoader(), provided + " is not loaded by the plugin's loader"); + } + } + + @ParameterizedTest(name = "{0}") + @MethodSource("typesAndPlugins") + public void metaInfoServiceFindsTheSameExtensionsByDatasourceType(String datasourceType, String pluginId) { + DatasourceConnector connector = metaInfo.getDatasourceConnector(datasourceType); + QueryExecutor executor = metaInfo.getQueryExecutor(datasourceType); + ClassLoader pluginLoader = harness.manager().getPluginClassLoader(pluginId); + System.out.println(TAG + datasourceType + " -> " + connector.getClass().getName() + " / " + executor.getClass().getName()); + assertSame(pluginLoader, connector.getClass().getClassLoader(), datasourceType + ": the connector is the " + pluginId + " extension"); + assertSame(pluginLoader, executor.getClass().getClassLoader(), datasourceType + ": the executor is the " + pluginId + " extension"); + assertEquals(harness.extensions(DatasourceConnector.class, pluginId).get(0).getClass(), connector.getClass()); + assertEquals(harness.extensions(QueryExecutor.class, pluginId).get(0).getClass(), executor.getClass()); + } + + static Stream typesAndPlugins() { + return Stream.of(Arguments.of("postgres", POSTGRES), Arguments.of("mysql", MYSQL), Arguments.of("mariadb", MYSQL), + Arguments.of("clickHouse", CLICKHOUSE), Arguments.of("mongodb", MONGO), Arguments.of("redis", REDIS), + Arguments.of("smtp", SMTP), Arguments.of("restApi", RESTAPI), Arguments.of("graphql", GRAPHQL)); + } + + // ---- SQL plugins + + private static Map sqlConfig(String sql) { + Map config = new LinkedHashMap<>(); + config.put("mode", "SQL"); + config.put("sql", sql); + config.put("disablePreparedStatement", false); + return config; + } + + private static Map sqlDatasource(int port, String password) { + Map config = new LinkedHashMap<>(); + config.put("database", DATABASE); + config.put("username", USER); + config.put("password", password); + config.put("host", PluginServers.host()); + config.put("port", port); + config.put("usingSsl", false); + return config; + } + + /** Test connection (right and wrong password), create connection, a CREATE and an INSERT, and a SELECT that reads the row back. */ + private void sqlLifecycle(String pluginId, int port, String createSql, String insertSql, String selectSql, String wrongPasswordText, + Set expectedValidation) { + Datasource wrong = new Datasource(pluginId, sqlDatasource(port, WRONG_PASSWORD)); + DatasourceTestResult refused = wrong.test(); + assertFalse(refused.isSuccess(), pluginId + ": a wrong password fails test-connection"); + assertTrue(refused.getInvalidMessage(Locale.ENGLISH).contains(wrongPasswordText), + pluginId + ": the failed result names the refusal (" + wrongPasswordText + "): " + refused.getInvalidMessage(Locale.ENGLISH)); + + Datasource datasource = new Datasource(pluginId, sqlDatasource(port, PASSWORD)); + Set invalid = datasource.validate(); + System.out.println(TAG + pluginId + " validation of " + datasource.config.getClass().getSimpleName() + ": " + invalid); + assertEquals(expectedValidation, invalid, pluginId + ": the validation of a config whose host is " + PluginServers.host()); + assertTrue(datasource.test().isSuccess(), pluginId + ": the right credentials pass test-connection"); + + Object connection = datasource.connect(); + try { + assertEquals(QUERY_CODE_OK, datasource.run(connection, sqlConfig(createSql)).getQueryCode(), pluginId + ": the CREATE succeeds"); + assertEquals(QUERY_CODE_OK, datasource.run(connection, sqlConfig(insertSql)).getQueryCode(), pluginId + ": the INSERT succeeds"); + QueryExecutionResult read = datasource.run(connection, sqlConfig(selectSql)); + assertEquals(QUERY_CODE_OK, read.getQueryCode()); + List> rows = (List>) read.getData(); + assertEquals(1, rows.size(), pluginId + ": the SELECT reads the inserted row back: " + rows); + assertEquals(1, ((Number) rows.get(0).get("id")).intValue(), pluginId + ": id of " + rows); + assertEquals("shaded", rows.get(0).get("name"), pluginId + ": name of " + rows); + } finally { + datasource.destroy(connection); + } + } + + @Test + public void postgresPluginRunsFromItsShadedJar() { + String table = unique("e2e_pg"); + sqlLifecycle(POSTGRES, PluginServers.postgresPort(), "create table " + table + " (id int primary key, name text)", + "insert into " + table + " values (1, 'shaded')", "select id, name from " + table, "password authentication failed", Set.of()); + } + + @Test + public void mysqlPluginRunsFromItsShadedJar() { + String table = unique("e2e_my"); + sqlLifecycle(MYSQL, PluginServers.mysqlPort(), "create table " + table + " (id int primary key, name varchar(20))", + "insert into " + table + " values (1, 'shaded')", "select id, name from " + table, "Access denied", Set.of()); + } + + /** The ClickHouse validation refuses a loopback host like Mongo's and Redis's (postgres and mysql accept it), and the container is on loopback, so it is pinned here and the execution steps go on without applying it. */ + @Test + public void clickhousePluginRunsFromItsShadedJar() { + String table = unique("e2e_ch"); + sqlLifecycle(CLICKHOUSE, PluginServers.clickhousePort(), "create table " + table + " (id Int32, name String) engine = Memory", + "insert into " + table + " values (1, 'shaded')", "select id, name from " + table, "Authentication failed", Set.of(INVALID_HOST)); + } + + // ---- Mongo + + private static Map mongoDatasource(String password) { + Map config = new LinkedHashMap<>(); + config.put("host", PluginServers.host()); + config.put("port", PluginServers.mongoPort()); + config.put("database", DATABASE); + config.put("username", USER); + config.put("password", password); + return config; + } + + private static Map mongoForm(String type, String collection, String... compKeysAndValues) { + Map comp = new HashMap<>(); + for (int i = 0; i < compKeysAndValues.length; i += 2) { + comp.put(compKeysAndValues[i], compKeysAndValues[i + 1]); + } + Map form = new HashMap<>(); + form.put("compType", type); + form.put("collection", collection); + form.put("comp", comp); + return form; + } + + @Test + public void mongoPluginRunsFromItsShadedJar() throws Exception { + DatasourceTestResult refused = new Datasource(MONGO, mongoDatasource(WRONG_PASSWORD)).test(); + assertFalse(refused.isSuccess(), "a wrong password fails the Mongo test-connection"); + assertTrue(refused.getInvalidMessage(Locale.ENGLISH).contains("Exception authenticating"), refused.getInvalidMessage(Locale.ENGLISH)); + + Datasource datasource = new Datasource(MONGO, mongoDatasource(PASSWORD)); + Set invalid = datasource.validate(); + System.out.println(TAG + MONGO + " validation of a loopback host: " + invalid); + assertFalse(invalid.isEmpty(), "the Mongo validation refuses a loopback host (the container is on loopback, so the server's validation step is not applied below)"); + assertTrue(datasource.test().isSuccess(), "the app user passes the Mongo test-connection"); + + Object connection = datasource.connect(); + try { + String collection = unique("e2e_mongo"); + QueryExecutionResult inserted = datasource.run(connection, mongoForm("INSERT", collection, "documents", "{\"n\": 1, \"name\": \"shaded\"}")); + assertEquals(QUERY_CODE_OK, inserted.getQueryCode()); + assertEquals("{\"n\":1}", String.valueOf(inserted.getData()), "one document inserted"); + QueryExecutionResult found = datasource.run(connection, mongoForm("FIND", collection, "projection", "{\"_id\": 0}")); + assertEquals(QUERY_CODE_OK, found.getQueryCode()); + assertEquals(JSON.readTree("[{\"n\":1,\"name\":\"shaded\"}]"), JSON.readTree(String.valueOf(found.getData())), "the inserted document is read back"); + } finally { + datasource.destroy(connection); + } + } + + // ---- Redis + + private static Map redisDatasource(String password) { + Map config = new LinkedHashMap<>(); + config.put("host", PluginServers.host()); + config.put("port", PluginServers.redisPort()); + config.put("password", password); + return config; + } + + private static Map redisForm(String command, String... compKeysAndValues) { + Map comp = new HashMap<>(); + for (int i = 0; i < compKeysAndValues.length; i += 2) { + comp.put(compKeysAndValues[i], compKeysAndValues[i + 1]); + } + Map form = new HashMap<>(); + form.put("compType", command); + form.put("comp", comp); + return form; + } + + @Test + public void redisPluginRunsFromItsShadedJar() { + DatasourceTestResult refused = new Datasource(REDIS, redisDatasource(WRONG_PASSWORD)).test(); + assertFalse(refused.isSuccess(), "a wrong password fails the Redis test-connection"); + + Datasource datasource = new Datasource(REDIS, redisDatasource(PluginServers.REDIS_PASSWORD)); + Set invalid = datasource.validate(); + System.out.println(TAG + REDIS + " validation of a loopback host: " + invalid); + assertEquals(Set.of(INVALID_HOST), invalid, "the Redis validation refuses a loopback host (the container is on loopback, so the server's validation step is not applied below)"); + assertTrue(datasource.test().isSuccess(), "the right password passes the Redis test-connection"); + + Object connection = datasource.connect(); + try { + String key = unique("e2e:redis"); + QueryExecutionResult set = datasource.run(connection, redisForm("SET", "key", key, "value", "shaded")); + assertEquals(QUERY_CODE_OK, set.getQueryCode()); + assertEquals("OK", String.valueOf(set.getData()), "SET answers OK"); + QueryExecutionResult get = datasource.run(connection, redisForm("GET", "key", key)); + assertEquals(QUERY_CODE_OK, get.getQueryCode()); + assertEquals("shaded", String.valueOf(get.getData()), "GET reads the value back"); + } finally { + datasource.destroy(connection); + } + } + + // ---- SMTP + + private static Map smtpDatasource(String password) { + Map config = new LinkedHashMap<>(); + config.put("host", LOOPBACK); + config.put("port", mailServer.getSmtp().getPort()); + config.put("username", SMTP_LOGIN); + config.put("password", password); + return config; + } + + @Test + public void smtpPluginRunsFromItsShadedJarAndTheMailIsReadBackFromTheServer() throws Exception { + DatasourceTestResult refused = new Datasource(SMTP, smtpDatasource("wrong-" + SMTP_PASSWORD)).test(); + assertFalse(refused.isSuccess(), "a wrong password fails the SMTP test-connection"); + + Datasource datasource = new Datasource(SMTP, smtpDatasource(SMTP_PASSWORD)); + Set invalid = datasource.validate(); + System.out.println(TAG + SMTP + " validation: " + invalid); + assertTrue(invalid.isEmpty(), "the SMTP config is valid: " + invalid); + assertTrue(datasource.test().isSuccess(), "the right login passes the SMTP test-connection"); + + String subject = unique("e2e-subject"); + Object session = datasource.connect(); + try { + Map mail = new HashMap<>(); + mail.put("from", "sender@example.com"); + mail.put("to", "[\"recipient@example.com\"]"); + mail.put("subject", subject); + mail.put("content", "

    Hello plugin

    "); + QueryExecutionResult sent = datasource.run(session, mail); + assertEquals(QUERY_CODE_OK, sent.getQueryCode(), "the send succeeds"); + } finally { + datasource.destroy(session); + } + assertTrue(mailServer.waitForIncomingEmail(MAIL_WAIT_MILLIS, 1), "the server received the mail"); + MimeMessage[] received = mailServer.getReceivedMessages(); + MimeMessage message = received[received.length - 1]; + System.out.println(TAG + "mail read back: subject=" + message.getSubject() + " from=" + message.getFrom()[0] + " to=" + message.getAllRecipients()[0]); + assertEquals(subject, message.getSubject()); + assertEquals("sender@example.com", ((InternetAddress) message.getFrom()[0]).getAddress()); + assertEquals("recipient@example.com", ((InternetAddress) message.getAllRecipients()[0]).getAddress()); + Multipart body = (Multipart) message.getContent(); + assertEquals("

    Hello plugin

    ", body.getBodyPart(0).getContent(), "the HTML body is read back"); + } + + // ---- REST API and GraphQL + + @Test + public void restApiPluginRunsFromItsShadedJar() throws Exception { + Datasource datasource = new Datasource(RESTAPI, Map.of("url", restServer.baseUrl())); + assertTrue(datasource.validate().isEmpty(), "the REST API config is valid"); + assertTrue(datasource.test().isSuccess(), "the REST API test-connection passes (it makes no request)"); + int before = restServer.requests().size(); + + Object connection = datasource.connect(); + try { + Map write = new HashMap<>(); + write.put("httpMethod", "POST"); + write.put("path", REST_ITEMS_PATH); + write.put("body", "{\"name\":\"widget\"}"); + write.put("headers", List.of(Map.of("key", "Content-Type", "value", "application/json"))); + QueryExecutionResult created = datasource.run(connection, write); + assertEquals(QUERY_CODE_OK, created.getQueryCode()); + assertEquals(7, ((JsonNode) created.getData()).path("id").asInt(), "the POST answer is returned as JSON"); + assertEquals("widget", ((JsonNode) created.getData()).path("created").path("name").asText(), "the server received the body that was written"); + + QueryExecutionResult read = datasource.run(connection, Map.of("httpMethod", "GET", "path", REST_ITEMS_PATH)); + assertEquals(QUERY_CODE_OK, read.getQueryCode()); + assertEquals("widget", ((JsonNode) read.getData()).path("items").path(0).path("name").asText(), "the GET answer is returned as JSON"); + } finally { + datasource.destroy(connection); + } + List requests = restServer.requests().subList(before, restServer.requests().size()); + assertEquals(List.of("POST", "GET"), requests.stream().map(RecordingHttpServer.Request::method).toList(), "the server saw the write, then the read"); + assertEquals("{\"name\":\"widget\"}", requests.get(0).bodyText(), "the POST body on the wire"); + } + + @Test + public void graphqlPluginRunsFromItsShadedJar() throws Exception { + Datasource datasource = new Datasource(GRAPHQL, Map.of("url", graphqlServer.baseUrl())); + assertTrue(datasource.validate().isEmpty(), "the GraphQL config is valid"); + assertTrue(datasource.test().isSuccess(), "the GraphQL test-connection passes (it makes no request)"); + int before = graphqlServer.requests().size(); + + Object connection = datasource.connect(); + try { + QueryExecutionResult mutation = datasource.run(connection, Map.of("path", GRAPHQL_PATH, "body", "mutation { addHero(name: \"x\") { id } }", "variables", List.of())); + assertEquals(QUERY_CODE_OK, mutation.getQueryCode()); + assertEquals("42", ((JsonNode) mutation.getData()).path("data").path("addHero").path("id").asText(), "the mutation answer is returned"); + + QueryExecutionResult query = datasource.run(connection, Map.of("path", GRAPHQL_PATH, "body", "query { hero { name } }", "variables", List.of())); + assertEquals(QUERY_CODE_OK, query.getQueryCode()); + assertEquals("R2-D2", ((JsonNode) query.getData()).path("data").path("hero").path("name").asText(), "the query answer is returned"); + } finally { + datasource.destroy(connection); + } + List requests = graphqlServer.requests().subList(before, graphqlServer.requests().size()); + assertEquals(2, requests.size()); + assertTrue(JSON.readTree(requests.get(0).bodyText()).path("query").asText().startsWith("mutation"), "the first request carried the mutation: " + requests.get(0).bodyText()); + assertTrue(JSON.readTree(requests.get(1).bodyText()).path("query").asText().startsWith("query"), "the second request carried the query: " + requests.get(1).bodyText()); + } +} diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsNegativeIntegrationTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsNegativeIntegrationTest.java new file mode 100644 index 000000000..ab2a85633 --- /dev/null +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsNegativeIntegrationTest.java @@ -0,0 +1,157 @@ +package org.lowcoder.api.plugin; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.lowcoder.sdk.exception.BizError; +import org.lowcoder.sdk.exception.BizException; +import org.lowcoder.sdk.plugin.common.DatasourceConnector; +import org.lowcoder.sdk.plugin.common.QueryExecutor; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.List; +import java.util.function.Predicate; +import java.util.jar.Attributes; +import java.util.jar.JarFile; +import java.util.jar.JarOutputStream; +import java.util.jar.Manifest; +import java.util.zip.ZipEntry; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * The cases in which {@link ShadedPluginJarsIntegrationTest} must fail, run against the real REST API plugin jar of the plugins + * directory and altered copies of it in a directory of the test's own: the intact jar is found (the control, so the other cases fail + * for their reason and not because the setup is wrong); a jar without its {@code META-INF/extensions.idx} loads and starts but offers no + * extension, so the server's lookup by datasource type answers {@code PLUGIN_NOT_FOUND}; a jar whose manifest has no plugin id is not + * loaded; an empty directory loads nothing. + * + *

    Limits: one plugin jar stands for all (they are shaded and described the same way); the alterations are the two descriptor + * files pf4j reads, not damage inside class files. + */ +public class ShadedPluginJarsNegativeIntegrationTest { + + static final String TAG = "[ShadedPluginJarsNegativeIntegrationTest] "; + static final String RESTAPI_PLUGIN_ID = "restapi-plugin"; + static final String RESTAPI_TYPE = "restApi"; + static final String JAR_GLOB = "restApiPlugin-*.jar"; + static final String EXTENSIONS_INDEX = "META-INF/extensions.idx"; + static final String MANIFEST = "META-INF/MANIFEST.MF"; + static final String PLUGIN_ID_ATTRIBUTE = "Plugin-Id"; + static final String PLUGIN_NOT_FOUND_KEY = "PLUGIN_NOT_FOUND"; + + @TempDir + Path directory; + + private static Path shippedRestApiJar() throws IOException { + Path plugins = Path.of(System.getProperty(ShadedPluginHarness.PLUGINS_DIR_PROPERTY, "")); + assertTrue(Files.isDirectory(plugins), "the plugins directory " + plugins.toAbsolutePath() + " exists (-D" + ShadedPluginHarness.PLUGINS_DIR_PROPERTY + ")"); + try (DirectoryStream jars = Files.newDirectoryStream(plugins, JAR_GLOB)) { + Iterator iterator = jars.iterator(); + if (!iterator.hasNext()) { + throw new AssertionError("no " + JAR_GLOB + " in " + plugins.toAbsolutePath()); + } + return iterator.next(); + } + } + + /** A copy of {@code source} in {@code target} without the entries {@code drop} selects; the manifest, if kept, goes through {@code manifestEdit}. */ + private static void rewrite(Path source, Path target, Predicate drop, java.util.function.Consumer manifestEdit) throws IOException { + try (JarFile in = new JarFile(source.toFile()); OutputStream file = Files.newOutputStream(target); JarOutputStream out = new JarOutputStream(file)) { + Enumeration entries = in.entries(); + while (entries.hasMoreElements()) { + java.util.jar.JarEntry entry = entries.nextElement(); + if (drop.test(entry.getName())) { + continue; + } + if (MANIFEST.equals(entry.getName())) { + Manifest manifest = new Manifest(in.getInputStream(entry)); + manifestEdit.accept(manifest); + out.putNextEntry(new ZipEntry(MANIFEST)); + manifest.write(out); + out.closeEntry(); + continue; + } + out.putNextEntry(new ZipEntry(entry.getName())); + try (InputStream data = in.getInputStream(entry)) { + data.transferTo(out); + } + out.closeEntry(); + } + } + } + + private Path plugins(String name) throws IOException { + return Files.createDirectory(directory.resolve(name)); + } + + @Test + public void theIntactJarOffersTheConnectorAndTheExecutorTheOthersCasesAreMeasuredAgainst() throws IOException { + Path plugins = plugins("intact"); + Files.copy(shippedRestApiJar(), plugins.resolve("restApiPlugin.jar")); + try (ShadedPluginHarness harness = ShadedPluginHarness.over(plugins)) { + assertTrue(harness.isStarted(RESTAPI_PLUGIN_ID), "the intact jar loads and starts"); + assertEquals(1, harness.extensions(DatasourceConnector.class, RESTAPI_PLUGIN_ID).size(), "its connector is found"); + assertEquals(1, harness.extensions(QueryExecutor.class, RESTAPI_PLUGIN_ID).size(), "its executor is found"); + assertNotNull(harness.metaInfoService().getDatasourceConnector(RESTAPI_TYPE), "the server's lookup by type finds the connector"); + } + } + + @Test + public void aJarWithoutItsExtensionIndexStartsButOffersNoExtensionAndTheServersLookupAnswersPluginNotFound() throws IOException { + Path plugins = plugins("no-index"); + rewrite(shippedRestApiJar(), plugins.resolve("restApiPlugin.jar"), name -> EXTENSIONS_INDEX.equals(name), manifest -> { }); + try (ShadedPluginHarness harness = ShadedPluginHarness.over(plugins)) { + assertTrue(harness.isStarted(RESTAPI_PLUGIN_ID), "the plugin itself loads and starts: " + harness.manager().getPlugins()); + List connectors = harness.extensions(DatasourceConnector.class, RESTAPI_PLUGIN_ID); + List executors = harness.extensions(QueryExecutor.class, RESTAPI_PLUGIN_ID); + System.out.println(TAG + "without " + EXTENSIONS_INDEX + ": connectors " + connectors + ", executors " + executors); + assertTrue(connectors.isEmpty(), "no connector without the extension index: " + connectors); + assertTrue(executors.isEmpty(), "no executor without the extension index: " + executors); + + BizException connectorFailure = assertThrows(BizException.class, () -> harness.metaInfoService().getDatasourceConnector(RESTAPI_TYPE)); + BizException executorFailure = assertThrows(BizException.class, () -> harness.metaInfoService().getQueryExecutor(RESTAPI_TYPE)); + System.out.println(TAG + "server lookups: " + connectorFailure.getError() + " " + connectorFailure.getMessageKey() + " / " + + executorFailure.getError() + " " + executorFailure.getMessageKey()); + assertEquals(BizError.NO_RESOURCE_FOUND, connectorFailure.getError()); + assertEquals(PLUGIN_NOT_FOUND_KEY, connectorFailure.getMessageKey()); + assertEquals(BizError.NO_RESOURCE_FOUND, executorFailure.getError()); + assertEquals(PLUGIN_NOT_FOUND_KEY, executorFailure.getMessageKey()); + } + } + + @Test + public void aJarWhoseManifestHasNoPluginIdIsNotLoaded() throws IOException { + Path plugins = plugins("no-plugin-id"); + rewrite(shippedRestApiJar(), plugins.resolve("restApiPlugin.jar"), name -> false, + manifest -> manifest.getMainAttributes().remove(new Attributes.Name(PLUGIN_ID_ATTRIBUTE))); + try (ShadedPluginHarness harness = ShadedPluginHarness.over(plugins)) { + System.out.println(TAG + "manifest without " + PLUGIN_ID_ATTRIBUTE + ": plugins " + harness.manager().getPlugins()); + assertFalse(harness.isStarted(RESTAPI_PLUGIN_ID), "the plugin is not started"); + assertTrue(harness.extensions(DatasourceConnector.class, RESTAPI_PLUGIN_ID).isEmpty(), "no connector"); + assertThrows(BizException.class, () -> harness.metaInfoService().getDatasourceConnector(RESTAPI_TYPE)); + } + } + + @Test + public void anEmptyPluginsDirectoryLoadsNothingAndEveryLookupAnswersPluginNotFound() throws IOException { + Path plugins = plugins("empty"); + try (ShadedPluginHarness harness = ShadedPluginHarness.over(plugins)) { + assertTrue(harness.manager().getPlugins().isEmpty(), "no plugin is loaded from an empty directory"); + for (String type : List.of(RESTAPI_TYPE, "postgres", "mongodb")) { + BizException failure = assertThrows(BizException.class, () -> harness.metaInfoService().getDatasourceConnector(type), type); + assertEquals(PLUGIN_NOT_FOUND_KEY, failure.getMessageKey(), type); + } + } + } +} From d9fcd34e1135740ab2421b7db0c0f6b1a3f47ac7 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Fri, 20 Nov 2026 14:47:09 +0100 Subject: [PATCH 09/40] build: compile to Java 25 bytecode and run the images and CI on Java 25 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 --- .github/workflows/codeql.yml | 2 +- .github/workflows/sonarcloud-build.yml | 2 +- deploy/docker/Dockerfile | 6 ++--- deploy/docker/api-service/entrypoint.sh | 1 + .../opensource-contribution/README.md | 4 ++-- server/api-service/README.md | 10 ++++---- .../lowcoder-plugins/clickHousePlugin/pom.xml | 3 --- .../elasticSearchPlugin/pom.xml | 3 --- .../googleSheetsPlugin/pom.xml | 3 --- .../lowcoder-plugins/graphqlPlugin/pom.xml | 3 --- .../lowcoder-plugins/mongoPlugin/pom.xml | 3 --- .../lowcoder-plugins/mssqlPlugin/pom.xml | 3 --- .../lowcoder-plugins/mysqlPlugin/pom.xml | 3 --- .../lowcoder-plugins/oraclePlugin/pom.xml | 3 --- .../lowcoder-plugins/postgresPlugin/pom.xml | 3 --- .../lowcoder-plugins/redisPlugin/pom.xml | 3 --- .../lowcoder-plugins/restApiPlugin/pom.xml | 3 --- .../lowcoder-plugins/smtpPlugin/pom.xml | 3 --- .../lowcoder-plugins/snowflakePlugin/pom.xml | 3 --- .../lowcoder-plugins/sqlBasedPlugin/pom.xml | 3 --- server/api-service/pom.xml | 23 ++++++++++++++++++- 21 files changed, 36 insertions(+), 54 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6a6290b51..de8189953 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -37,7 +37,7 @@ jobs: uses: actions/setup-java@v5 with: distribution: temurin - java-version: 17 + java-version: 25 - name: Initialize CodeQL uses: github/codeql-action/init@v4 diff --git a/.github/workflows/sonarcloud-build.yml b/.github/workflows/sonarcloud-build.yml index ac89ce941..5e8d1adb0 100644 --- a/.github/workflows/sonarcloud-build.yml +++ b/.github/workflows/sonarcloud-build.yml @@ -31,7 +31,7 @@ jobs: uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 with: distribution: zulu - java-version: "17" + java-version: "25" - name: Self-test sonar helper scripts run: python3 -I -m unittest discover -s .github/scripts/tests -v diff --git a/deploy/docker/Dockerfile b/deploy/docker/Dockerfile index 8c9d40976..d1b821191 100644 --- a/deploy/docker/Dockerfile +++ b/deploy/docker/Dockerfile @@ -1,7 +1,7 @@ ## ## Build Lowcoder api-service application ## -FROM maven:3.9-eclipse-temurin-17 AS build-api-service +FROM maven:3.9-eclipse-temurin-25 AS build-api-service # Build lowcoder-api COPY ./server/api-service /lowcoder-server @@ -26,7 +26,7 @@ RUN chmod +x /lowcoder/api-service/*.sh ## To create a separate image out of it, build it with: ## DOCKER_BUILDKIT=1 docker build -f deploy/docker/Dockerfile -t lowcoderorg/lowcoder-ce-api-service --target lowcoder-ce-api-service . ## -FROM eclipse-temurin:17.0.21_9-jdk-jammy AS lowcoder-ce-api-service +FROM eclipse-temurin:25-jdk-jammy AS lowcoder-ce-api-service LABEL maintainer="lowcoder" RUN apt-get update && apt-get install -y --no-install-recommends gosu \ @@ -377,7 +377,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-ins supervisor \ gosu \ nodejs=22.23.5-1nodesource1 \ - openjdk-17-jdk-headless=17.0.21.1+2-1~22.04.1 \ + openjdk-25-jdk-headless \ && npm install -g yarn \ && rm -rf /var/cache/apt/lists /var/lib/apt/lists/* /var/log/dpkg.log \ && apt-get clean \ diff --git a/deploy/docker/api-service/entrypoint.sh b/deploy/docker/api-service/entrypoint.sh index 0dacfa3f3..775e1ebee 100644 --- a/deploy/docker/api-service/entrypoint.sh +++ b/deploy/docker/api-service/entrypoint.sh @@ -44,6 +44,7 @@ exec $GOSU "${JAVA_HOME}/bin/java" \ -Dspring.config.location="file:///lowcoder/api-service/config/application.yaml" \ --add-opens java.base/java.nio=ALL-UNNAMED \ -XX:-UseBASE64Intrinsics \ + --enable-native-access=ALL-UNNAMED \ ${JAVA_OPTS} \ -Dpf4j.pluginsDir=/lowcoder/api-service/plugins \ -jar "${APP_JAR}" --spring.webflux.base-path="${CONTEXT_PATH}" ${CUSTOM_APP_PROPERTIES} diff --git a/docs/lowcoder-extension/opensource-contribution/README.md b/docs/lowcoder-extension/opensource-contribution/README.md index 53456febf..549541012 100644 --- a/docs/lowcoder-extension/opensource-contribution/README.md +++ b/docs/lowcoder-extension/opensource-contribution/README.md @@ -201,7 +201,7 @@ Vite keeps the Browser for all changes current. That means you can see the effec #### Preparation -To develop with us in the API-Service, you need to have Java - OpenJDK 17 Maven - Version 3+ (preferably 3.8+) installed. Also, it is helpful if you have knowledge of [Spring Webflux](https://docs.spring.io/spring-framework/reference/web/webflux.html) +To develop with us in the API-Service, you need to have Java - OpenJDK 25 Maven - Version 3+ (preferably 3.8+) installed. Also, it is helpful if you have knowledge of [Spring Webflux](https://docs.spring.io/spring-framework/reference/web/webflux.html) You would need to have a MongoDB and a RedisDB ready and accessible. @@ -279,7 +279,7 @@ This is the main class. Now you can use the IDE to "run" it or "debug it". Configure the Run/Debug configuration as shown below. -| JDK version | Java 17 | +| JDK version | Java 25 | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -cp | lowcoder-server | | VM options | -Dpf4j.mode=development -Dpf4j.pluginsDir=lowcoder-plugins -Dspring.profiles.active=lowcoder -XX:+AllowRedefinitionToAddDeleteMethods --add-opens java.base/java.nio=ALL-UNNAMED | diff --git a/server/api-service/README.md b/server/api-service/README.md index 403a16d82..a3d774794 100644 --- a/server/api-service/README.md +++ b/server/api-service/README.md @@ -4,7 +4,7 @@ This document explains how to start Lowcoder server locally. ## System Prerequisites -Java - OpenJDK 17 Maven - Version 3+ (preferably 3.8+) +Java - OpenJDK 25 Maven - Version 3+ (preferably 3.8+) ### MongoDB @@ -50,7 +50,7 @@ The contents should look like this: "request": "launch", "mainClass": "org.lowcoder.api.ServerApplication", "projectName": "lowcoder-server", - "vmArgs": "-Dpf4j.mode=development -Dpf4j.pluginsDir=server/api-service/lowcoder-plugins -Dspring.profiles.active=lowcoder-local-dev -XX:+AllowRedefinitionToAddDeleteMethods --add-opens java.base/java.nio=ALL-UNNAMED" + "vmArgs": "-Dpf4j.mode=development -Dpf4j.pluginsDir=server/api-service/lowcoder-plugins -Dspring.profiles.active=lowcoder-local-dev -XX:+AllowRedefinitionToAddDeleteMethods --add-opens java.base/java.nio=ALL-UNNAMED --enable-native-access=ALL-UNNAMED" } ], } @@ -96,7 +96,7 @@ Configure the Run/Debug configuration as shown below. - + @@ -104,7 +104,7 @@ Configure the Run/Debug configuration as shown below. - + @@ -112,6 +112,8 @@ Configure the Run/Debug configuration as shown below.
    JDK versionJava 17 Java 25
    -cp
    VM options -Dpf4j.mode=development -Dpf4j.pluginsDir=lowcoder-plugins -Dspring.profiles.active=lowcoder -XX:+AllowRedefinitionToAddDeleteMethods --add-opens java.base/java.nio=ALL-UNNAMED-Dpf4j.mode=development -Dpf4j.pluginsDir=lowcoder-plugins -Dspring.profiles.active=lowcoder -XX:+AllowRedefinitionToAddDeleteMethods --add-opens java.base/java.nio=ALL-UNNAMED --enable-native-access=ALL-UNNAMED
    Main class
    +`-XX:+AllowRedefinitionToAddDeleteMethods` is deprecated on Java 25 and prints a warning at start. It is only needed when BlockHound is enabled. + ## Build locally Next action is to build the project, so all lowcoder-plugins are built. This is a precondition for the lowcoder-server to start. diff --git a/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml b/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml index 6942d0d5e..44560db0f 100644 --- a/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml @@ -15,9 +15,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} clickHouse-plugin org.lowcoder.plugin.clickhouse.ClickHousePlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml b/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml index 9cb60c295..48a6dd16a 100644 --- a/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml @@ -16,9 +16,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} es-plugin org.lowcoder.plugin.es.EsPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml index 26c1b637a..49cf6e189 100644 --- a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml @@ -16,9 +16,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} googleSheets-plugin org.lowcoder.plugin.googlesheets.GoogleSheetsPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml index 245eca959..1fc1ad8a8 100644 --- a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml @@ -16,9 +16,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} graphql-plugin org.lowcoder.plugin.graphql.GraphQLPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/mongoPlugin/pom.xml b/server/api-service/lowcoder-plugins/mongoPlugin/pom.xml index 0d955e875..a2d8b914f 100644 --- a/server/api-service/lowcoder-plugins/mongoPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/mongoPlugin/pom.xml @@ -16,9 +16,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} mongo-plugin org.lowcoder.plugin.mongo.MongoPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml index ede698807..b8f140959 100644 --- a/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml @@ -16,9 +16,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} mssql-plugin org.lowcoder.plugin.mssql.MssqlPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml index bf1dc3ab5..07ffbc489 100644 --- a/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml @@ -16,9 +16,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} mysql-plugin org.lowcoder.plugin.mysql.MysqlPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml b/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml index 8df1e0466..821b24ae2 100644 --- a/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml @@ -17,9 +17,6 @@ UTF-8 UTF-8 - 17 - 17 - oracle-plugin org.lowcoder.plugin.oracle.OraclePlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml b/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml index 8019b5cb5..47ce5ed12 100644 --- a/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml @@ -17,9 +17,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} postgres-plugin org.lowcoder.plugin.postgres.PostgresPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/redisPlugin/pom.xml b/server/api-service/lowcoder-plugins/redisPlugin/pom.xml index f9271f90c..023bf8619 100644 --- a/server/api-service/lowcoder-plugins/redisPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/redisPlugin/pom.xml @@ -16,9 +16,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} redis-plugin org.lowcoder.plugin.redis.RedisPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/restApiPlugin/pom.xml b/server/api-service/lowcoder-plugins/restApiPlugin/pom.xml index 912902ad3..56ea87351 100644 --- a/server/api-service/lowcoder-plugins/restApiPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/restApiPlugin/pom.xml @@ -16,9 +16,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} restapi-plugin org.lowcoder.plugin.restapi.RestApiPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml index fc3209971..1ae1407b1 100644 --- a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml @@ -16,9 +16,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} smtp-plugin org.lowcoder.plugins.SmtpPlugin ${revision} diff --git a/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml b/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml index 767cecdc9..d62c91ab0 100644 --- a/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml @@ -13,9 +13,6 @@ snowflakePlugin - 17 - 17 - 17 UTF-8 snowflake-plugin diff --git a/server/api-service/lowcoder-plugins/sqlBasedPlugin/pom.xml b/server/api-service/lowcoder-plugins/sqlBasedPlugin/pom.xml index 2ede0d951..36e739ed1 100644 --- a/server/api-service/lowcoder-plugins/sqlBasedPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/sqlBasedPlugin/pom.xml @@ -13,9 +13,6 @@ UTF-8 - 17 - ${java.version} - ${java.version} diff --git a/server/api-service/pom.xml b/server/api-service/pom.xml index 549775010..7777df3e5 100644 --- a/server/api-service/pom.xml +++ b/server/api-service/pom.xml @@ -12,7 +12,7 @@ 3.0.0 - 17 + 25 ${java.version} ${java.version} - - com.fasterxml.jackson.datatype - jackson-datatype-jdk8 - com.jayway.jsonpath json-path diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/auth/AbstractAuthConfig.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/auth/AbstractAuthConfig.java index ff44a9b88..2928ee5ec 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/auth/AbstractAuthConfig.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/auth/AbstractAuthConfig.java @@ -1,5 +1,6 @@ package org.lowcoder.sdk.auth; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; import jakarta.annotation.Nullable; @@ -29,6 +30,7 @@ public abstract class AbstractAuthConfig { protected String authType; + @JsonCreator protected AbstractAuthConfig(@Nullable String id, String source, String sourceName, Boolean enable, Boolean enableRegister, String authType) { this.id = id; this.source = source; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java index ae768455f..f12ad281c 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import lombok.Getter; import org.apache.commons.lang3.StringUtils; import org.lowcoder.sdk.exception.PluginError; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/common/sql/SqlBasedDatasourceConnectionConfig.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/common/sql/SqlBasedDatasourceConnectionConfig.java index 2fdcaff71..de30b0876 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/common/sql/SqlBasedDatasourceConnectionConfig.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/common/sql/SqlBasedDatasourceConnectionConfig.java @@ -1,5 +1,6 @@ package org.lowcoder.sdk.plugin.common.sql; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonView; import lombok.Getter; import lombok.experimental.SuperBuilder; @@ -41,6 +42,7 @@ public abstract class SqlBasedDatasourceConnectionConfig implements DatasourceCo private final Map extParams; + @JsonCreator protected SqlBasedDatasourceConnectionConfig(String database, String username, String password, String host, Long port, boolean usingSsl, String serverTimezone, boolean isReadonly, boolean enableTurnOffPreparedStatement, diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/common/ssl/SslConfig.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/common/ssl/SslConfig.java index 17d551ead..3fb2b751c 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/common/ssl/SslConfig.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/common/ssl/SslConfig.java @@ -1,5 +1,6 @@ package org.lowcoder.sdk.plugin.common.ssl; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -20,6 +21,7 @@ public abstract class SslConfig implements Encrypt { protected final SslCertVerificationType sslCertVerificationType; + @JsonCreator protected SslConfig(SslCertVerificationType sslCertVerificationType) { this.sslCertVerificationType = sslCertVerificationType; } diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java index 4f7e93e76..fc6ec9c14 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java @@ -18,9 +18,9 @@ // copied and adapted for rest api request package org.lowcoder.sdk.plugin.restapi; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import com.google.common.collect.Streams; import jakarta.annotation.Nonnull; import org.apache.commons.collections4.CollectionUtils; @@ -60,8 +60,7 @@ public enum MultipartFormDataType { } private DataUtils() { - this.objectMapper = new ObjectMapper(); - this.objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + this.objectMapper = JsonMapper.builderWithJackson2Defaults().build(); } public static DataUtils getInstance() { @@ -200,16 +199,16 @@ public static List convertToMultiformFileValue(String fileVal private static MultipartFormData parseMultipartFormData(JsonNode jsonObject) { MultipartFormData result = new MultipartFormData(); JsonNode data = jsonObject.get("data"); - if (!data.isTextual()) { + if (!data.isString()) { throw new PluginException(DATASOURCE_ARGUMENT_ERROR, "MULTIFORM_DATA_IS_NOT_STRING"); } - result.setData(data.asText()); + result.setData(data.asString()); JsonNode name = jsonObject.get("name"); - if (!name.isTextual()) { + if (!name.isString()) { throw new PluginException(DATASOURCE_ARGUMENT_ERROR, "MULTIFORM_NAME_IS_NOT_STRING"); } - result.setName(name.asText()); + result.setName(name.asString()); return result; } } diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/auth/AuthConfig.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/auth/AuthConfig.java index bbc622592..37d32187b 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/auth/AuthConfig.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/auth/AuthConfig.java @@ -1,5 +1,6 @@ package org.lowcoder.sdk.plugin.restapi.auth; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -22,6 +23,7 @@ public abstract class AuthConfig implements Encrypt { protected final RestApiAuthType type; + @JsonCreator protected AuthConfig(RestApiAuthType type) { this.type = type; } diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java index 249f09d7c..ad76e33c7 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java @@ -1,6 +1,6 @@ package org.lowcoder.sdk.plugin.sheet.changeset; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.lowcoder.sdk.exception.PluginException; import org.lowcoder.sdk.util.MustacheHelper; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java index 491c1843f..797d8d445 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java @@ -1,7 +1,7 @@ package org.lowcoder.sdk.plugin.sheet.changeset; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.ObjectNode; import jakarta.annotation.Nonnull; import org.lowcoder.sdk.exception.PluginException; import org.lowcoder.sdk.util.JsonUtils; @@ -33,7 +33,7 @@ public static SheetChangeSetRow fromJsonNode(JsonNode node) { throw new PluginException(INVALID_GUI_SETTINGS, "GUI_INVALID_JSON_MAP_TYPE"); } List result = new ArrayList<>(); - Iterator> iterator = objectNode.fields(); + Iterator> iterator = objectNode.properties().iterator(); while (iterator.hasNext()) { Entry next = iterator.next(); String column = next.getKey(); diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRows.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRows.java index 0ab9144d0..0201bf088 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRows.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRows.java @@ -1,8 +1,8 @@ package org.lowcoder.sdk.plugin.sheet.changeset; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ArrayNode; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.ArrayNode; import com.google.common.collect.Streams; import jakarta.annotation.Nonnull; import org.lowcoder.sdk.exception.PluginException; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetObjectChangeSet.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetObjectChangeSet.java index a51defdc7..55bf1fcc9 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetObjectChangeSet.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetObjectChangeSet.java @@ -1,7 +1,7 @@ package org.lowcoder.sdk.plugin.sheet.changeset; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.lowcoder.sdk.exception.PluginException; import org.lowcoder.sdk.util.MustacheHelper; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/BulkObjectChangeSet.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/BulkObjectChangeSet.java index 00508a691..a56a6d950 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/BulkObjectChangeSet.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/BulkObjectChangeSet.java @@ -1,6 +1,6 @@ package org.lowcoder.sdk.plugin.sqlcommand.changeset; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.lowcoder.sdk.exception.PluginException; import org.lowcoder.sdk.util.MustacheHelper; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRow.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRow.java index bfeee100f..db2c8bec5 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRow.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRow.java @@ -1,7 +1,7 @@ package org.lowcoder.sdk.plugin.sqlcommand.changeset; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.ObjectNode; import com.google.common.collect.Streams; import jakarta.annotation.Nonnull; import org.lowcoder.sdk.exception.PluginException; @@ -33,7 +33,7 @@ private static List parseChangeSetItems(JsonNode node) { throw new PluginException(INVALID_GUI_SETTINGS, "GUI_INVALID_JSON_MAP_TYPE"); } - return Streams.stream(objectNode.fields()) + return Streams.stream(objectNode.properties().iterator()) .map(next -> { String column = next.getKey(); JsonNode value = next.getValue(); diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRows.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRows.java index 01759c042..2e1badbba 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRows.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRows.java @@ -1,7 +1,7 @@ package org.lowcoder.sdk.plugin.sqlcommand.changeset; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ArrayNode; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.ArrayNode; import com.google.common.collect.Streams; import jakarta.annotation.Nonnull; import org.lowcoder.sdk.exception.PluginException; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java index f79a102e5..2f07e764e 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java @@ -1,6 +1,6 @@ package org.lowcoder.sdk.plugin.sqlcommand.changeset; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.lowcoder.sdk.exception.PluginException; import org.lowcoder.sdk.util.MustacheHelper; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/JsonUtils.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/JsonUtils.java index 6c5084556..6ffb14d70 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/JsonUtils.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/JsonUtils.java @@ -1,19 +1,25 @@ package org.lowcoder.sdk.util; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.jsontype.NamedType; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.databind.type.CollectionType; -import com.fasterxml.jackson.databind.type.MapType; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import com.fasterxml.jackson.module.paramnames.ParameterNamesModule; +import tools.jackson.core.StreamReadConstraints; +import tools.jackson.core.json.JsonFactory; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.DeserializationFeature; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.MapperFeature; +import tools.jackson.databind.ObjectWriter; +import tools.jackson.databind.SerializationFeature; +import tools.jackson.databind.cfg.ConstructorDetector; +import tools.jackson.databind.json.JsonMapper; +import tools.jackson.databind.jsontype.NamedType; +import tools.jackson.databind.node.ArrayNode; +import tools.jackson.databind.node.ObjectNode; +import tools.jackson.databind.type.CollectionType; +import tools.jackson.databind.type.MapType; +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import jakarta.annotation.Nullable; import lombok.extern.slf4j.Slf4j; import org.lowcoder.sdk.auth.*; +import tools.jackson.core.JacksonException; import java.nio.charset.StandardCharsets; import java.util.List; @@ -25,34 +31,54 @@ @Slf4j public final class JsonUtils { - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - - static { - OBJECT_MAPPER.registerModule(new ParameterNamesModule(JsonCreator.Mode.PROPERTIES)); - OBJECT_MAPPER.registerModule(new JavaTimeModule()); - OBJECT_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - OBJECT_MAPPER.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); - // register sub types - OBJECT_MAPPER.registerSubtypes(new NamedType(EmailAuthConfig.class, FORM)); - OBJECT_MAPPER.registerSubtypes(new NamedType(Oauth2SimpleAuthConfig.class, GITHUB)); - OBJECT_MAPPER.registerSubtypes(new NamedType(Oauth2SimpleAuthConfig.class, GOOGLE)); - OBJECT_MAPPER.registerSubtypes(new NamedType(Oauth2OryAuthConfig.class, ORY)); - OBJECT_MAPPER.registerSubtypes(new NamedType(Oauth2KeycloakAuthConfig.class, KEYCLOAK)); - OBJECT_MAPPER.registerSubtypes(new NamedType(Oauth2GenericAuthConfig.class, GENERIC)); - } + /** Jackson 2's read limits: Jackson 3 lowers the nesting depth to 500 and raises the string length. */ + private static final int MAX_NESTING_DEPTH = 1000; + private static final int MAX_STRING_LENGTH = 20_000_000; + + private static final JsonFactory JSON_FACTORY = JsonFactory.builderWithJackson2Defaults() + .streamReadConstraints(StreamReadConstraints.builder() + .maxNestingDepth(MAX_NESTING_DEPTH) + .maxStringLength(MAX_STRING_LENGTH) + .build()) + .build(); + + /** + * Jackson 3 changed several defaults. The mapper keeps the Jackson 2 ones through {@link JsonMapper.Builder#configureForJackson2()} + * (dates as timestamps, for one), and states the settings the application has always relied on that it does not + * restore: constructor parameters are named by the compiler's {@code -parameters} (the Jackson 2 parameter names + * module was registered), a constructor of any visibility can be the creator (Lombok's all-args constructor is + * package-private) but only when the class has no default constructor, accessor names are lower-cased as in Jackson 2 ({@link LegacyBeanNaming}), properties + * without a {@code @JsonView} stay in every view, and unknown properties and empty beans are tolerated. + */ + private static final JsonMapper OBJECT_MAPPER = JsonMapper.builder(JSON_FACTORY).configureForJackson2() + .propertyNamingStrategy(new LegacyBeanNaming()) + .changeDefaultVisibility(visibility -> visibility.withCreatorVisibility(Visibility.ANY)) + .constructorDetector(ConstructorDetector.DEFAULT.withAllowImplicitWithDefaultConstructor(false)) + .enable(MapperFeature.DETECT_PARAMETER_NAMES) + .enable(MapperFeature.DEFAULT_VIEW_INCLUSION) + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS) + // register sub types + .registerSubtypes(new NamedType(EmailAuthConfig.class, FORM)) + .registerSubtypes(new NamedType(Oauth2SimpleAuthConfig.class, GITHUB)) + .registerSubtypes(new NamedType(Oauth2SimpleAuthConfig.class, GOOGLE)) + .registerSubtypes(new NamedType(Oauth2OryAuthConfig.class, ORY)) + .registerSubtypes(new NamedType(Oauth2KeycloakAuthConfig.class, KEYCLOAK)) + .registerSubtypes(new NamedType(Oauth2GenericAuthConfig.class, GENERIC)) + .build(); public static final JsonNode EMPTY_JSON_NODE = createObjectNode(); private static final ObjectWriter WRITER = OBJECT_MAPPER.writer(); - public static ObjectMapper getObjectMapper() { + public static JsonMapper getObjectMapper() { return OBJECT_MAPPER; } public static String toJson(Object obj) { try { return WRITER.writeValueAsString(obj); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { log.error("fail to print json of class type: {}", obj.getClass().getSimpleName(), e); return ""; } @@ -61,20 +87,20 @@ public static String toJson(Object obj) { public static String toJsonSafely(Object obj, Class viewClass) { try { return OBJECT_MAPPER.writerWithView(viewClass).writeValueAsString(obj); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { log.error("fail to print json of class type: {}", obj.getClass().getSimpleName(), e); return ""; } } - public static String toJsonThrows(Object obj) throws JsonProcessingException { + public static String toJsonThrows(Object obj) { return WRITER.writeValueAsString(obj); } public static T fromJson(String obj, Class tClass) { try { return OBJECT_MAPPER.readValue(obj, tClass); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { log.error("fail to print json of class type: {}", obj.getClass().getSimpleName(), e); return null; } @@ -83,7 +109,7 @@ public static T fromJson(String obj, Class tClass) { public static T fromJsonSafely(String obj, TypeReference valueTypeRef, @Nullable T defaultValue) { try { return OBJECT_MAPPER.readValue(obj, valueTypeRef); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { log.error("fail to print json of class type: {}", valueTypeRef.getType().getTypeName(), e); return defaultValue; } @@ -92,7 +118,7 @@ public static T fromJsonSafely(String obj, TypeReference valueTypeRef, @N public static T fromJsonQuietly(String obj, Class tClass) { try { return OBJECT_MAPPER.readValue(obj, tClass); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { return null; } } @@ -105,7 +131,7 @@ public static List fromJsonList(String obj, Class tClass) { try { CollectionType javaType = OBJECT_MAPPER.getTypeFactory().constructCollectionType(List.class, tClass); return OBJECT_MAPPER.readValue(obj, javaType); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { log.error("fail to print json of class type: {}", obj.getClass().getSimpleName(), e); return null; } @@ -115,7 +141,7 @@ public static Set fromJsonSet(String obj, Class tClass) { try { CollectionType javaType = OBJECT_MAPPER.getTypeFactory().constructCollectionType(Set.class, tClass); return OBJECT_MAPPER.readValue(obj, javaType); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { log.error("fail to print json of class type: {}", obj.getClass().getSimpleName(), e); return null; } @@ -129,17 +155,17 @@ public static Map fromJsonMap(String obj, Class kClass, Class try { MapType mapType = OBJECT_MAPPER.getTypeFactory().constructMapType(Map.class, kClass, vClass); return OBJECT_MAPPER.readValue(obj, mapType); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { log.error("fail to print json of class type: {}", obj.getClass().getSimpleName(), e); return null; } } - public static JsonNode readTree(byte[] body) throws JsonProcessingException { + public static JsonNode readTree(byte[] body) { return OBJECT_MAPPER.readTree(new String(body, StandardCharsets.UTF_8)); } - public static JsonNode readTree(String value) throws JsonProcessingException { + public static JsonNode readTree(String value) { return OBJECT_MAPPER.readTree(value); } @@ -158,7 +184,7 @@ public static ArrayNode createArrayNode() { public static Object jsonNodeToObject(JsonNode jsonNode) { try { return OBJECT_MAPPER.treeToValue(jsonNode, Object.class); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { log.error("jsonNode to object error ", e); return null; } diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/LegacyBeanNaming.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/LegacyBeanNaming.java new file mode 100644 index 000000000..77d50911e --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/LegacyBeanNaming.java @@ -0,0 +1,42 @@ +package org.lowcoder.sdk.util; + +import tools.jackson.databind.PropertyNamingStrategy; +import tools.jackson.databind.cfg.MapperConfig; +import tools.jackson.databind.introspect.AnnotatedMethod; + +/** + * Names the properties of getters and setters as Jackson 2 did. + * + *

    Jackson 2 lower-cased the whole leading run of upper-case letters of an accessor name ({@code getSQLTypeName} became + * {@code sqltypeName}, {@code getURL} became {@code url}); Jackson 3 follows the JavaBeans rule and keeps a name that + * starts with two upper-case letters ({@code SQLTypeName}, {@code URL}). The strategy receives the Jackson 3 name and + * lower-cases that leading run, which gives the Jackson 2 name in every case. Field names and constructor parameter + * names are left as they are, as they were in Jackson 2. + * + *

    Limit: it renames only properties that Jackson names implicitly. A name given with {@code @JsonProperty} is never + * passed through it. + */ +public final class LegacyBeanNaming extends PropertyNamingStrategy { + + @Override + public String nameForGetterMethod(MapperConfig config, AnnotatedMethod method, String defaultName) { + return lowerCaseLeadingRun(defaultName); + } + + @Override + public String nameForSetterMethod(MapperConfig config, AnnotatedMethod method, String defaultName) { + return lowerCaseLeadingRun(defaultName); + } + + /** {@code SQLTypeName} to {@code sqltypeName}; a name that does not start with an upper-case letter is returned as it is. */ + static String lowerCaseLeadingRun(String name) { + int end = 0; + while (end < name.length() && Character.isUpperCase(name.charAt(end))) { + end++; + } + if (end == 0) { + return name; + } + return name.substring(0, end).toLowerCase() + name.substring(end); + } +} diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/MustacheHelper.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/MustacheHelper.java index 596984152..46d9ee361 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/MustacheHelper.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/MustacheHelper.java @@ -19,7 +19,7 @@ package org.lowcoder.sdk.util; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; import com.google.common.annotations.VisibleForTesting; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java index e83f410b0..8c63e4d08 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java @@ -1,12 +1,13 @@ package org.lowcoder.sdk.util; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.*; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.*; import jakarta.annotation.Nonnull; import jakarta.annotation.Nullable; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.lowcoder.sdk.exception.PluginException; +import tools.jackson.databind.node.StringNode; import tv.twelvetone.json.Json; import tv.twelvetone.json.JsonObject.Member; import tv.twelvetone.json.JsonValue; @@ -51,7 +52,7 @@ public static JsonNode renderMustacheJson(String jsonStr, Map paramMa return traverse(RjsonParser.parse(oneTokenStr), Map.of()); } catch (Throwable e) { // return as a textNode if fails to parse - return TextNode.valueOf(oneTokenStr); + return StringNode.valueOf(oneTokenStr); } } @@ -124,28 +125,28 @@ private static JsonNode traverse(JsonValue jsonValue, Map paramM private static String tryResolveAsString(String input, Map paramMap) { JsonNode jsonNode = tryResolve(Json.INSTANCE.value(input), paramMap, true); - return jsonNode.textValue(); + return jsonNode.stringValue(); } private static JsonNode tryResolve(JsonValue jsonValue, Map paramMap, boolean toStringType) { String input = jsonValue.asString().trim(); if (isBlank(input)) { - return TextNode.valueOf(input); + return StringNode.valueOf(input); } var checkStringResult = checkString(input); if (checkStringResult.isRawStr()) { - return TextNode.valueOf(input); + return StringNode.valueOf(input); } if (toStringType || checkStringResult.isQuotedStr()) { - return TextNode.valueOf(MustacheHelper.renderMustacheTokens(tokenize(checkStringResult.result()), paramMap, true, token -> isGeneratedMustache(token, paramMap))); + return StringNode.valueOf(MustacheHelper.renderMustacheTokens(tokenize(checkStringResult.result()), paramMap, true, token -> isGeneratedMustache(token, paramMap))); } List tokenize = tokenize(input); if (tokenize.isEmpty()) { - return TextNode.valueOf(input); + return StringNode.valueOf(input); } if (tokenize.size() == 1) { @@ -156,7 +157,7 @@ private static JsonNode tryResolve(JsonValue jsonValue, Map para } } - return TextNode.valueOf(MustacheHelper.renderMustacheTokens(tokenize, paramMap, true, token -> isGeneratedMustache(token, paramMap))); + return StringNode.valueOf(MustacheHelper.renderMustacheTokens(tokenize, paramMap, true, token -> isGeneratedMustache(token, paramMap))); } private static JsonNode convertToJsonNode(Object mustacheValue) { @@ -176,7 +177,7 @@ private static JsonNode convertToJsonNode(Object mustacheValue) { return BooleanNode.valueOf((boolean) mustacheValue); } - return TextNode.valueOf(mustacheValue.toString()); + return StringNode.valueOf(mustacheValue.toString()); } @Nullable diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java index 3f6ef1ef6..5bbe42e21 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java @@ -1,6 +1,6 @@ package org.lowcoder.sdk.util; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import jakarta.annotation.Nonnull; import org.apache.commons.lang3.RandomStringUtils; import org.lowcoder.sdk.exception.PluginException; diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java deleted file mode 100644 index 8c5ceded4..000000000 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.lowcoder.sdk.webclient; - -import org.springframework.http.codec.ClientCodecConfigurer; -import org.springframework.http.codec.json.Jackson2JsonDecoder; -import org.springframework.http.codec.json.Jackson2JsonEncoder; - -/** - * Keeps the JSON codecs of the application's outbound {@code WebClient}s on Jackson 2. - * - *

    Spring's default codecs choose the Jackson 3 JSON codecs whenever {@code tools.jackson.databind.ObjectMapper} is on - * the class path, and Jackson 3 is there through Spring Boot's JSON starter. The request bodies the application writes are - * Jackson 2 trees ({@code com.fasterxml.jackson.databind.JsonNode}); the Jackson 3 encoder does not know that type and - * writes the tree's bean properties instead of its content. A codec set explicitly wins over the default, so this sets - * both slots. - * - *

    The no-argument codecs build their own mappers with {@code Jackson2ObjectMapperBuilder}, one per codec, as the - * defaults of a class path without Jackson 3 do. - * - *

    Limits: it covers only the clients that call it ({@link WebClientBuildHelper} and the exchange strategies declared by - * the code that does not go through the helper). A {@code WebClient} or {@code ExchangeStrategies} built anywhere else, and - * the {@code spring.http.codecs.preferred-json-mapper} property, which only Spring Boot's own codec configuration reads, - * do not reach it. - */ -@SuppressWarnings({"deprecation", "removal"}) -public final class Jackson2ClientCodecs { - - private Jackson2ClientCodecs() { - } - - /** Sets a Jackson 2 JSON encoder and decoder on {@code configurer}'s default codecs. */ - public static void apply(ClientCodecConfigurer configurer) { - configurer.defaultCodecs().jackson2JsonEncoder(new Jackson2JsonEncoder()); - configurer.defaultCodecs().jackson2JsonDecoder(new Jackson2JsonDecoder()); - } -} diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java new file mode 100644 index 000000000..c45de2c74 --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java @@ -0,0 +1,38 @@ +package org.lowcoder.sdk.webclient; + +import org.springframework.http.codec.ClientCodecConfigurer; +import org.springframework.http.codec.json.JacksonJsonDecoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; +import tools.jackson.databind.DeserializationFeature; +import tools.jackson.databind.json.JsonMapper; + +/** + * Gives the JSON codecs of the application's outbound {@code WebClient}s the Jackson 2 configuration they had before + * Jackson 3: dates written as timestamps, properties in declaration order, unknown properties ignored. + * + *

    Spring's default Jackson 3 codecs write dates as ISO strings and sort bean properties alphabetically, which changes + * the bytes of every request body that holds a bean or a date. A codec set explicitly wins over the default, so this sets + * both slots, with one mapper each, as the defaults do. + * + *

    Limits: it covers only the clients that call it ({@link WebClientBuildHelper} and the exchange strategies declared by + * the code that does not go through the helper). A {@code WebClient} or {@code ExchangeStrategies} built anywhere else + * keeps Spring's defaults. The mappers are not the production mapper ({@code JsonUtils}): they register none of its + * subtypes. + */ +public final class JacksonClientCodecs { + + private JacksonClientCodecs() { + } + + /** Sets a JSON encoder and decoder with the Jackson 2 configuration on {@code configurer}'s default codecs. */ + public static void apply(ClientCodecConfigurer configurer) { + configurer.defaultCodecs().jacksonJsonEncoder(new JacksonJsonEncoder(mapper())); + configurer.defaultCodecs().jacksonJsonDecoder(new JacksonJsonDecoder(mapper())); + } + + private static JsonMapper mapper() { + return JsonMapper.builderWithJackson2Defaults() + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .build(); + } +} diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java index e4600c978..c04c66377 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java @@ -130,7 +130,7 @@ public Builder toWebClientBuilder() { } return WebClient.builder() .codecs(codecs -> { - Jackson2ClientCodecs.apply(codecs); + JacksonClientCodecs.apply(codecs); codecs.defaultCodecs().maxInMemorySize(maxInMemorySize); }) .clientConnector(new ReactorClientHttpConnector(httpClient)); diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/CanonicalJson.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/CanonicalJson.java index d4e656c49..5fc9a2ffd 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/CanonicalJson.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/CanonicalJson.java @@ -1,8 +1,8 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; +import tools.jackson.core.JsonParser; +import tools.jackson.core.JsonToken; +import tools.jackson.core.json.JsonFactory; import java.io.IOException; import java.io.UncheckedIOException; @@ -29,7 +29,7 @@ * reported), the order of different object members, and the escape form of strings and keys. * *

    The documents are read with Jackson's streaming {@link JsonParser}, never with a mapper: number tokens keep - * their lexeme ({@link JsonParser#getText()}) and every object keeps all its members, duplicates included, as a list + * their lexeme ({@link JsonParser#getString()}) and every object keeps all its members, duplicates included, as a list * of (key, value) pairs. Members are grouped by key; groups are compared regardless of key order, and values inside * a group in order. * @@ -100,7 +100,7 @@ private static Node read(JsonParser parser, String source) throws IOException { switch (token) { case START_OBJECT -> { List members = new ArrayList<>(); - while (parser.nextToken() == JsonToken.FIELD_NAME) { + while (parser.nextToken() == JsonToken.PROPERTY_NAME) { String key = parser.currentName(); String rawKey = rawText(parser, source); parser.nextToken(); @@ -116,11 +116,11 @@ private static Node read(JsonParser parser, String source) throws IOException { return new ArrayValue(elements); } case VALUE_STRING -> { - String value = parser.getText(); + String value = parser.getString(); return new ScalarValue(ScalarKind.STRING, value, rawText(parser, source)); } case VALUE_NUMBER_INT, VALUE_NUMBER_FLOAT -> { - String lexeme = parser.getText(); + String lexeme = parser.getString(); return new ScalarValue(ScalarKind.NUMBER, lexeme, lexeme); } case VALUE_TRUE -> { diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecs.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecs.java index 166ffbf1b..d7ccb7f3d 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecs.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecs.java @@ -1,19 +1,19 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; +import tools.jackson.databind.DeserializationFeature; +import tools.jackson.databind.ObjectMapper; import org.lowcoder.sdk.util.JsonUtils; -import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; +import org.lowcoder.sdk.webclient.JacksonClientCodecs; import org.lowcoder.sdk.webclient.WebClientBuildHelper; import org.springframework.http.codec.DecoderHttpMessageReader; import org.springframework.http.codec.EncoderHttpMessageWriter; import org.springframework.http.codec.HttpMessageReader; import org.springframework.http.codec.HttpMessageWriter; -import org.springframework.http.codec.json.Jackson2JsonDecoder; -import org.springframework.http.codec.json.Jackson2JsonEncoder; +import org.springframework.http.codec.json.JacksonJsonDecoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; import org.springframework.web.reactive.function.client.ExchangeStrategies; import org.springframework.web.reactive.function.client.WebClient; +import tools.jackson.databind.cfg.DateTimeFeature; import java.lang.reflect.Method; @@ -23,7 +23,7 @@ /** * Spring's default client codecs as the application builds them (docs/API_PAYLOAD_TEST_PLAN.md §1.1, §3.2, §5.4). * - *

    The application builds its client codecs in six places, and each sets {@link Jackson2ClientCodecs#apply} and then + *

    The application builds its client codecs in six places, and each sets {@link JacksonClientCodecs#apply} and then * {@code maxInMemorySize} on the default codecs: {@code WebClientBuildHelper.java:131-136} (20 MB by default), * {@code JsLibraryController.java:63-69} (-1), {@code DatasourcePluginClient.java:43-49} (-1), * {@code GraphQLExecutor.java:90-96} (10 MB), {@code RestApiExecutor.java:104-110} (-1) and @@ -37,8 +37,8 @@ * declared value is overwritten. {@link #effectiveThroughWebClientBuildHelper} returns what a request gets. * *

    {@link #DEFAULT_CODEC_PROFILE} pins the configuration of the mapper inside those codecs as observed in E8 - * (docs/tools/plan-evidence.out). Spring builds that mapper with {@code Jackson2ObjectMapperBuilder}, which adds the - * well-known modules found on the classpath, so the profile depends on the classpath it is built on. + * (docs/tools/plan-evidence.out): the Jackson 2 settings that {@link JacksonClientCodecs} keeps. Jackson 3 has the + * java time and parameter name support built in, so the profile lists no module. */ public final class ClientCodecs { @@ -47,9 +47,7 @@ public final class ClientCodecs { private static final String INIT_EXCHANGE_STRATEGIES = "initExchangeStrategies"; /** E8: the codec mapper writes dates as timestamps, reads them as nanoseconds, ignores unknown properties. */ - public static final MapperProfile DEFAULT_CODEC_PROFILE = new MapperProfile(true, true, false, - List.of("com.fasterxml.jackson.datatype.jdk8.Jdk8Module", "jackson-module-parameter-names", - "jackson-datatype-jsr310")); + public static final MapperProfile DEFAULT_CODEC_PROFILE = new MapperProfile(true, true, false, List.of()); private ClientCodecs() { } @@ -60,10 +58,10 @@ public record MapperProfile(boolean writeDatesAsTimestamps, boolean readDateTime } public static MapperProfile profile(ObjectMapper mapper) { - return new MapperProfile(mapper.isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS), - mapper.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS), + return new MapperProfile(mapper.isEnabled(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS), + mapper.isEnabled(DateTimeFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS), mapper.isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES), - mapper.getRegisteredModuleIds().stream().map(String::valueOf).collect(Collectors.toList())); + mapper.registeredModules().stream().map(module -> String.valueOf(module.getRegistrationId())).collect(Collectors.toList())); } /** @@ -91,21 +89,21 @@ public static ExchangeStrategies effective(WebClient.Builder builder) { } } - /** The exchange strategies of the application's clients: {@link Jackson2ClientCodecs#apply}, then {@code maxInMemorySize(n)}. */ + /** The exchange strategies of the application's clients: {@link JacksonClientCodecs#apply}, then {@code maxInMemorySize(n)}. */ public static ExchangeStrategies strategies(int maxInMemorySize) { return ExchangeStrategies.builder() .codecs(configurer -> { - Jackson2ClientCodecs.apply(configurer); + JacksonClientCodecs.apply(configurer); configurer.defaultCodecs().maxInMemorySize(maxInMemorySize); }) .build(); } - public static Jackson2JsonEncoder encoder(ExchangeStrategies strategies) { + public static JacksonJsonEncoder encoder(ExchangeStrategies strategies) { return encoder(strategies.messageWriters()); } - public static Jackson2JsonDecoder decoder(ExchangeStrategies strategies) { + public static JacksonJsonDecoder decoder(ExchangeStrategies strategies) { return decoder(strategies.messageReaders()); } @@ -116,21 +114,21 @@ public static Jackson2JsonDecoder decoder(ExchangeStrategies strategies) { * builds an equal configuration. */ public static void assertDefaultClientCodecs(String construction, ExchangeStrategies real, int expectedMaxInMemorySize) { - Jackson2JsonEncoder encoder = encoder(real); - Jackson2JsonDecoder decoder = decoder(real); - MapperProfile encoderProfile = profile(encoder.getObjectMapper()); - MapperProfile decoderProfile = profile(decoder.getObjectMapper()); + JacksonJsonEncoder encoder = encoder(real); + JacksonJsonDecoder decoder = decoder(real); + MapperProfile encoderProfile = profile(encoder.getMapper()); + MapperProfile decoderProfile = profile(decoder.getMapper()); System.out.println("[client-codec-guard] " + construction + ": encoder " + encoderProfile + ", decoder " + decoderProfile + ", maxInMemorySize " + decoder.getMaxInMemorySize()); ObjectMapper production = JsonUtils.getObjectMapper(); - assertTrue(construction + ": encoder mapper must not be the production mapper", encoder.getObjectMapper() != production); - assertTrue(construction + ": decoder mapper must not be the production mapper", decoder.getObjectMapper() != production); - assertTrue(construction + ": encoder and decoder must have separate mappers", encoder.getObjectMapper() != decoder.getObjectMapper()); + assertTrue(construction + ": encoder mapper must not be the production mapper", encoder.getMapper() != production); + assertTrue(construction + ": decoder mapper must not be the production mapper", decoder.getMapper() != production); + assertTrue(construction + ": encoder and decoder must have separate mappers", encoder.getMapper() != decoder.getMapper()); assertEquals(construction + ": decoder maxInMemorySize", expectedMaxInMemorySize, decoder.getMaxInMemorySize()); assertEquals(construction + ": encoder mapper", DEFAULT_CODEC_PROFILE, encoderProfile); assertEquals(construction + ": decoder mapper", DEFAULT_CODEC_PROFILE, decoderProfile); ExchangeStrategies rebuilt = strategies(expectedMaxInMemorySize); - assertEquals(construction + ": ClientCodecs rebuild", encoderProfile, profile(encoder(rebuilt).getObjectMapper())); + assertEquals(construction + ": ClientCodecs rebuild", encoderProfile, profile(encoder(rebuilt).getMapper())); assertEquals(construction + ": ClientCodecs rebuild maxInMemorySize", expectedMaxInMemorySize, decoder(rebuilt).getMaxInMemorySize()); } @@ -148,22 +146,22 @@ private static void assertEquals(String message, Object expected, Object actual) } /** The Jackson JSON encoder among {@code writers}; fails if there is none. */ - public static Jackson2JsonEncoder encoder(List> writers) { + public static JacksonJsonEncoder encoder(List> writers) { return writers.stream() .filter(writer -> writer instanceof EncoderHttpMessageWriter encoderWriter - && encoderWriter.getEncoder() instanceof Jackson2JsonEncoder) - .map(writer -> (Jackson2JsonEncoder) ((EncoderHttpMessageWriter) writer).getEncoder()) + && encoderWriter.getEncoder() instanceof JacksonJsonEncoder) + .map(writer -> (JacksonJsonEncoder) ((EncoderHttpMessageWriter) writer).getEncoder()) .findFirst() - .orElseThrow(() -> new AssertionError("no Jackson2JsonEncoder among " + writers)); + .orElseThrow(() -> new AssertionError("no JacksonJsonEncoder among " + writers)); } /** The Jackson JSON decoder among {@code readers}; fails if there is none. */ - public static Jackson2JsonDecoder decoder(List> readers) { + public static JacksonJsonDecoder decoder(List> readers) { return readers.stream() .filter(reader -> reader instanceof DecoderHttpMessageReader decoderReader - && decoderReader.getDecoder() instanceof Jackson2JsonDecoder) - .map(reader -> (Jackson2JsonDecoder) ((DecoderHttpMessageReader) reader).getDecoder()) + && decoderReader.getDecoder() instanceof JacksonJsonDecoder) + .map(reader -> (JacksonJsonDecoder) ((DecoderHttpMessageReader) reader).getDecoder()) .findFirst() - .orElseThrow(() -> new AssertionError("no Jackson2JsonDecoder among " + readers)); + .orElseThrow(() -> new AssertionError("no JacksonJsonDecoder among " + readers)); } } diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecsTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecsTest.java index 9621e1370..4f8ffd586 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecsTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ClientCodecsTest.java @@ -1,10 +1,10 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import org.junit.jupiter.api.Test; import org.lowcoder.sdk.util.JsonUtils; -import org.springframework.http.codec.json.Jackson2JsonDecoder; -import org.springframework.http.codec.json.Jackson2JsonEncoder; +import org.springframework.http.codec.json.JacksonJsonDecoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; import org.springframework.web.reactive.function.client.ExchangeStrategies; import static org.assertj.core.api.Assertions.assertThat; @@ -21,27 +21,27 @@ public class ClientCodecsTest { @Test public void strategiesExposeSeparateEncoderAndDecoderMappers() { ExchangeStrategies strategies = ClientCodecs.strategies(ClientCodecs.UNLIMITED); - assertThat(ClientCodecs.encoder(strategies).getObjectMapper()) - .isNotSameAs(ClientCodecs.decoder(strategies).getObjectMapper()); + assertThat(ClientCodecs.encoder(strategies).getMapper()) + .isNotSameAs(ClientCodecs.decoder(strategies).getMapper()); assertThat(ClientCodecs.decoder(strategies).getMaxInMemorySize()).isEqualTo(ClientCodecs.UNLIMITED); } @Test public void guardRejectsTheProductionMapper() { - ObjectMapper production = JsonUtils.getObjectMapper(); + JsonMapper production = JsonUtils.getObjectMapper(); ExchangeStrategies drifted = ExchangeStrategies.builder().codecs(configurer -> { - configurer.defaultCodecs().jackson2JsonEncoder(new Jackson2JsonEncoder(production)); - configurer.defaultCodecs().jackson2JsonDecoder(new Jackson2JsonDecoder(new ObjectMapper())); + configurer.defaultCodecs().jacksonJsonEncoder(new JacksonJsonEncoder(production)); + configurer.defaultCodecs().jacksonJsonDecoder(new JacksonJsonDecoder(JsonMapper.builder().build())); }).build(); assertRejected(drifted, ClientCodecs.UNLIMITED, "encoder mapper must not be the production mapper"); } @Test public void guardRejectsOneSharedMapper() { - ObjectMapper shared = new ObjectMapper(); + JsonMapper shared = JsonMapper.builder().build(); ExchangeStrategies drifted = ExchangeStrategies.builder().codecs(configurer -> { - configurer.defaultCodecs().jackson2JsonEncoder(new Jackson2JsonEncoder(shared)); - configurer.defaultCodecs().jackson2JsonDecoder(new Jackson2JsonDecoder(shared)); + configurer.defaultCodecs().jacksonJsonEncoder(new JacksonJsonEncoder(shared)); + configurer.defaultCodecs().jacksonJsonDecoder(new JacksonJsonDecoder(shared)); }).build(); assertRejected(drifted, ClientCodecs.UNLIMITED, "encoder and decoder must have separate mappers"); } @@ -54,7 +54,7 @@ public void guardRejectsAnotherBufferLimit() { @Test public void guardRejectsAnotherMapperConfiguration() { ExchangeStrategies drifted = ExchangeStrategies.builder().codecs(configurer -> { - configurer.defaultCodecs().jackson2JsonEncoder(new Jackson2JsonEncoder(new ObjectMapper())); + configurer.defaultCodecs().jacksonJsonEncoder(new JacksonJsonEncoder(JsonMapper.builder().build())); configurer.defaultCodecs().maxInMemorySize(ClientCodecs.UNLIMITED); }).build(); assertRejected(drifted, ClientCodecs.UNLIMITED, "encoder mapper: expected " + ClientCodecs.DEFAULT_CODEC_PROFILE); diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ConfigBinding.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ConfigBinding.java index f06b9533e..3be0734eb 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ConfigBinding.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ConfigBinding.java @@ -1,12 +1,12 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.util.RawValue; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.util.RawValue; import org.lowcoder.sdk.config.JsonViews; import org.lowcoder.sdk.exception.PluginException; import org.lowcoder.sdk.util.JsonUtils; +import tools.jackson.core.JacksonException; import java.util.LinkedHashMap; import java.util.Map; @@ -85,7 +85,7 @@ public static Map> forms(String json) { try { return MAPPER.readValue(json, new TypeReference>>() { }); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalArgumentException("config-binding input is not an object of forms: " + e.getOriginalMessage(), e); } } @@ -146,7 +146,7 @@ public static String errorText(Throwable error) { public static String write(Object report) { try { return MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(report); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalStateException("cannot write config-binding report", e); } } @@ -154,7 +154,7 @@ public static String write(Object report) { private static Object written(Object bound, Class view) { try { return new RawValue(view == null ? MAPPER.writeValueAsString(bound) : MAPPER.writerWithView(view).writeValueAsString(bound)); - } catch (JsonProcessingException | RuntimeException e) { + } catch (RuntimeException e) { return Map.of(ERROR_KEY, errorText(e)); } } diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ConfigBindingTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ConfigBindingTest.java index af7027c73..b75ccbdba 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ConfigBindingTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/ConfigBindingTest.java @@ -1,7 +1,7 @@ package org.lowcoder.sdk.contract; import com.fasterxml.jackson.annotation.JsonView; -import com.fasterxml.jackson.databind.util.RawValue; +import tools.jackson.databind.util.RawValue; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import org.lowcoder.sdk.config.JsonViews; diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/FieldTree.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/FieldTree.java index 2efd3e206..21e80e3e3 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/FieldTree.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/FieldTree.java @@ -1,6 +1,6 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import java.lang.reflect.Array; import java.lang.reflect.Field; diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuard.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuard.java index ee27315bb..15752db62 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuard.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuard.java @@ -11,15 +11,15 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonView; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.databind.cfg.MapperConfig; -import com.fasterxml.jackson.databind.introspect.AnnotatedClass; -import com.fasterxml.jackson.databind.introspect.AnnotatedMember; -import com.fasterxml.jackson.databind.introspect.AnnotatedWithParams; -import com.fasterxml.jackson.databind.introspect.AnnotationMap; -import com.fasterxml.jackson.databind.util.ClassUtil; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.databind.cfg.MapperConfig; +import tools.jackson.databind.introspect.AnnotatedClass; +import tools.jackson.databind.introspect.AnnotatedMember; +import tools.jackson.databind.introspect.AnnotatedWithParams; +import tools.jackson.databind.introspect.AnnotationMap; +import tools.jackson.databind.util.ClassUtil; import java.lang.annotation.Annotation; import java.lang.reflect.Field; @@ -42,7 +42,7 @@ *

    It reads the annotations of a type as Jackson's own introspection sees them, through the {@link AnnotatedClass} * of the given mapper's serialization and deserialization configurations (so mix-ins and annotations inherited from * supertypes are included, and spelling, imports and fully qualified names do not matter): the class annotations, - * {@link AnnotatedMember#getAllAnnotations()} of every field, member method, static method, constructor and factory, + * {@link AnnotatedMember#annotations()} of every field, member method, static method, constructor and factory, * and the annotations of their parameters. Enum constants are read by reflection, because Jackson's * {@link AnnotatedClass} does not list static fields. * @@ -58,7 +58,7 @@ public final class JacksonAnnotationGuard { public static final Set JACKSON_ANNOTATION_PACKAGES = Set.of( - "com.fasterxml.jackson.annotation", "com.fasterxml.jackson.databind.annotation"); + "com.fasterxml.jackson.annotation", "tools.jackson.databind.annotation"); public static final Set> ALLOWED = Set.of( JsonProperty.class, JsonAlias.class, JsonIgnore.class, JsonView.class, JsonInclude.class, JsonCreator.class, JsonTypeInfo.class, JsonSubTypes.class, JsonTypeName.class, @@ -87,10 +87,10 @@ public String toString() { public static List occurrences(ObjectMapper mapper, Class type) { SortedSet seen = new TreeSet<>(); List result = new ArrayList<>(); - for (MapperConfig config : List.of(mapper.getSerializationConfig(), mapper.getDeserializationConfig())) { - AnnotatedClass annotatedClass = config.introspectClassAnnotations(config.constructType(type)).getClassInfo(); + for (MapperConfig config : List.of(mapper.serializationConfig(), mapper.deserializationConfig())) { + AnnotatedClass annotatedClass = config.classIntrospectorInstance().forOperation(config).introspectClassAnnotations(config.constructType(type)); add(type, CLASS_MEMBER, classAnnotations(config, annotatedClass), seen, result); - annotatedClass.fields().forEach(field -> add(type, field.getFullName(), annotations(field.getAllAnnotations()), seen, result)); + annotatedClass.fields().forEach(field -> add(type, field.getFullName(), field.annotations().toList(), seen, result)); annotatedClass.memberMethods().forEach(method -> addWithParameters(type, method, seen, result)); annotatedClass.getFactoryMethods().forEach(method -> addWithParameters(type, method, seen, result)); annotatedClass.getConstructors().forEach(constructor -> addWithParameters(type, constructor, seen, result)); @@ -163,7 +163,7 @@ private static boolean isDefault(Annotation annotation, Method attribute) { private static void addWithParameters(Class type, AnnotatedWithParams member, SortedSet seen, List result) { String name = member.getFullName() + "(" + member.getParameterCount() + " parameter(s))"; - add(type, name, annotations(member.getAllAnnotations()), seen, result); + add(type, name, member.annotations().toList(), seen, result); for (int i = 0; i < member.getParameterCount(); i++) { add(type, name + " parameter " + i, annotations(member.getParameterAnnotations(i)), seen, result); } @@ -179,13 +179,13 @@ private static Iterable classAnnotations(MapperConfig config, Ann Set> candidates = new LinkedHashSet<>(); List> sources = new ArrayList<>(); sources.add(annotatedClass.getRawType()); - sources.addAll(ClassUtil.findSuperTypes(annotatedClass.getRawType(), null)); + sources.addAll(ClassUtil.findRawSuperTypes(annotatedClass.getRawType(), null, false)); for (Class source : sources) { addCandidates(source.getAnnotations(), candidates); Class mixIn = config.findMixInClassFor(source); if (mixIn != null) { addCandidates(mixIn.getAnnotations(), candidates); - ClassUtil.findSuperTypes(mixIn, null).forEach(mixInSuper -> addCandidates(mixInSuper.getAnnotations(), candidates)); + ClassUtil.findRawSuperTypes(mixIn, null, false).forEach(mixInSuper -> addCandidates(mixInSuper.getAnnotations(), candidates)); } } List resolved = new ArrayList<>(); @@ -208,7 +208,7 @@ private static void addCandidates(Annotation[] annotations, Set annotations(AnnotationMap map) { - return map == null ? List.of() : map.annotations(); + return map == null ? List.of() : map.values().toList(); } private static void add(Class type, String member, Iterable annotations, SortedSet seen, List result) { diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuardTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuardTest.java index a3117b457..ccb4aee10 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuardTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonAnnotationGuardTest.java @@ -10,14 +10,15 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonView; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.PropertyNamingStrategies; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StringDeserializer; -import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.PropertyNamingStrategies; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonNaming; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.databind.annotation.JsonSerialize; +import tools.jackson.databind.deser.jdk.StringDeserializer; +import tools.jackson.databind.json.JsonMapper; +import tools.jackson.databind.ser.std.ToStringSerializer; import org.junit.jupiter.api.Test; import org.lowcoder.sdk.util.JsonUtils; @@ -223,7 +224,9 @@ public void classAnnotationsAreFoundOnTypeSupertypeAndMixIn() { assertViolation(PRODUCTION, ClassFormatted.class, JSON_FORMAT); assertViolation(PRODUCTION, InheritsClassFormat.class, JSON_FORMAT); assertViolation(PRODUCTION, ImplementsFormatted.class, "@JsonNaming"); - ObjectMapper withMixIn = new ObjectMapper().addMixIn(Plain.class, ClassFormatMixIn.class); + ObjectMapper withMixIn = JsonMapper.builder() + .addMixIn(Plain.class, ClassFormatMixIn.class) + .build(); assertViolation(withMixIn, Plain.class, "@JsonPropertyOrder"); } @@ -234,7 +237,9 @@ public void bundleMarkerIsItselfOutsideTheAllowList() { @Test public void mixInOfTheGivenMapperIsSeen() { - ObjectMapper withMixIn = new ObjectMapper().addMixIn(Plain.class, FormatMixIn.class); + ObjectMapper withMixIn = JsonMapper.builder() + .addMixIn(Plain.class, FormatMixIn.class) + .build(); assertThat(violationsOf(PRODUCTION, Plain.class)).isEmpty(); assertViolation(withMixIn, Plain.class, JSON_FORMAT); } diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonIntrospection.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonIntrospection.java new file mode 100644 index 000000000..a3333ac90 --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JacksonIntrospection.java @@ -0,0 +1,68 @@ +package org.lowcoder.sdk.contract; + +import tools.jackson.databind.BeanDescription; +import tools.jackson.databind.DeserializationConfig; +import tools.jackson.databind.JavaType; +import tools.jackson.databind.SerializationConfig; +import tools.jackson.databind.introspect.AnnotatedClass; +import tools.jackson.databind.introspect.ClassIntrospector; +import tools.jackson.databind.json.JsonMapper; +import tools.jackson.databind.jsontype.NamedType; + +import java.util.Collection; + +/** + * Jackson's own view of a type, as the contract tests read it (what a mapper would serialize or bind), in one place: + * Jackson 3 hands the introspection out through the mapper's serialization and deserialization contexts and its + * configurations, not through the mapper itself. + */ +public final class JacksonIntrospection { + + private JacksonIntrospection() { + } + + /** The class annotations of {@code type}, with mix-ins and the annotations of its supertypes, for serialization. */ + public static AnnotatedClass serializationClass(JsonMapper mapper, JavaType type) { + return mapper._serializationContext().introspectClassAnnotations(type); + } + + /** The class annotations of {@code type}, with mix-ins and the annotations of its supertypes, for deserialization. */ + public static AnnotatedClass deserializationClass(JsonMapper mapper, JavaType type) { + return mapper._deserializationContext().introspectClassAnnotations(type); + } + + /** What {@code mapper} writes of {@code type}: its serialization description. */ + public static BeanDescription serialization(JsonMapper mapper, JavaType type) { + return mapper._serializationContext().introspectBeanDescription(type); + } + + /** What {@code mapper} reads into {@code type}: its deserialization description, not following a builder. */ + public static BeanDescription deserialization(JsonMapper mapper, JavaType type) { + return mapper._deserializationContext().introspectBeanDescription(type); + } + + /** The {@code @JsonPOJOBuilder} class that {@code mapper} binds {@code type} through, or {@code null}. */ + public static Class builderOf(JsonMapper mapper, BeanDescription deserialization) { + DeserializationConfig config = mapper.deserializationConfig(); + return config.getAnnotationIntrospector().findPOJOBuilder(config, deserialization.getClassInfo()); + } + + /** The description of {@code builder}, as the builder of {@code deserialization}'s type. */ + public static BeanDescription builderDescription(JsonMapper mapper, JavaType builder, BeanDescription deserialization) { + DeserializationConfig config = mapper.deserializationConfig(); + ClassIntrospector introspector = config.classIntrospectorInstance().forOperation(config); + return introspector.introspectForDeserializationWithBuilder(builder, deserialization); + } + + /** The registered subtypes of {@code type} with the class they stand for, as the serializer resolves them. */ + public static Collection subtypesByClass(JsonMapper mapper, AnnotatedClass type) { + SerializationConfig config = mapper.serializationConfig(); + return config.getSubtypeResolver().collectAndResolveSubtypesByClass(config, type); + } + + /** The registered subtypes of {@code type} with the type id they are read by, as the deserializer resolves them. */ + public static Collection subtypesByTypeId(JsonMapper mapper, AnnotatedClass type) { + DeserializationConfig config = mapper.deserializationConfig(); + return config.getSubtypeResolver().collectAndResolveSubtypesByTypeId(config, type); + } +} diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JavaValueWalker.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JavaValueWalker.java index 8514d35fd..54ca628a8 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JavaValueWalker.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/JavaValueWalker.java @@ -1,6 +1,6 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import java.util.ArrayList; import java.util.Iterator; @@ -53,7 +53,7 @@ public static void walk(String pointer, Object value, Map classe } } else if (value instanceof JsonNode node && node.isObject()) { List keys = new ArrayList<>(); - for (Iterator> fields = node.fields(); fields.hasNext(); ) { + for (Iterator> fields = node.properties().iterator(); fields.hasNext(); ) { Map.Entry field = fields.next(); keys.add(field.getKey()); walk(pointer + "/" + escape(field.getKey()), field.getValue(), classes, keyOrder); diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/PayloadBoundsTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/PayloadBoundsTest.java index 2bf7e9d2f..ede5eed5f 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/PayloadBoundsTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/PayloadBoundsTest.java @@ -1,9 +1,9 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.core.StreamReadConstraints; -import com.fasterxml.jackson.core.exc.StreamConstraintsException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.StreamReadConstraints; +import tools.jackson.core.exc.StreamConstraintsException; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.lowcoder.sdk.util.JsonUtils; @@ -21,16 +21,17 @@ /** * The read limits of the production mapper (docs/API_PAYLOAD_TEST_PLAN.md §4.8, R11, E3), on a DSL - * {@code Map}: {@code JsonUtils} sets no {@code StreamReadConstraints}, so the Jackson defaults apply and - * can change with an upgrade. Each limit is read at its value and one past it: nesting depth 1000, a number of 1000 - * digits, a string of 20,000,000 characters. The configured values are asserted too, so a changed default is named - * even where the behaviour still happens to pass. + * {@code Map}: {@code JsonUtils} sets the nesting depth and the string length of its + * {@code StreamReadConstraints} to the Jackson 2 values, because the Jackson 3 defaults differ (nesting depth 500, and a + * larger string length); the number length is left at the default, which is the same. Each limit is read at its value + * and one past it: nesting depth 1000, a number of 1000 digits, a string of 20,000,000 characters. The configured + * values are asserted too, so a changed default or a dropped setting is named even where the behaviour still happens + * to pass. * *

    Inputs are generated as streams ({@link #repeated}), never held as text; the largest test holds the parsed * 20,000,000-character string and Jackson's buffer for it. These tests run in every build (owner decision C10-A6). - * Limits: the codec's 20 MB {@code maxInMemorySize} is the server module's {@code PayloadBoundsTest}; the other - * Jackson 2.15 has only these three read constraints; the document- and name-length limits of later versions are not - * seen here until an upgrade adds them to {@code StreamReadConstraints}. + * Limits: the codec's 20 MB {@code maxInMemorySize} is the server module's {@code PayloadBoundsTest}; the + * document-, name- and token-count limits of the Jackson defaults are not asserted here. */ public class PayloadBoundsTest { @@ -46,8 +47,8 @@ public class PayloadBoundsTest { private static final ObjectMapper MAPPER = JsonUtils.getObjectMapper(); @Test - public void theMapperUsesTheJacksonDefaultLimits() { - StreamReadConstraints constraints = MAPPER.getFactory().streamReadConstraints(); + public void theMapperHasTheConfiguredLimits() { + StreamReadConstraints constraints = MAPPER.tokenStreamFactory().streamReadConstraints(); System.out.println("[PayloadBoundsTest] read constraints: nesting " + constraints.getMaxNestingDepth() + ", number " + constraints.getMaxNumberLength() + ", string " + constraints.getMaxStringLength()); assertEquals(MAX_NESTING_DEPTH, constraints.getMaxNestingDepth()); diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/PluginConfigPolymorphismTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/PluginConfigPolymorphismTest.java index 54a52a4d2..fad9f4a23 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/PluginConfigPolymorphismTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/PluginConfigPolymorphismTest.java @@ -1,15 +1,18 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import com.fasterxml.jackson.databind.introspect.AnnotatedClass; -import com.fasterxml.jackson.databind.jsontype.NamedType; +import tools.jackson.databind.DeserializationConfig; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectWriter; +import tools.jackson.databind.introspect.AnnotatedClass; +import tools.jackson.databind.json.JsonMapper; +import tools.jackson.databind.jsontype.NamedType; import org.junit.jupiter.api.Test; import org.lowcoder.sdk.config.JsonViews; import org.lowcoder.sdk.plugin.common.ssl.SslConfig; import org.lowcoder.sdk.plugin.restapi.auth.AuthConfig; import org.lowcoder.sdk.util.JsonUtils; +import tools.jackson.core.JacksonException; import java.io.IOException; import java.util.ArrayList; @@ -53,7 +56,7 @@ public class PluginConfigPolymorphismTest { static final String FAILS_WITH = "failsWith "; private static final ObjectMapper MAPPER = JsonUtils.getObjectMapper(); - private static final ObjectMapper BARE = new ObjectMapper(); + private static final ObjectMapper BARE = JsonMapper.builderWithJackson2Defaults().build(); private static final GoldenJson GOLDEN = GoldenJson.forModule(); @Test @@ -70,9 +73,10 @@ public void sslConfigCasesAsPinned() throws IOException { public void registeredIdsAsPinned() throws IOException { Map> ids = new TreeMap<>(); for (Class base : List.of(AuthConfig.class, SslConfig.class)) { - AnnotatedClass annotated = MAPPER.getDeserializationConfig().introspectClassAnnotations(base).getClassInfo(); + DeserializationConfig config = MAPPER.deserializationConfig(); + AnnotatedClass annotated = config.classIntrospectorInstance().forOperation(config).introspectClassAnnotations(config.constructType(base)); Map byId = new TreeMap<>(); - for (NamedType subtype : MAPPER.getSubtypeResolver().collectAndResolveSubtypesByTypeId(MAPPER.getDeserializationConfig(), annotated)) { + for (NamedType subtype : config.getSubtypeResolver().collectAndResolveSubtypesByTypeId(config, annotated)) { if (subtype.hasName()) { byId.put(subtype.getName(), subtype.getType().getName()); } @@ -90,7 +94,7 @@ public void registeredIdsAsPinned() throws IOException { private static void assertCases(Class base) throws IOException { JsonNode inputs = BARE.readTree(GOLDEN.read(DIRECTORY + base.getSimpleName() + INPUTS_SUFFIX)); List cases = new ArrayList<>(); - Iterator> entries = inputs.fields(); + Iterator> entries = inputs.properties().iterator(); while (entries.hasNext()) { Map.Entry entry = entries.next(); String input = entry.getValue().toString(); @@ -98,7 +102,7 @@ private static void assertCases(Class base) throws IOException { Object bound; try { bound = MAPPER.readValue(input, base); - } catch (IOException e) { + } catch (JacksonException e) { outcome.append(',').append(quote(CLASS)).append(':').append(quote(FAILS_WITH + e.getClass().getName())).append('}'); cases.add(quote(entry.getKey()) + ":" + outcome); System.out.println("[PluginConfigPolymorphismTest] " + base.getSimpleName() + " " + entry.getKey() + ": " + outcome); @@ -125,7 +129,7 @@ private static String readBack(ObjectWriter writer, String output, Class base try { Object again = MAPPER.readValue(output, base); return "{" + quote(CLASS) + ":" + quote(again.getClass().getName()) + "," + quote(NO_VIEW) + ":" + writer.writeValueAsString(again) + "}"; - } catch (IOException e) { + } catch (JacksonException e) { return quote(FAILS_WITH + e.getClass().getName()); } } @@ -133,7 +137,7 @@ private static String readBack(ObjectWriter writer, String output, Class base private static String boundClass(ObjectMapper mapper, String input, Class base) { try { return mapper.readValue(input, base).getClass().getName(); - } catch (IOException e) { + } catch (JacksonException e) { return FAILS_WITH + e.getClass().getName(); } } @@ -141,7 +145,7 @@ private static String boundClass(ObjectMapper mapper, String input, Class bas private static String quote(String text) { try { return BARE.writeValueAsString(text); - } catch (IOException e) { + } catch (JacksonException e) { throw new IllegalStateException(e); } } diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/QueryResults.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/QueryResults.java index e6e28409c..99a641480 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/QueryResults.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/QueryResults.java @@ -1,8 +1,7 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.databind.util.RawValue; +import tools.jackson.databind.node.ObjectNode; +import tools.jackson.databind.util.RawValue; import org.lowcoder.sdk.models.QueryExecutionResult; import org.lowcoder.sdk.util.JsonUtils; @@ -71,7 +70,7 @@ public static Map report(QueryExecutionResult result) { public static Object written(Object value) { try { return new RawValue(JsonUtils.getObjectMapper().writeValueAsString(value)); - } catch (JsonProcessingException | RuntimeException e) { + } catch (RuntimeException e) { return Map.of(ERROR_KEY, ConfigBinding.errorText(e)); } } diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServer.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServer.java index bebc13f96..c1913926e 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServer.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RecordingHttpServer.java @@ -1,6 +1,6 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.databind.util.RawValue; +import tools.jackson.databind.util.RawValue; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RepresentativeInput.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RepresentativeInput.java index 230a264fc..a64d6aaea 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RepresentativeInput.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/contract/RepresentativeInput.java @@ -1,8 +1,9 @@ package org.lowcoder.sdk.contract; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.JsonNode; import org.lowcoder.sdk.util.JsonUtils; +import tools.jackson.core.JacksonException; import java.io.IOException; import java.io.InputStream; @@ -35,8 +36,8 @@ public static Map map() { try { return JsonUtils.getObjectMapper().readValue(TEXT, new TypeReference>() { }); - } catch (IOException e) { - throw new UncheckedIOException("cannot read " + RESOURCE, e); + } catch (JacksonException e) { + throw new IllegalStateException("cannot read " + RESOURCE, e); } } @@ -44,8 +45,8 @@ public static Map map() { public static JsonNode node() { try { return JsonUtils.getObjectMapper().readTree(TEXT); - } catch (IOException e) { - throw new UncheckedIOException("cannot read " + RESOURCE, e); + } catch (JacksonException e) { + throw new IllegalStateException("cannot read " + RESOURCE, e); } } diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/sheet/SheetChangeSetTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/sheet/SheetChangeSetTest.java index 53512f2fd..a6a427324 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/sheet/SheetChangeSetTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/sheet/SheetChangeSetTest.java @@ -8,8 +8,10 @@ import static org.lowcoder.sdk.plugin.common.constant.Constants.COMP_TYPE_KEY; import static org.lowcoder.sdk.plugin.common.constant.Constants.RECORD_FORM_KEY; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -32,6 +34,7 @@ import org.lowcoder.sdk.plugin.sheet.changeset.SheetKeyValuePairChangeSet; import org.lowcoder.sdk.plugin.sheet.changeset.SheetObjectChangeSet; import org.lowcoder.sdk.plugin.sqlcommand.changeset.KeyValuePairChangeSet; +import tools.jackson.core.JacksonException; /** * Parsing and rendering of the change sets of the sheet (Google Sheets) GUI commands: the twins of the @@ -46,7 +49,7 @@ class SheetChangeSetTest { private static final String PAIR_COLUMN = "a"; private static final String PAIR_VALUE = "1"; - private static final ObjectMapper MAPPER = new ObjectMapper(); + private static final ObjectMapper MAPPER = JsonMapper.builderWithJackson2Defaults().build(); private static final String BLANK_EMPTY = ""; private static final String BLANK_SPACE = " "; private static final String BLANK_TAB_SPACE = "\t "; @@ -92,7 +95,7 @@ private static Map pair(Object column, Object value) { private static JsonNode json(String text) { try { return MAPPER.readTree(text); - } catch (com.fasterxml.jackson.core.JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalArgumentException(text, e); } } diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetParseTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetParseTest.java index e39ef804a..ee18b009e 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetParseTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetParseTest.java @@ -9,8 +9,10 @@ import static org.lowcoder.sdk.plugin.common.constant.Constants.PRIMARY_KEY_FORM_KEY; import static org.lowcoder.sdk.plugin.common.constant.Constants.RECORD_FORM_KEY; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,6 +28,7 @@ import org.junit.jupiter.params.provider.MethodSource; import org.lowcoder.sdk.exception.PluginCommonError; import org.lowcoder.sdk.exception.PluginException; +import tools.jackson.core.JacksonException; /** * Parsing and rendering of the change sets behind the GUI insert/update/upsert commands. The non-list {@code comp} @@ -39,7 +42,7 @@ class ChangeSetParseTest { private static final String PAIR_COLUMN = "a"; private static final int PAIR_VALUE = 1; - private static final ObjectMapper MAPPER = new ObjectMapper(); + private static final ObjectMapper MAPPER = JsonMapper.builderWithJackson2Defaults().build(); private static void assertPluginError(Runnable action, String messageKey, Object... args) { assertThatThrownBy(action::run).isInstanceOfSatisfying(PluginException.class, e -> { @@ -211,7 +214,7 @@ void parseBulkRecordsAndPrimaryKeyRequireStrings() { private static JsonNode json(String text) { try { return MAPPER.readTree(text); - } catch (com.fasterxml.jackson.core.JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalArgumentException(text, e); } } diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/LegacyBeanNamingTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/LegacyBeanNamingTest.java new file mode 100644 index 000000000..7622bbb29 --- /dev/null +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/LegacyBeanNamingTest.java @@ -0,0 +1,79 @@ +package org.lowcoder.sdk.util; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; + +import tools.jackson.databind.json.JsonMapper; + +/** + * {@link LegacyBeanNaming}: accessor names with a leading run of upper-case letters get the Jackson 2 property name. + */ +class LegacyBeanNamingTest { + + @ParameterizedTest(name = "[{index}] ''{0}'' -> ''{1}''") + @CsvSource({ + "SQLTypeName, sqltypeName", + "URL, url", + "URLPath, urlpath", + "Name, name", + "A, a", + "name, name", + "sqlType, sqlType"}) + void lowerCaseLeadingRunGivesTheJackson2Name(String implicitName, String expected) { + String actual = LegacyBeanNaming.lowerCaseLeadingRun(implicitName); + + System.out.println("[LegacyBeanNamingTest] " + implicitName + " -> " + actual); + assertThat(actual).isEqualTo(expected); + } + + @Test + void lowerCaseLeadingRunKeepsAnEmptyName() { + assertThat(LegacyBeanNaming.lowerCaseLeadingRun("")).isEmpty(); + } + + @Test + void aMapperWithTheStrategyWritesAndReadsTheJackson2Names() throws Exception { + JsonMapper mapper = JsonMapper.builder().propertyNamingStrategy(new LegacyBeanNaming()).build(); + + String json = mapper.writeValueAsString(new Bean("t", "u")); + System.out.println("[LegacyBeanNamingTest] written: " + json); + assertThat(json).contains("\"sqltypeName\":\"t\"").contains("\"url\":\"u\""); + + Bean read = mapper.readValue("{\"sqltypeName\":\"a\",\"url\":\"b\"}", Bean.class); + assertThat(read.getSQLTypeName()).isEqualTo("a"); + assertThat(read.getURL()).isEqualTo("b"); + } + + /** The accessors whose Jackson 3 default names ({@code SQLTypeName}, {@code URL}) differ from Jackson 2's. */ + public static class Bean { + private String sqlTypeName; + private String url; + + public Bean() { + } + + Bean(String sqlTypeName, String url) { + this.sqlTypeName = sqlTypeName; + this.url = url; + } + + public String getSQLTypeName() { + return sqlTypeName; + } + + public void setSQLTypeName(String value) { + this.sqlTypeName = value; + } + + public String getURL() { + return url; + } + + public void setURL(String value) { + this.url = value; + } + } +} diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/MustacheHelperEdgeCasesTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/MustacheHelperEdgeCasesTest.java index 1b897fbc5..f1606b183 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/MustacheHelperEdgeCasesTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/MustacheHelperEdgeCasesTest.java @@ -3,7 +3,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import java.math.BigDecimal; import java.math.BigInteger; import java.util.ArrayList; @@ -220,11 +220,11 @@ void jsonRenderingResolvesStringsKeysAndSingleTokens() { assertThat(renderJson("{\"{{k}}\": 1}", params).toString()).as("an object key is resolved too").isEqualTo("{\"key\":1}"); assertThat(renderJson("{\"a\": \" \"}", params).toString()).as("a blank string value becomes empty").isEqualTo("{\"a\":\"\"}"); assertThat(renderJson("{\"a\": {{nul}}}", params).toString()).isEqualTo("{\"a\":null}"); - assertThat(renderJson("{{ x }}", params).textValue()).isEqualTo("X"); - assertThat(renderJson("{{e}}", params).textValue()).isEmpty(); + assertThat(renderJson("{{ x }}", params).stringValue()).isEqualTo("X"); + assertThat(renderJson("{{e}}", params).stringValue()).isEmpty(); assertThat(renderJson("{{nul}}", params).isNull()).isTrue(); assertThat(renderJson("{{missing}}", params).isNull()).isTrue(); - assertThat(renderJson("plain text", params).textValue()).isEqualTo("plain text"); + assertThat(renderJson("plain text", params).stringValue()).isEqualTo("plain text"); } @Test diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/NodeConversionContractTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/NodeConversionContractTest.java index 59ed6acdb..584ef887a 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/NodeConversionContractTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/NodeConversionContractTest.java @@ -1,6 +1,6 @@ package org.lowcoder.sdk.util; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.junit.jupiter.api.Test; import org.lowcoder.sdk.contract.BoundarySites; import org.lowcoder.sdk.contract.ConfigBinding; diff --git a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/TreeTextContractTest.java b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/TreeTextContractTest.java index 3d8d86f83..88623872f 100644 --- a/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/TreeTextContractTest.java +++ b/server/api-service/lowcoder-sdk/src/test/java/org/lowcoder/sdk/util/TreeTextContractTest.java @@ -1,8 +1,7 @@ package org.lowcoder.sdk.util; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.JsonNodeFactory; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.node.JsonNodeFactory; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.Test; import org.lowcoder.sdk.contract.BoundarySites; import org.lowcoder.sdk.contract.ConfigBinding; @@ -80,7 +79,7 @@ public void rawHttpRequestBody() { * as embedded error text, since its mapper registers no modules; the production mapper writes it as a number. */ @Test - public void toStringIsNotTheProductionMapper() throws JsonProcessingException { + public void toStringIsNotTheProductionMapper() { ObjectNode node = JsonNodeFactory.instance.objectNode(); node.put(DECIMAL_KEY, new BigDecimal(DECIMAL_TEXT)); node.putPOJO(INSTANT_KEY, Instant.EPOCH); diff --git a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/config-binding/GraphQLDatasourceConfig.json b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/config-binding/GraphQLDatasourceConfig.json index c4b9e351b..17289e49d 100644 --- a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/config-binding/GraphQLDatasourceConfig.json +++ b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/config-binding/GraphQLDatasourceConfig.json @@ -247,13 +247,13 @@ "/authConfig/type" : "null" }, "noView" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null (through reference chain: org.lowcoder.sdk.plugin.graphql.GraphQLDatasourceConfig[\"oauth2InheritFromLogin\"])" + "error" : "tools.jackson.databind.DatabindException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null\n at [No location information] (through reference chain: org.lowcoder.sdk.plugin.graphql.GraphQLDatasourceConfig[\"oauth2InheritFromLogin\"])" }, "Public" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null (through reference chain: org.lowcoder.sdk.plugin.graphql.GraphQLDatasourceConfig[\"oauth2InheritFromLogin\"])" + "error" : "tools.jackson.databind.DatabindException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null\n at [No location information] (through reference chain: org.lowcoder.sdk.plugin.graphql.GraphQLDatasourceConfig[\"oauth2InheritFromLogin\"])" }, "Internal" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null (through reference chain: org.lowcoder.sdk.plugin.graphql.GraphQLDatasourceConfig[\"oauth2InheritFromLogin\"])" + "error" : "tools.jackson.databind.DatabindException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null\n at [No location information] (through reference chain: org.lowcoder.sdk.plugin.graphql.GraphQLDatasourceConfig[\"oauth2InheritFromLogin\"])" } }, "unknownAuthType" : { diff --git a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/config-binding/RestApiDatasourceConfig.json b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/config-binding/RestApiDatasourceConfig.json index 43626a079..c98847583 100644 --- a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/config-binding/RestApiDatasourceConfig.json +++ b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/config-binding/RestApiDatasourceConfig.json @@ -273,13 +273,13 @@ "/sslConfig/sslCertVerificationType" : "null" }, "noView" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null (through reference chain: org.lowcoder.sdk.plugin.restapi.RestApiDatasourceConfig[\"oauth2InheritFromLogin\"])" + "error" : "tools.jackson.databind.DatabindException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null\n at [No location information] (through reference chain: org.lowcoder.sdk.plugin.restapi.RestApiDatasourceConfig[\"oauth2InheritFromLogin\"])" }, "Public" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null (through reference chain: org.lowcoder.sdk.plugin.restapi.RestApiDatasourceConfig[\"oauth2InheritFromLogin\"])" + "error" : "tools.jackson.databind.DatabindException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null\n at [No location information] (through reference chain: org.lowcoder.sdk.plugin.restapi.RestApiDatasourceConfig[\"oauth2InheritFromLogin\"])" }, "Internal" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null (through reference chain: org.lowcoder.sdk.plugin.restapi.RestApiDatasourceConfig[\"oauth2InheritFromLogin\"])" + "error" : "tools.jackson.databind.DatabindException: Cannot invoke \"org.lowcoder.sdk.plugin.restapi.auth.RestApiAuthType.name()\" because the return value of \"org.lowcoder.sdk.plugin.restapi.auth.AuthConfig.getType()\" is null\n at [No location information] (through reference chain: org.lowcoder.sdk.plugin.restapi.RestApiDatasourceConfig[\"oauth2InheritFromLogin\"])" } }, "unknownAuthType" : { diff --git a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/node-conversion/renderMustacheJson.json b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/node-conversion/renderMustacheJson.json index c710e8d79..07433558b 100644 --- a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/node-conversion/renderMustacheJson.json +++ b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/node-conversion/renderMustacheJson.json @@ -2,7 +2,7 @@ "param:int" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.IntNode" + "" : "tools.jackson.databind.node.IntNode" }, "keyOrder" : { } }, @@ -11,7 +11,7 @@ "param:long" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.LongNode" + "" : "tools.jackson.databind.node.LongNode" }, "keyOrder" : { } }, @@ -20,7 +20,7 @@ "param:double" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.DoubleNode" + "" : "tools.jackson.databind.node.DoubleNode" }, "keyOrder" : { } }, @@ -29,7 +29,7 @@ "param:bigDecimal" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.DecimalNode" + "" : "tools.jackson.databind.node.DecimalNode" }, "keyOrder" : { } }, @@ -38,7 +38,7 @@ "param:bigInteger" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.BigIntegerNode" + "" : "tools.jackson.databind.node.BigIntegerNode" }, "keyOrder" : { } }, @@ -47,7 +47,7 @@ "param:bool" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.BooleanNode" + "" : "tools.jackson.databind.node.BooleanNode" }, "keyOrder" : { } }, @@ -56,7 +56,7 @@ "param:nothing" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.NullNode" + "" : "tools.jackson.databind.node.NullNode" }, "keyOrder" : { } }, @@ -65,7 +65,7 @@ "param:str" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.TextNode" + "" : "tools.jackson.databind.node.StringNode" }, "keyOrder" : { } }, @@ -74,13 +74,13 @@ "param:map" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/zeta" : "com.fasterxml.jackson.databind.node.IntNode", - "/alpha" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/alpha/0" : "com.fasterxml.jackson.databind.node.LongNode", - "/alpha/1" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/alpha/2" : "com.fasterxml.jackson.databind.node.NullNode", - "/alpha/3" : "com.fasterxml.jackson.databind.node.DecimalNode" + "" : "tools.jackson.databind.node.ObjectNode", + "/zeta" : "tools.jackson.databind.node.IntNode", + "/alpha" : "tools.jackson.databind.node.ArrayNode", + "/alpha/0" : "tools.jackson.databind.node.LongNode", + "/alpha/1" : "tools.jackson.databind.node.DoubleNode", + "/alpha/2" : "tools.jackson.databind.node.NullNode", + "/alpha/3" : "tools.jackson.databind.node.DecimalNode" }, "keyOrder" : { "" : [ "zeta", "alpha" ] @@ -91,12 +91,12 @@ "param:list" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/0" : "com.fasterxml.jackson.databind.node.IntNode", - "/1" : "com.fasterxml.jackson.databind.node.TextNode", - "/2" : "com.fasterxml.jackson.databind.node.NullNode", - "/3" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/3/0" : "com.fasterxml.jackson.databind.node.BooleanNode" + "" : "tools.jackson.databind.node.ArrayNode", + "/0" : "tools.jackson.databind.node.IntNode", + "/1" : "tools.jackson.databind.node.StringNode", + "/2" : "tools.jackson.databind.node.NullNode", + "/3" : "tools.jackson.databind.node.ArrayNode", + "/3/0" : "tools.jackson.databind.node.BooleanNode" }, "keyOrder" : { } }, @@ -105,7 +105,7 @@ "missingParam" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.NullNode" + "" : "tools.jackson.databind.node.NullNode" }, "keyOrder" : { } }, @@ -114,7 +114,7 @@ "int" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.IntNode" + "" : "tools.jackson.databind.node.IntNode" }, "keyOrder" : { } }, @@ -123,7 +123,7 @@ "intMaxPlusOne" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.LongNode" + "" : "tools.jackson.databind.node.LongNode" }, "keyOrder" : { } }, @@ -132,7 +132,7 @@ "longMaxPlusOne" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.BigIntegerNode" + "" : "tools.jackson.databind.node.BigIntegerNode" }, "keyOrder" : { } }, @@ -141,7 +141,7 @@ "decimal" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.FloatNode" + "" : "tools.jackson.databind.node.FloatNode" }, "keyOrder" : { } }, @@ -150,7 +150,7 @@ "decimalPastFloat" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.DoubleNode" + "" : "tools.jackson.databind.node.DoubleNode" }, "keyOrder" : { } }, @@ -159,7 +159,7 @@ "longDecimal" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.FloatNode" + "" : "tools.jackson.databind.node.FloatNode" }, "keyOrder" : { } }, @@ -168,7 +168,7 @@ "exponent" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.FloatNode" + "" : "tools.jackson.databind.node.FloatNode" }, "keyOrder" : { } }, @@ -177,7 +177,7 @@ "true" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.BooleanNode" + "" : "tools.jackson.databind.node.BooleanNode" }, "keyOrder" : { } }, @@ -186,7 +186,7 @@ "null" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.NullNode" + "" : "tools.jackson.databind.node.NullNode" }, "keyOrder" : { } }, @@ -195,7 +195,7 @@ "quoted" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.TextNode" + "" : "tools.jackson.databind.node.StringNode" }, "keyOrder" : { } }, @@ -204,7 +204,7 @@ "text" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.TextNode" + "" : "tools.jackson.databind.node.StringNode" }, "keyOrder" : { } }, @@ -213,7 +213,7 @@ "dateTime" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.TextNode" + "" : "tools.jackson.databind.node.StringNode" }, "keyOrder" : { } }, @@ -225,18 +225,18 @@ "array" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/0" : "com.fasterxml.jackson.databind.node.IntNode", - "/1" : "com.fasterxml.jackson.databind.node.IntNode", - "/2" : "com.fasterxml.jackson.databind.node.TextNode", - "/3" : "com.fasterxml.jackson.databind.node.FloatNode", - "/4" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/4/zeta" : "com.fasterxml.jackson.databind.node.IntNode", - "/4/alpha" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/4/alpha/0" : "com.fasterxml.jackson.databind.node.LongNode", - "/4/alpha/1" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/4/alpha/2" : "com.fasterxml.jackson.databind.node.NullNode", - "/4/alpha/3" : "com.fasterxml.jackson.databind.node.DecimalNode" + "" : "tools.jackson.databind.node.ArrayNode", + "/0" : "tools.jackson.databind.node.IntNode", + "/1" : "tools.jackson.databind.node.IntNode", + "/2" : "tools.jackson.databind.node.StringNode", + "/3" : "tools.jackson.databind.node.FloatNode", + "/4" : "tools.jackson.databind.node.ObjectNode", + "/4/zeta" : "tools.jackson.databind.node.IntNode", + "/4/alpha" : "tools.jackson.databind.node.ArrayNode", + "/4/alpha/0" : "tools.jackson.databind.node.LongNode", + "/4/alpha/1" : "tools.jackson.databind.node.DoubleNode", + "/4/alpha/2" : "tools.jackson.databind.node.NullNode", + "/4/alpha/3" : "tools.jackson.databind.node.DecimalNode" }, "keyOrder" : { "/4" : [ "zeta", "alpha" ] @@ -247,16 +247,16 @@ "object" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/a" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/a/zeta" : "com.fasterxml.jackson.databind.node.IntNode", - "/a/alpha" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/a/alpha/0" : "com.fasterxml.jackson.databind.node.LongNode", - "/a/alpha/1" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/a/alpha/2" : "com.fasterxml.jackson.databind.node.NullNode", - "/a/alpha/3" : "com.fasterxml.jackson.databind.node.DecimalNode", - "/b" : "com.fasterxml.jackson.databind.node.FloatNode", - "/žluť \"quoted\"" : "com.fasterxml.jackson.databind.node.LongNode" + "" : "tools.jackson.databind.node.ObjectNode", + "/a" : "tools.jackson.databind.node.ObjectNode", + "/a/zeta" : "tools.jackson.databind.node.IntNode", + "/a/alpha" : "tools.jackson.databind.node.ArrayNode", + "/a/alpha/0" : "tools.jackson.databind.node.LongNode", + "/a/alpha/1" : "tools.jackson.databind.node.DoubleNode", + "/a/alpha/2" : "tools.jackson.databind.node.NullNode", + "/a/alpha/3" : "tools.jackson.databind.node.DecimalNode", + "/b" : "tools.jackson.databind.node.FloatNode", + "/žluť \"quoted\"" : "tools.jackson.databind.node.LongNode" }, "keyOrder" : { "/a" : [ "zeta", "alpha" ], @@ -268,7 +268,7 @@ "escapedMustache" : { "node" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.TextNode" + "" : "tools.jackson.databind.node.StringNode" }, "keyOrder" : { } }, diff --git a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/polymorphism/AuthConfig.json b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/polymorphism/AuthConfig.json index 2fd34b3be..898d0f3a9 100644 --- a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/polymorphism/AuthConfig.json +++ b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/polymorphism/AuthConfig.json @@ -1 +1 @@ -{"BASIC_AUTH":{"bareMapperClass":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","class":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","noView":{"type":"DIGEST_AUTH","type":"BASIC_AUTH","username":"AuthConfig.BASIC_AUTH.username","password":"SECRET-AuthConfig.BASIC_AUTH.password"},"readBack":{"class":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","noView":{"type":"DIGEST_AUTH","type":"BASIC_AUTH","username":"AuthConfig.BASIC_AUTH.username","password":"SECRET-AuthConfig.BASIC_AUTH.password"}},"Public":{"type":"DIGEST_AUTH","type":"BASIC_AUTH","username":"AuthConfig.BASIC_AUTH.username"},"Internal":{"type":"DIGEST_AUTH","type":"BASIC_AUTH","username":"AuthConfig.BASIC_AUTH.username","password":"SECRET-AuthConfig.BASIC_AUTH.password"}},"DIGEST_AUTH":{"bareMapperClass":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","class":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","noView":{"type":"DIGEST_AUTH","type":"DIGEST_AUTH","username":"AuthConfig.DIGEST_AUTH.username","password":"SECRET-AuthConfig.DIGEST_AUTH.password"},"readBack":{"class":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","noView":{"type":"DIGEST_AUTH","type":"DIGEST_AUTH","username":"AuthConfig.DIGEST_AUTH.username","password":"SECRET-AuthConfig.DIGEST_AUTH.password"}},"Public":{"type":"DIGEST_AUTH","type":"DIGEST_AUTH","username":"AuthConfig.DIGEST_AUTH.username"},"Internal":{"type":"DIGEST_AUTH","type":"DIGEST_AUTH","username":"AuthConfig.DIGEST_AUTH.username","password":"SECRET-AuthConfig.DIGEST_AUTH.password"}},"NO_AUTH":{"bareMapperClass":"org.lowcoder.sdk.plugin.restapi.auth.NoneAuthConfig","class":"org.lowcoder.sdk.plugin.restapi.auth.NoneAuthConfig","noView":{"type":"NO_AUTH","type":"NO_AUTH"},"readBack":{"class":"org.lowcoder.sdk.plugin.restapi.auth.NoneAuthConfig","noView":{"type":"NO_AUTH","type":"NO_AUTH"}},"Public":{"type":"NO_AUTH","type":"NO_AUTH"},"Internal":{"type":"NO_AUTH","type":"NO_AUTH"}},"OAUTH2_INHERIT_FROM_LOGIN":{"bareMapperClass":"org.lowcoder.sdk.plugin.restapi.auth.OAuthInheritAuthConfig","class":"org.lowcoder.sdk.plugin.restapi.auth.OAuthInheritAuthConfig","noView":{"type":"OAUTH2_INHERIT_FROM_LOGIN","type":"OAUTH2_INHERIT_FROM_LOGIN","authId":"AuthConfig.OAUTH2_INHERIT_FROM_LOGIN.authId"},"readBack":{"class":"org.lowcoder.sdk.plugin.restapi.auth.OAuthInheritAuthConfig","noView":{"type":"OAUTH2_INHERIT_FROM_LOGIN","type":"OAUTH2_INHERIT_FROM_LOGIN","authId":"AuthConfig.OAUTH2_INHERIT_FROM_LOGIN.authId"}},"Public":{"type":"OAUTH2_INHERIT_FROM_LOGIN","type":"OAUTH2_INHERIT_FROM_LOGIN","authId":"AuthConfig.OAUTH2_INHERIT_FROM_LOGIN.authId"},"Internal":{"type":"OAUTH2_INHERIT_FROM_LOGIN","type":"OAUTH2_INHERIT_FROM_LOGIN","authId":"AuthConfig.OAUTH2_INHERIT_FROM_LOGIN.authId"}},"unregisteredConstant":{"bareMapperClass":"failsWith com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException","class":"org.lowcoder.sdk.plugin.restapi.auth.DefaultAuthConfig","noView":{"type":"DefaultAuthConfig","type":"BEARER_TOKEN_AUTH"},"readBack":"failsWith com.fasterxml.jackson.databind.exc.InvalidFormatException","Public":{"type":"DefaultAuthConfig","type":"BEARER_TOKEN_AUTH"},"Internal":{"type":"DefaultAuthConfig","type":"BEARER_TOKEN_AUTH"}},"unknownId":{"bareMapperClass":"failsWith com.fasterxml.jackson.databind.exc.InvalidFormatException","class":"failsWith com.fasterxml.jackson.databind.exc.InvalidFormatException"},"missingId":{"bareMapperClass":"failsWith com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException","class":"org.lowcoder.sdk.plugin.restapi.auth.DefaultAuthConfig","noView":{"type":"DefaultAuthConfig","type":null},"readBack":"failsWith com.fasterxml.jackson.databind.exc.InvalidFormatException","Public":{"type":"DefaultAuthConfig","type":null},"Internal":{"type":"DefaultAuthConfig","type":null}}} \ No newline at end of file +{"BASIC_AUTH":{"bareMapperClass":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","class":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","noView":{"type":"DIGEST_AUTH","type":"BASIC_AUTH","username":"AuthConfig.BASIC_AUTH.username","password":"SECRET-AuthConfig.BASIC_AUTH.password"},"readBack":{"class":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","noView":{"type":"DIGEST_AUTH","type":"BASIC_AUTH","username":"AuthConfig.BASIC_AUTH.username","password":"SECRET-AuthConfig.BASIC_AUTH.password"}},"Public":{"type":"DIGEST_AUTH","type":"BASIC_AUTH","username":"AuthConfig.BASIC_AUTH.username"},"Internal":{"type":"DIGEST_AUTH","type":"BASIC_AUTH","username":"AuthConfig.BASIC_AUTH.username","password":"SECRET-AuthConfig.BASIC_AUTH.password"}},"DIGEST_AUTH":{"bareMapperClass":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","class":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","noView":{"type":"DIGEST_AUTH","type":"DIGEST_AUTH","username":"AuthConfig.DIGEST_AUTH.username","password":"SECRET-AuthConfig.DIGEST_AUTH.password"},"readBack":{"class":"org.lowcoder.sdk.plugin.restapi.auth.BasicAuthConfig","noView":{"type":"DIGEST_AUTH","type":"DIGEST_AUTH","username":"AuthConfig.DIGEST_AUTH.username","password":"SECRET-AuthConfig.DIGEST_AUTH.password"}},"Public":{"type":"DIGEST_AUTH","type":"DIGEST_AUTH","username":"AuthConfig.DIGEST_AUTH.username"},"Internal":{"type":"DIGEST_AUTH","type":"DIGEST_AUTH","username":"AuthConfig.DIGEST_AUTH.username","password":"SECRET-AuthConfig.DIGEST_AUTH.password"}},"NO_AUTH":{"bareMapperClass":"org.lowcoder.sdk.plugin.restapi.auth.NoneAuthConfig","class":"org.lowcoder.sdk.plugin.restapi.auth.NoneAuthConfig","noView":{"type":"NO_AUTH","type":"NO_AUTH"},"readBack":{"class":"org.lowcoder.sdk.plugin.restapi.auth.NoneAuthConfig","noView":{"type":"NO_AUTH","type":"NO_AUTH"}},"Public":{"type":"NO_AUTH","type":"NO_AUTH"},"Internal":{"type":"NO_AUTH","type":"NO_AUTH"}},"OAUTH2_INHERIT_FROM_LOGIN":{"bareMapperClass":"org.lowcoder.sdk.plugin.restapi.auth.OAuthInheritAuthConfig","class":"org.lowcoder.sdk.plugin.restapi.auth.OAuthInheritAuthConfig","noView":{"type":"OAUTH2_INHERIT_FROM_LOGIN","type":"OAUTH2_INHERIT_FROM_LOGIN","authId":"AuthConfig.OAUTH2_INHERIT_FROM_LOGIN.authId"},"readBack":{"class":"org.lowcoder.sdk.plugin.restapi.auth.OAuthInheritAuthConfig","noView":{"type":"OAUTH2_INHERIT_FROM_LOGIN","type":"OAUTH2_INHERIT_FROM_LOGIN","authId":"AuthConfig.OAUTH2_INHERIT_FROM_LOGIN.authId"}},"Public":{"type":"OAUTH2_INHERIT_FROM_LOGIN","type":"OAUTH2_INHERIT_FROM_LOGIN","authId":"AuthConfig.OAUTH2_INHERIT_FROM_LOGIN.authId"},"Internal":{"type":"OAUTH2_INHERIT_FROM_LOGIN","type":"OAUTH2_INHERIT_FROM_LOGIN","authId":"AuthConfig.OAUTH2_INHERIT_FROM_LOGIN.authId"}},"unregisteredConstant":{"bareMapperClass":"failsWith tools.jackson.databind.exc.UnrecognizedPropertyException","class":"org.lowcoder.sdk.plugin.restapi.auth.DefaultAuthConfig","noView":{"type":"DefaultAuthConfig","type":"BEARER_TOKEN_AUTH"},"readBack":"failsWith tools.jackson.databind.exc.InvalidFormatException","Public":{"type":"DefaultAuthConfig","type":"BEARER_TOKEN_AUTH"},"Internal":{"type":"DefaultAuthConfig","type":"BEARER_TOKEN_AUTH"}},"unknownId":{"bareMapperClass":"failsWith tools.jackson.databind.exc.InvalidFormatException","class":"failsWith tools.jackson.databind.exc.InvalidFormatException"},"missingId":{"bareMapperClass":"failsWith tools.jackson.databind.exc.UnrecognizedPropertyException","class":"org.lowcoder.sdk.plugin.restapi.auth.DefaultAuthConfig","noView":{"type":"DefaultAuthConfig","type":null},"readBack":"failsWith tools.jackson.databind.exc.InvalidFormatException","Public":{"type":"DefaultAuthConfig","type":null},"Internal":{"type":"DefaultAuthConfig","type":null}}} \ No newline at end of file diff --git a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/polymorphism/SslConfig.json b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/polymorphism/SslConfig.json index 16e1e09e7..b1b1df3ce 100644 --- a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/polymorphism/SslConfig.json +++ b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/polymorphism/SslConfig.json @@ -1 +1 @@ -{"DISABLED":{"bareMapperClass":"org.lowcoder.sdk.plugin.common.ssl.DisableVerifySslConfig","class":"org.lowcoder.sdk.plugin.common.ssl.DisableVerifySslConfig","noView":{"sslCertVerificationType":"DISABLED","sslCertVerificationType":"DISABLED"},"readBack":{"class":"org.lowcoder.sdk.plugin.common.ssl.DisableVerifySslConfig","noView":{"sslCertVerificationType":"DISABLED","sslCertVerificationType":"DISABLED"}},"Public":{"sslCertVerificationType":"DISABLED","sslCertVerificationType":"DISABLED"},"Internal":{"sslCertVerificationType":"DISABLED","sslCertVerificationType":"DISABLED"}},"VERIFY_SELF_SIGNED_CERT":{"bareMapperClass":"org.lowcoder.sdk.plugin.common.ssl.VerifySelfSignedCertSslConfig","class":"org.lowcoder.sdk.plugin.common.ssl.VerifySelfSignedCertSslConfig","noView":{"sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","selfSignedCert":"SECRET-SslConfig.VERIFY_SELF_SIGNED_CERT.selfSignedCert"},"readBack":{"class":"org.lowcoder.sdk.plugin.common.ssl.VerifySelfSignedCertSslConfig","noView":{"sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","selfSignedCert":"SECRET-SslConfig.VERIFY_SELF_SIGNED_CERT.selfSignedCert"}},"Public":{"sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT"},"Internal":{"sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","selfSignedCert":"SECRET-SslConfig.VERIFY_SELF_SIGNED_CERT.selfSignedCert"}},"unregisteredConstant":{"bareMapperClass":"org.lowcoder.sdk.plugin.common.ssl.VerifyCACertSslConfig","class":"org.lowcoder.sdk.plugin.common.ssl.VerifyCACertSslConfig","noView":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":"VERIFY_CA_CERT"},"readBack":"failsWith com.fasterxml.jackson.databind.exc.InvalidFormatException","Public":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":"VERIFY_CA_CERT"},"Internal":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":"VERIFY_CA_CERT"}},"unknownId":{"bareMapperClass":"failsWith com.fasterxml.jackson.databind.exc.InvalidFormatException","class":"failsWith com.fasterxml.jackson.databind.exc.InvalidFormatException"},"missingId":{"bareMapperClass":"failsWith com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException","class":"org.lowcoder.sdk.plugin.common.ssl.VerifyCACertSslConfig","noView":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":null},"readBack":"failsWith com.fasterxml.jackson.databind.exc.InvalidFormatException","Public":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":null},"Internal":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":null}}} \ No newline at end of file +{"DISABLED":{"bareMapperClass":"org.lowcoder.sdk.plugin.common.ssl.DisableVerifySslConfig","class":"org.lowcoder.sdk.plugin.common.ssl.DisableVerifySslConfig","noView":{"sslCertVerificationType":"DISABLED","sslCertVerificationType":"DISABLED"},"readBack":{"class":"org.lowcoder.sdk.plugin.common.ssl.DisableVerifySslConfig","noView":{"sslCertVerificationType":"DISABLED","sslCertVerificationType":"DISABLED"}},"Public":{"sslCertVerificationType":"DISABLED","sslCertVerificationType":"DISABLED"},"Internal":{"sslCertVerificationType":"DISABLED","sslCertVerificationType":"DISABLED"}},"VERIFY_SELF_SIGNED_CERT":{"bareMapperClass":"org.lowcoder.sdk.plugin.common.ssl.VerifySelfSignedCertSslConfig","class":"org.lowcoder.sdk.plugin.common.ssl.VerifySelfSignedCertSslConfig","noView":{"sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","selfSignedCert":"SECRET-SslConfig.VERIFY_SELF_SIGNED_CERT.selfSignedCert"},"readBack":{"class":"org.lowcoder.sdk.plugin.common.ssl.VerifySelfSignedCertSslConfig","noView":{"sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","selfSignedCert":"SECRET-SslConfig.VERIFY_SELF_SIGNED_CERT.selfSignedCert"}},"Public":{"sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT"},"Internal":{"sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","sslCertVerificationType":"VERIFY_SELF_SIGNED_CERT","selfSignedCert":"SECRET-SslConfig.VERIFY_SELF_SIGNED_CERT.selfSignedCert"}},"unregisteredConstant":{"bareMapperClass":"org.lowcoder.sdk.plugin.common.ssl.VerifyCACertSslConfig","class":"org.lowcoder.sdk.plugin.common.ssl.VerifyCACertSslConfig","noView":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":"VERIFY_CA_CERT"},"readBack":"failsWith tools.jackson.databind.exc.InvalidFormatException","Public":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":"VERIFY_CA_CERT"},"Internal":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":"VERIFY_CA_CERT"}},"unknownId":{"bareMapperClass":"failsWith tools.jackson.databind.exc.InvalidFormatException","class":"failsWith tools.jackson.databind.exc.InvalidFormatException"},"missingId":{"bareMapperClass":"failsWith tools.jackson.databind.exc.UnrecognizedPropertyException","class":"org.lowcoder.sdk.plugin.common.ssl.VerifyCACertSslConfig","noView":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":null},"readBack":"failsWith tools.jackson.databind.exc.InvalidFormatException","Public":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":null},"Internal":{"sslCertVerificationType":"VerifyCACertSslConfig","sslCertVerificationType":null}}} \ No newline at end of file diff --git a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/query-results/ResultSetParser.leaves.json b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/query-results/ResultSetParser.leaves.json index 6cd1e394f..66080d92d 100644 --- a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/query-results/ResultSetParser.leaves.json +++ b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/query-results/ResultSetParser.leaves.json @@ -64,14 +64,14 @@ "typeName" : "OTHER", "class" : "javax.sql.rowset.serial.SerialClob", "written" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: Unsupported operation. SerialClob cannot return a the CLOB value as an ascii stream, unless instantiated with a fully implemented Clob object. (through reference chain: javax.sql.rowset.serial.SerialClob[\"asciiStream\"])" + "error" : "tools.jackson.databind.DatabindException: Unsupported operation. SerialClob cannot return a the CLOB value as an ascii stream, unless instantiated with a fully implemented Clob object.\n at [No location information] (through reference chain: javax.sql.rowset.serial.SerialClob[\"asciiStream\"])" } }, "nclob" : { "typeName" : "OTHER", "class" : "org.lowcoder.sdk.plugin.common.sql.ResultSetParserContractTest$TestNClob", "written" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: Unsupported operation. SerialClob cannot return a the CLOB value as an ascii stream, unless instantiated with a fully implemented Clob object. (through reference chain: org.lowcoder.sdk.plugin.common.sql.ResultSetParserContractTest$TestNClob[\"asciiStream\"])" + "error" : "tools.jackson.databind.DatabindException: Unsupported operation. SerialClob cannot return a the CLOB value as an ascii stream, unless instantiated with a fully implemented Clob object.\n at [No location information] (through reference chain: org.lowcoder.sdk.plugin.common.sql.ResultSetParserContractTest$TestNClob[\"asciiStream\"])" } }, "blobLeaf" : { @@ -83,7 +83,7 @@ "typeName" : "OTHER", "class" : "javax.sql.rowset.serial.SerialArray", "written" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: (was javax.sql.rowset.serial.SerialException) (through reference chain: javax.sql.rowset.serial.SerialArray[\"resultSet\"])" + "error" : "tools.jackson.databind.DatabindException: (was javax.sql.rowset.serial.SerialException)\n at [No location information] (through reference chain: javax.sql.rowset.serial.SerialArray[\"resultSet\"])" } }, "struct" : { @@ -187,7 +187,7 @@ } }, "written" : { - "error" : "com.fasterxml.jackson.databind.JsonMappingException: Unsupported operation. SerialClob cannot return a the CLOB value as an ascii stream, unless instantiated with a fully implemented Clob object. (through reference chain: org.lowcoder.sdk.models.QueryExecutionResult[\"data\"]->java.util.ArrayList[0]->java.util.LinkedHashMap[\"clob\"]->javax.sql.rowset.serial.SerialClob[\"asciiStream\"])" + "error" : "tools.jackson.databind.DatabindException: Unsupported operation. SerialClob cannot return a the CLOB value as an ascii stream, unless instantiated with a fully implemented Clob object.\n at [No location information] (through reference chain: org.lowcoder.sdk.models.QueryExecutionResult[\"data\"]->java.util.ArrayList[0]->java.util.LinkedHashMap[\"clob\"]->javax.sql.rowset.serial.SerialClob[\"asciiStream\"])" } } } \ No newline at end of file diff --git a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/tree-text/E13.txt b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/tree-text/E13.txt index 874fa30f2..e913d26f7 100644 --- a/server/api-service/lowcoder-sdk/src/test/resources/json-contract/tree-text/E13.txt +++ b/server/api-service/lowcoder-sdk/src/test/resources/json-contract/tree-text/E13.txt @@ -1,2 +1,2 @@ production {"decimal":1.10,"instant":0.0} -toString {"decimal":1.10,"instant":"[ERROR: (com.fasterxml.jackson.databind.exc.InvalidDefinitionException) Java 8 date/time type `java.time.Instant` not supported by default: add Module \"com.fasterxml.jackson.datatype:jackson-datatype-jsr310\" to enable handling (or disable `MapperFeature.REQUIRE_HANDLERS_FOR_JAVA8_TIMES`)]"} +toString {"decimal":1.10,"instant":"1970-01-01T00:00:00Z"} diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java index 3bf8e65d8..77baa2f05 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java @@ -1,7 +1,9 @@ package org.lowcoder.api.application.marketplace; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.SerializationFeature; +import tools.jackson.databind.json.JsonMapper; + import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.time.Instant; @@ -31,7 +33,9 @@ public class MarketplacePreviewWorker { // Bump when the renderer/components change. No time-based expiration of successful images. static final String RENDER_VERSION = "layout-v3-1280x800"; - private static final ObjectMapper JSON = new ObjectMapper().enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); + private static final ObjectMapper JSON = JsonMapper.builderWithJackson2Defaults() + .enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS) + .build(); private final ApplicationService applications; private final ApplicationRecordService versions; private final OrganizationService organizations; diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java index 08f70cfb5..dd18597fc 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java @@ -9,7 +9,7 @@ import lombok.RequiredArgsConstructor; import org.lowcoder.infra.js.NodeServerHelper; import org.lowcoder.sdk.config.CommonConfig; -import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; +import org.lowcoder.sdk.webclient.JacksonClientCodecs; import org.springframework.stereotype.Component; import org.springframework.web.reactive.function.client.ExchangeStrategies; import org.springframework.web.reactive.function.client.WebClient; @@ -22,7 +22,7 @@ public class MarketplaceRenderClient { private final NodeServerHelper nodeServer; private static final ExchangeStrategies EXCHANGE_STRATEGIES = ExchangeStrategies.builder() .codecs(codecs -> { - Jackson2ClientCodecs.apply(codecs); + JacksonClientCodecs.apply(codecs); codecs.defaultCodecs().maxInMemorySize(2 * 1024 * 1024); }) .build(); diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java index d20e8a9a9..0a0b87caf 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java @@ -1,12 +1,14 @@ package org.lowcoder.api.authentication.util; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; + import java.util.Base64; import java.util.Map; public class JwtDecoderUtil { - private static final ObjectMapper objectMapper = new ObjectMapper(); + private static final ObjectMapper objectMapper = JsonMapper.builderWithJackson2Defaults().build(); /** * Decodes the payload of a JWT without verifying its signature. diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java index 3a3b353b8..c0ba7bd1d 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java @@ -1,6 +1,6 @@ package org.lowcoder.api.framework.configuration; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.lowcoder.api.framework.plugin.endpoint.ReloadableRouterFunctionMapping; @@ -11,8 +11,8 @@ import org.springframework.context.i18n.LocaleContext; import org.springframework.context.i18n.SimpleLocaleContext; import org.springframework.http.codec.ServerCodecConfigurer; -import org.springframework.http.codec.json.Jackson2JsonDecoder; -import org.springframework.http.codec.json.Jackson2JsonEncoder; +import org.springframework.http.codec.json.JacksonJsonDecoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; import org.springframework.util.unit.DataSize; import org.springframework.web.reactive.config.DelegatingWebFluxConfiguration; import org.springframework.web.reactive.function.server.support.RouterFunctionMapping; @@ -30,7 +30,7 @@ public class CustomWebFluxConfiguration extends DelegatingWebFluxConfiguration private String codecMaxInMemorySize = "20MB"; @Bean - public ObjectMapper objectMapper() { + public JsonMapper objectMapper() { return JsonUtils.getObjectMapper(); } @@ -46,9 +46,9 @@ protected void configureHttpMessageCodecs(ServerCodecConfigurer configurer) { configurer.defaultCodecs() .maxInMemorySize((int)DataSize.parse(codecMaxInMemorySize).toBytes()); configurer.defaultCodecs() - .jackson2JsonDecoder(new Jackson2JsonDecoder(objectMapper())); + .jacksonJsonDecoder(new JacksonJsonDecoder(objectMapper())); configurer.defaultCodecs() - .jackson2JsonEncoder(new Jackson2JsonEncoder(objectMapper())); + .jacksonJsonEncoder(new JacksonJsonEncoder(objectMapper())); } @Bean diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/view/ResponseView.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/view/ResponseView.java index acca0e7f1..5ae3c8201 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/view/ResponseView.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/view/ResponseView.java @@ -1,7 +1,7 @@ package org.lowcoder.api.framework.view; import org.lowcoder.sdk.exception.BizError; - +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Getter; @@ -15,6 +15,7 @@ public class ResponseView { private final String message; private final T data; + @JsonCreator protected ResponseView(int code, String message, T data) { this.code = code; this.message = message; diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java index b3c28c08f..79df691ea 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java @@ -1,6 +1,7 @@ package org.lowcoder.api.misc; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import lombok.RequiredArgsConstructor; import org.apache.commons.lang.StringUtils; import org.lowcoder.api.authentication.request.AuthException; @@ -79,7 +80,7 @@ public Mono flow(FlowRequest flowRequest) { } try { String url = "https://flow.lowcoder.cloud/" + flowRequest.path(); - ObjectMapper objectMapper = new ObjectMapper(); + ObjectMapper objectMapper = JsonMapper.builderWithJackson2Defaults().build(); String jsonBody = objectMapper.writeValueAsString(flowRequest.data()); return WebClientBuildHelper.builder() .systemProxy() diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java index 5baa62374..64849b595 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java @@ -24,15 +24,15 @@ import org.lowcoder.infra.constant.NewUrl; import org.lowcoder.infra.localcache.ReloadableCache; import org.lowcoder.sdk.util.JsonUtils; -import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; import org.lowcoder.sdk.webclient.WebClientBuildHelper; +import org.lowcoder.sdk.webclient.JacksonClientCodecs; import org.springframework.core.ParameterizedTypeReference; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.function.client.ExchangeStrategies; -import com.fasterxml.jackson.core.type.TypeReference; +import tools.jackson.core.type.TypeReference; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; @@ -63,7 +63,7 @@ public Mono load(@NotNull String key) { private static final ExchangeStrategies EXCHANGE_STRATEGY = ExchangeStrategies .builder() .codecs(configure -> { - Jackson2ClientCodecs.apply(configure); + JacksonClientCodecs.apply(configure); configure.defaultCodecs().maxInMemorySize(-1); }) .build(); diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java index 732a7adea..be9ffeb5f 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java @@ -6,7 +6,7 @@ import org.lowcoder.sdk.models.QueryExecutionResult; import org.lowcoder.sdk.util.LocaleUtils; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; public class QueryResultView { diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java index f61320021..b563194b6 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java @@ -1,7 +1,7 @@ package org.lowcoder.api.subscription; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.JsonNodeFactory; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.JsonNodeFactory; import org.lowcoder.domain.enterprise.EnterpriseLicenseCapabilityService; import org.lowcoder.domain.enterprise.EnterpriseLicenseCapabilityService.PurchaseState; import org.lowcoder.api.home.SessionUserService; @@ -51,14 +51,14 @@ public Mono> request(@PathVariable String action, @Reques .switchIfEmpty(Mono.error(new ResponseStatusException(HttpStatus.UNAUTHORIZED))) .flatMap(member -> { if (member.isInvalid() || !(member.isAdmin() || member.isSuperAdmin()) || - !member.getOrgId().equals(body.path("orgId").asText())) { + !member.getOrgId().equals(body.path("orgId").asString())) { return Mono.error(new ResponseStatusException(HttpStatus.FORBIDDEN)); } // The configured UI URL remains authoritative even behind an internal proxy // or when a caller forges returnOrigin. Spring resolves forwarded request hosts. if (action.equals("checkout") && (isPublicCloudUrl(publicUrl) || isPublicCloudUrl(request.getURI().toString()) || - isPublicCloudUrl(body.path("returnOrigin").asText()))) { + isPublicCloudUrl(body.path("returnOrigin").asString()))) { return Mono.error(new ResponseStatusException(HttpStatus.FORBIDDEN, "Enterprise Edition is self-hosted. Purchase a license from your own Lowcoder installation.")); } @@ -78,7 +78,7 @@ public Mono> request(@PathVariable String action, @Reques if (action.equals("checkout")) { JsonNode deployments = body.path("deploymentIds"); if (!deployments.isArray() || deployments.size() < 1 || deployments.size() > 3 || - !hostId.equals(deployments.path(0).asText())) { + !hostId.equals(deployments.path(0).asString())) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "First instance must be this deployment"); } for (String field : List.of("requestId", "billingInterval", "contactData", "deploymentIds")) { @@ -86,10 +86,10 @@ public Mono> request(@PathVariable String action, @Reques payload.put(field, body.get(field)); } } - if (action.equals("download")) payload.put("licenseId", body.path("licenseId").asText()); - if (action.equals("portal")) payload.put("requestId", body.path("requestId").asText()); + if (action.equals("download")) payload.put("licenseId", body.path("licenseId").asString()); + if (action.equals("portal")) payload.put("requestId", body.path("requestId").asString()); if (action.equals("checkout") || action.equals("portal")) { - String origin = publicUrl.isBlank() ? body.path("returnOrigin").asText() : publicUrl; + String origin = publicUrl.isBlank() ? body.path("returnOrigin").asString() : publicUrl; URI base; try { base = URI.create(origin); } catch (IllegalArgumentException error) { @@ -157,7 +157,7 @@ private Mono relay(Map payload, String token) { return result.path("orders").isArray() && result.path("licenses").isArray(); } if (action.equals("checkout")) { - return !result.path("checkoutUrl").asText().isBlank() && + return !result.path("checkoutUrl").asString().isBlank() && result.path("requestId").equals(payload.get("requestId")); } return true; diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java index 4d3b01d09..8b7f6795a 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java @@ -1,6 +1,6 @@ package org.lowcoder.api.subscription; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.lowcoder.api.home.SessionUserService; import org.lowcoder.sdk.config.dynamic.ConfigCenter; import org.lowcoder.sdk.webclient.WebClientBuildHelper; @@ -63,7 +63,7 @@ public Mono synchronize(String expectedOrgId) { "requestId", requestId, "issuedAt", System.currentTimeMillis())) .flatMap(response -> { if (!response.path("success").asBoolean(false) || - !requestId.equals(response.path("requestId").asText()) || + !requestId.equals(response.path("requestId").asString()) || response.path("quantity").asInt(-1) != quantity) { return Mono.error(new IllegalStateException("Seat relay did not confirm the requested quantity")); } diff --git a/server/api-service/lowcoder-server/src/main/resources/application.yaml b/server/api-service/lowcoder-server/src/main/resources/application.yaml index 77a0a32b7..ca9346dc5 100644 --- a/server/api-service/lowcoder-server/src/main/resources/application.yaml +++ b/server/api-service/lowcoder-server/src/main/resources/application.yaml @@ -25,7 +25,6 @@ spring: http: codecs: max-in-memory-size: 20MB - preferred-json-mapper: jackson2 webflux: base-path: / mail: diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorkerTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorkerTest.java index 9f81b8a60..0d68047a5 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorkerTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorkerTest.java @@ -13,9 +13,11 @@ import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.when; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.exc.InvalidDefinitionException; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.exc.InvalidDefinitionException; +import tools.jackson.databind.json.JsonMapper; + import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -89,7 +91,7 @@ class MarketplacePreviewWorkerTest { private static final Map APP_DSL = Map.of("ui", Map.of("title", APP_NAME), QUERIES_KEY, List.of("secret")); private static final Map MODULE_DSL = Map.of("ui", Map.of("title", MODULE_ID), QUERIES_KEY, List.of("secret")); private static final Map RECYCLED_MODULE_DSL = Map.of("ui", Map.of("title", RECYCLED_MODULE_ID)); - private static final ObjectMapper JSON = new ObjectMapper(); + private static final ObjectMapper JSON = JsonMapper.builderWithJackson2Defaults().build(); private final ApplicationService apps = mock(ApplicationService.class); private final ApplicationRecordService versions = mock(ApplicationRecordService.class); @@ -294,8 +296,8 @@ void snapshotCarriesNormalModulesAndTheDefaultTheme() throws Exception { JsonNode snapshot = JSON.readTree(json); assertThat(fieldNames(snapshot.get(MODULE_DSL_KEY))).containsExactly(MODULE_ID); assertThat(snapshot.get(MODULE_DSL_KEY).get(MODULE_ID).get(QUERIES_KEY).isEmpty()).isTrue(); - assertThat(snapshot.get(ORG_SETTINGS_KEY).get(DEFAULT_THEME_KEY).asText()).isEqualTo(DEFAULT_THEME); - assertThat(snapshot.get(ORG_SETTINGS_KEY).get(THEME_LIST_KEY).get(0).asText()).isEqualTo(DEFAULT_THEME); + assertThat(snapshot.get(ORG_SETTINGS_KEY).get(DEFAULT_THEME_KEY).asString()).isEqualTo(DEFAULT_THEME); + assertThat(snapshot.get(ORG_SETTINGS_KEY).get(THEME_LIST_KEY).get(0).asString()).isEqualTo(DEFAULT_THEME); verify(versions, never()).getLatestRecordByApplicationId(RECYCLED_MODULE_ID); } @@ -348,7 +350,7 @@ private static MarketplacePreview job(String desiredHash) { private static List fieldNames(JsonNode node) { List names = new ArrayList<>(); - node.fieldNames().forEachRemaining(names::add); + node.propertyNames().iterator().forEachRemaining(names::add); return names; } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplaceRenderContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplaceRenderContractTest.java index 608f306d3..f84e63fd1 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplaceRenderContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/application/marketplace/MarketplaceRenderContractTest.java @@ -1,8 +1,7 @@ package org.lowcoder.api.application.marketplace; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.ObjectNode; import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; import com.github.tomakehurst.wiremock.junit5.WireMockTest; import com.github.tomakehurst.wiremock.verification.LoggedRequest; @@ -133,11 +132,11 @@ void harness(WireMockRuntimeInfo wireMock) { * text ({@code :116-117}); both pinned as strings, so a change of order changes the comparison. */ @BoundarySites({ - "lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java#MarketplacePreviewWorker.JSON#new ObjectMapper#1", + "lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java#MarketplacePreviewWorker.JSON#JsonMapper.builder#1", "lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java#MarketplacePreviewWorker.snapshotOf#writeValueAsString#1", "lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java##import#1"}) @Test - void snapshotWrittenWithSortedKeys() throws JsonProcessingException { + void snapshotWrittenWithSortedKeys() { Map modules = new LinkedHashMap<>(); modules.put(MODULE_ID, Map.of(LAYOUT_MEMBER, LAYOUT)); Map settings = new LinkedHashMap<>(); @@ -152,7 +151,7 @@ void snapshotWrittenWithSortedKeys() throws JsonProcessingException { ObjectNode pinned = PayloadAssertions.FIXTURE_EDITOR.createObjectNode().put(HASH_MEMBER, snapshot.hash()).put(TEXT_MEMBER, snapshot.json()); GOLDEN.assertJson(SNAPSHOT, PayloadAssertions.FIXTURE_EDITOR.writeValueAsString(pinned)); List topLevel = new ArrayList<>(); - PayloadAssertions.FIXTURE_EDITOR.readTree(snapshot.json()).fieldNames().forEachRemaining(topLevel::add); + PayloadAssertions.FIXTURE_EDITOR.readTree(snapshot.json()).propertyNames().iterator().forEachRemaining(topLevel::add); assertThat(topLevel).as("top-level keys of the snapshot").isSorted(); } @@ -164,7 +163,7 @@ void snapshotWrittenWithSortedKeys() throws JsonProcessingException { */ @BoundarySites("lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.render#bodyValue#1") @Test - void renderRequestBody() throws JsonProcessingException, GeneralSecurityException { + void renderRequestBody() throws GeneralSecurityException { rendererAnswers(JPEG); long before = System.currentTimeMillis(); byte[] rendered = client.render(PAYLOAD).block(TIMEOUT); @@ -172,14 +171,14 @@ void renderRequestBody() throws JsonProcessingException, GeneralSecurityExceptio LoggedRequest request = receivedRequest(); ObjectNode body = (ObjectNode) PayloadAssertions.FIXTURE_EDITOR.readTree(request.getBodyAsString()); List members = new ArrayList<>(); - body.fieldNames().forEachRemaining(members::add); + body.propertyNames().iterator().forEachRemaining(members::add); assertThat(members).as("members of the render body").containsExactlyInAnyOrder(TIMESTAMP_MEMBER, PAYLOAD_MEMBER, SIGNATURE_MEMBER); JsonNode timestamp = body.get(TIMESTAMP_MEMBER); assertThat(timestamp.isIntegralNumber()).as("timestamp is an integral number: " + timestamp).isTrue(); assertThat(timestamp.asLong()).as("timestamp, a time of the call").isBetween(before, after); - String signature = body.get(SIGNATURE_MEMBER).asText(); + String signature = body.get(SIGNATURE_MEMBER).asString(); assertThat(signature).as("signature").matches(SIGNATURE_FORMAT); - String expected = hmac(timestamp.asLong() + SIGNED_SEPARATOR + body.get(PAYLOAD_MEMBER).asText()); + String expected = hmac(timestamp.asLong() + SIGNED_SEPARATOR + body.get(PAYLOAD_MEMBER).asString()); System.out.println("[MarketplaceRenderContractTest] recomputed signature " + expected); assertThat(signature).as("signature, recomputed").isEqualTo(expected); body.put(TIMESTAMP_MEMBER, TIMESTAMP_PLACEHOLDER).put(SIGNATURE_MEMBER, SIGNATURE_PLACEHOLDER); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/JwtDecoderUtilTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/JwtDecoderUtilTest.java index 755877d24..34423cbd3 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/JwtDecoderUtilTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/JwtDecoderUtilTest.java @@ -1,5 +1,6 @@ package org.lowcoder.api.authentication; +import tools.jackson.core.JacksonException; import org.junit.jupiter.api.Test; import org.lowcoder.api.authentication.util.JwtDecoderUtil; @@ -43,7 +44,7 @@ void testDecodeJwtPayload_InvalidBase64() { JwtDecoderUtil.decodeJwtPayload(jwt); }); - assertTrue(exception instanceof IllegalArgumentException || exception instanceof java.io.IOException); + assertTrue(exception instanceof IllegalArgumentException || exception instanceof JacksonException); } @Test @@ -55,6 +56,6 @@ void testDecodeJwtPayload_EmptyPayload() throws Exception { JwtDecoderUtil.decodeJwtPayload(jwt); }); - assertTrue(exception instanceof java.io.IOException); + assertTrue(exception instanceof JacksonException); } } \ No newline at end of file diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/request/oauth2/request/OauthProviderStubs.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/request/oauth2/request/OauthProviderStubs.java index a11724431..320745938 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/request/oauth2/request/OauthProviderStubs.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/request/oauth2/request/OauthProviderStubs.java @@ -23,6 +23,7 @@ import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.MediaType; +import tools.jackson.core.JacksonException; import java.nio.charset.StandardCharsets; import java.time.Duration; @@ -205,7 +206,7 @@ static Map fields(AuthUser user) { static String pretty(Object value) { try { return JsonUtils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(value); - } catch (com.fasterxml.jackson.core.JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalStateException("cannot write " + value, e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ClientCodecGuardTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ClientCodecGuardTest.java index 49a316f62..9f514f4f4 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ClientCodecGuardTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ClientCodecGuardTest.java @@ -1,6 +1,6 @@ package org.lowcoder.api.contract; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.lowcoder.api.application.marketplace.MarketplaceRenderClient; import org.lowcoder.api.misc.JsLibraryController; @@ -40,13 +40,14 @@ class ClientCodecGuardTest { private static final String NODE_CLIENT_STRATEGIES_FIELD = "EXCHANGE_STRATEGIES"; private static final String NODE_CLIENT_MAPPER_FIELD = "OBJECT_MAPPER"; private static final String JS_LIBRARY_STRATEGIES_FIELD = "EXCHANGE_STRATEGY"; - /** E11: the bare mapper registers nothing and fails on unknown properties. */ + /** E11: the bare mapper registers nothing and fails on unknown properties (Jackson 2's defaults, which is what the bare mapper is built with). */ private static final MapperProfile BARE_MAPPER_PROFILE = new MapperProfile(true, true, true, List.of()); @BoundarySites({"lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java#WebClientBuildHelper.toWebClientBuilder#codecs#1", - "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java#Jackson2ClientCodecs.apply#jackson2JsonEncoder#1", - "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java#Jackson2ClientCodecs.apply#jackson2JsonDecoder#1", - "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java##import#1"}) + "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java#JacksonClientCodecs.apply#jacksonJsonEncoder#1", + "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java#JacksonClientCodecs.apply#jacksonJsonDecoder#1", + "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java#JacksonClientCodecs.mapper#JsonMapper.builder#1", + "lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java##import#1"}) @Test void webClientBuildHelperUsesDefaultClientCodecs() { ClientCodecs.assertDefaultClientCodecs("WebClientBuildHelper", diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadBoundsTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadBoundsTest.java index 57fb96703..1957683df 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadBoundsTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadBoundsTest.java @@ -1,6 +1,6 @@ package org.lowcoder.api.contract; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.ContractTestClient; import org.lowcoder.api.framework.exception.ApiPerfHelper; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadContractCompletenessTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadContractCompletenessTest.java index e1fa2fe25..8f753ec19 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadContractCompletenessTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/PayloadContractCompletenessTest.java @@ -1,7 +1,7 @@ package org.lowcoder.api.contract; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JavaType; +import tools.jackson.databind.JsonNode; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -18,6 +18,7 @@ import org.lowcoder.api.contract.support.WorkPackageStatus; import org.lowcoder.sdk.contract.JacksonAnnotationGuard; import org.lowcoder.sdk.util.JsonUtils; +import tools.jackson.core.JacksonException; import java.io.IOException; import java.io.UncheckedIOException; @@ -296,8 +297,8 @@ void rule7EveryRouteFunctionIsClassified() throws IOException { ruleFindings.add(new Finding(ALWAYS, 7, ContractRegistry.FUNCTIONAL_ROUTES_FILE + " needs a '" + ROUTES_FIELD + "' array")); } routes.forEach(route -> { - if (entries.put(route.path("key").asText(), route) != null) { - ruleFindings.add(new Finding(ALWAYS, 7, "route entry listed twice: " + route.path("key").asText())); + if (entries.put(route.path("key").asString(), route) != null) { + ruleFindings.add(new Finding(ALWAYS, 7, "route entry listed twice: " + route.path("key").asString())); } }); List sites = ContractSources.routeSites(root); @@ -309,14 +310,14 @@ void rule7EveryRouteFunctionIsClassified() throws IOException { if (!keys.contains(key)) { ruleFindings.add(new Finding(ALWAYS, 7, "stale route entry " + key)); } - String body = entry.path("body").asText(); + String body = entry.path("body").asString(); if (!ROUTE_BODIES.contains(body)) { ruleFindings.add(new Finding(ALWAYS, 7, key + ": body must be one of " + ROUTE_BODIES)); } - if (JSON_BODY.equals(body) && !testClassExists(entry.path("test").asText())) { + if (JSON_BODY.equals(body) && !testClassExists(entry.path("test").asString())) { ruleFindings.add(new Finding(ALWAYS, 7, key + ": JSON route without an existing test class")); } - if (!JSON_BODY.equals(body) && entry.path("note").asText().isBlank()) { + if (!JSON_BODY.equals(body) && entry.path("note").asString().isBlank()) { ruleFindings.add(new Finding(ALWAYS, 7, key + ": a non-JSON route needs its reason in note")); } }); @@ -397,10 +398,10 @@ private static Set topLevelNames(Path file) { try { JsonNode node = JsonUtils.getObjectMapper().readTree(Files.readString(file, StandardCharsets.UTF_8)); Set names = new TreeSet<>(); - node.fieldNames().forEachRemaining(names::add); + node.propertyNames().iterator().forEachRemaining(names::add); return names; - } catch (IOException e) { - throw new UncheckedIOException("cannot read fixture " + file, e); + } catch (IOException | JacksonException e) { + throw new IllegalStateException("cannot read fixture " + file, e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ServerCodecGuardTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ServerCodecGuardTest.java index b97433c09..d14c3c4d8 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ServerCodecGuardTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/ServerCodecGuardTest.java @@ -1,11 +1,9 @@ package org.lowcoder.api.contract; -import com.fasterxml.jackson.core.StreamReadConstraints; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationConfig; -import com.fasterxml.jackson.databind.introspect.AnnotatedClass; -import com.fasterxml.jackson.databind.introspect.AnnotatedClassResolver; -import com.fasterxml.jackson.databind.jsontype.NamedType; +import tools.jackson.core.StreamReadConstraints; +import tools.jackson.databind.introspect.AnnotatedClass; +import tools.jackson.databind.json.JsonMapper; +import tools.jackson.databind.jsontype.NamedType; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -14,11 +12,12 @@ import org.lowcoder.sdk.contract.BoundarySites; import org.lowcoder.sdk.contract.ClientCodecs; import org.lowcoder.sdk.contract.ClientCodecs.MapperProfile; +import org.lowcoder.sdk.contract.JacksonIntrospection; import org.lowcoder.sdk.util.JsonUtils; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.http.codec.ServerCodecConfigurer; -import org.springframework.http.codec.json.Jackson2JsonDecoder; -import org.springframework.http.codec.json.Jackson2JsonEncoder; +import org.springframework.http.codec.json.JacksonJsonDecoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; import java.util.List; import java.util.Set; @@ -40,13 +39,12 @@ class ServerCodecGuardTest { private static final String OBJECT_MAPPER_BEAN_NAME = "objectMapper"; /** E7: {@code spring.http.codecs.max-in-memory-size} defaults to 20MB ({@code CustomWebFluxConfiguration.java:29-30}). */ static final int SERVER_MAX_IN_MEMORY_SIZE = 20 * 1024 * 1024; - /** E3: Jackson's defaults, which {@code JsonUtils} does not override. */ + /** E3: the Jackson 2 limits, which {@code JsonUtils} sets because the Jackson 3 defaults differ (nesting depth, string length). */ private static final int MAX_NESTING_DEPTH = 1000; private static final int MAX_NUMBER_LENGTH = 1000; private static final int MAX_STRING_LENGTH = 20_000_000; /** E4. */ - private static final MapperProfile PRODUCTION_PROFILE = new MapperProfile(true, true, false, - List.of("jackson-module-parameter-names", "jackson-datatype-jsr310")); + private static final MapperProfile PRODUCTION_PROFILE = new MapperProfile(true, true, false, List.of()); /** The type ids registered at {@code JsonUtils.java:36-41}; they are part of the wire contract. */ private static final Set AUTH_CONFIG_TYPE_IDS = Set.of("FORM", "GITHUB", "GOOGLE", "ORY", "KEYCLOAK", "GENERIC"); @@ -65,19 +63,19 @@ static void closeContext() { @BoundarySites({ "lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.objectMapper#getObjectMapper#1", - "lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jackson2JsonDecoder#1", - "lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jackson2JsonEncoder#1", + "lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jacksonJsonDecoder#1", + "lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jacksonJsonEncoder#1", "lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java##import#1"}) @Test void serverCodecsUseTheProductionMapper() { ServerCodecConfigurer codecs = context.getBean(ServerCodecConfigurer.class); - Jackson2JsonEncoder encoder = ClientCodecs.encoder(codecs.getWriters()); - Jackson2JsonDecoder decoder = ClientCodecs.decoder(codecs.getReaders()); - ObjectMapper production = JsonUtils.getObjectMapper(); - System.out.println("[ServerCodecGuardTest] encoder mapper " + ClientCodecs.profile(encoder.getObjectMapper()) + JacksonJsonEncoder encoder = ClientCodecs.encoder(codecs.getWriters()); + JacksonJsonDecoder decoder = ClientCodecs.decoder(codecs.getReaders()); + JsonMapper production = JsonUtils.getObjectMapper(); + System.out.println("[ServerCodecGuardTest] encoder mapper " + ClientCodecs.profile(encoder.getMapper()) + ", decoder maxInMemorySize " + decoder.getMaxInMemorySize()); - assertThat(encoder.getObjectMapper()).as("server encoder mapper").isSameAs(production); - assertThat(decoder.getObjectMapper()).as("server decoder mapper").isSameAs(production); + assertThat(encoder.getMapper()).as("server encoder mapper").isSameAs(production); + assertThat(decoder.getMapper()).as("server decoder mapper").isSameAs(production); assertThat(context.getBean(OBJECT_MAPPER_BEAN_NAME)).as("objectMapper bean").isSameAs(production); assertThat(decoder.getMaxInMemorySize()).as("server decoder maxInMemorySize").isEqualTo(SERVER_MAX_IN_MEMORY_SIZE); } @@ -91,7 +89,7 @@ void productionMapperFeaturesAndModulesAreUnchanged() { @Test void productionMapperReadLimitsAreUnchanged() { - StreamReadConstraints constraints = JsonUtils.getObjectMapper().getFactory().streamReadConstraints(); + StreamReadConstraints constraints = JsonUtils.getObjectMapper().tokenStreamFactory().streamReadConstraints(); System.out.println("[ServerCodecGuardTest] StreamReadConstraints nesting=" + constraints.getMaxNestingDepth() + " number=" + constraints.getMaxNumberLength() + " string=" + constraints.getMaxStringLength()); assertThat(constraints.getMaxNestingDepth()).isEqualTo(MAX_NESTING_DEPTH); @@ -101,10 +99,9 @@ void productionMapperReadLimitsAreUnchanged() { @Test void productionMapperRegistersTheSixAuthConfigTypeIds() { - ObjectMapper mapper = JsonUtils.getObjectMapper(); - SerializationConfig config = mapper.getSerializationConfig(); - AnnotatedClass authConfig = AnnotatedClassResolver.resolveWithoutSuperTypes(config, AbstractAuthConfig.class); - Set typeIds = mapper.getSubtypeResolver().collectAndResolveSubtypesByTypeId(config, authConfig).stream() + JsonMapper mapper = JsonUtils.getObjectMapper(); + AnnotatedClass authConfig = JacksonIntrospection.serializationClass(mapper, mapper.constructType(AbstractAuthConfig.class)); + Set typeIds = JacksonIntrospection.subtypesByTypeId(mapper, authConfig).stream() .filter(NamedType::hasName) .map(NamedType::getName) .collect(Collectors.toCollection(TreeSet::new)); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/JsLibraryFetchContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/JsLibraryFetchContractTest.java index 49475a7a1..7bdf86c37 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/JsLibraryFetchContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/JsLibraryFetchContractTest.java @@ -1,7 +1,8 @@ package org.lowcoder.api.contract.boundary; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import com.google.common.cache.LoadingCache; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; @@ -305,8 +306,8 @@ private static TreeSet resourceNames() throws IOException { try (InputStream resource = JsLibraryController.class.getClassLoader().getResourceAsStream(RECOMMENDED_RESOURCE)) { assertThat(resource).as(RECOMMENDED_RESOURCE).isNotNull(); TreeSet names = new TreeSet<>(); - for (JsonNode library : new ObjectMapper().readTree(new String(resource.readAllBytes(), StandardCharsets.UTF_8))) { - names.add(library.path(NAME_KEY).asText()); + for (JsonNode library : JsonMapper.builderWithJackson2Defaults().build().readTree(new String(resource.readAllBytes(), StandardCharsets.UTF_8))) { + names.add(library.path(NAME_KEY).asString()); } return names; } @@ -317,9 +318,9 @@ private static TreeMap resourceDownloadUrls() throws IOException try (InputStream resource = JsLibraryController.class.getClassLoader().getResourceAsStream(RECOMMENDED_RESOURCE)) { assertThat(resource).as(RECOMMENDED_RESOURCE).isNotNull(); TreeMap urls = new TreeMap<>(); - for (JsonNode library : new ObjectMapper().readTree(new String(resource.readAllBytes(), StandardCharsets.UTF_8))) { + for (JsonNode library : JsonMapper.builderWithJackson2Defaults().build().readTree(new String(resource.readAllBytes(), StandardCharsets.UTF_8))) { JsonNode url = library.path(DOWNLOAD_URL_KEY); - urls.put(library.path(NAME_KEY).asText(), url.isTextual() ? url.asText() : null); + urls.put(library.path(NAME_KEY).asString(), url.isString() ? url.asString() : null); } return urls; } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/JwtClaimsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/JwtClaimsContractTest.java index ade02123a..9c9c90d89 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/JwtClaimsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/JwtClaimsContractTest.java @@ -1,13 +1,13 @@ package org.lowcoder.api.contract.boundary; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.lowcoder.api.authentication.util.JwtDecoderUtil; import org.lowcoder.sdk.contract.BoundarySites; import org.lowcoder.sdk.contract.GoldenJson; import org.lowcoder.sdk.contract.JavaValueWalker; import org.lowcoder.sdk.util.JsonUtils; +import tools.jackson.core.JacksonException; import java.nio.charset.StandardCharsets; import java.util.Base64; @@ -62,7 +62,7 @@ public static String jwt(String payload) { } @BoundarySites({ - "lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java#JwtDecoderUtil.objectMapper#new ObjectMapper#1", + "lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java#JwtDecoderUtil.objectMapper#JsonMapper.builder#1", "lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java#JwtDecoderUtil.decodeJwtPayload#readValue#1", "lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java##import#1"}) @Test @@ -103,7 +103,7 @@ private static String errorOf(String jwt) { return "no error: " + JwtDecoderUtil.decodeJwtPayload(jwt); } catch (IllegalArgumentException e) { return e.getClass().getName() + ": " + e.getMessage(); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { return e.getClass().getName(); } catch (Exception e) { throw new AssertionError("unexpected exception for " + jwt, e); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/SessionCacheContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/SessionCacheContractTest.java index ec99f1da3..831268dac 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/SessionCacheContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/SessionCacheContractTest.java @@ -5,6 +5,7 @@ import org.junit.jupiter.api.TestInstance; import org.lowcoder.api.common.InitData; import org.lowcoder.api.framework.warmup.WarmupHelper; +import org.lowcoder.api.subscription.WorkspaceSeatSyncService; import org.lowcoder.api.home.SessionUserServiceImpl; import org.lowcoder.domain.user.model.Connection; import org.lowcoder.domain.user.model.User; @@ -14,12 +15,13 @@ import org.lowcoder.sdk.util.JsonUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.ApplicationContext; import org.springframework.data.redis.connection.ReactiveRedisConnection; import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory; import org.springframework.data.redis.core.ReactiveRedisOperations; +import org.springframework.data.redis.serializer.JacksonJsonRedisSerializer; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.util.ReflectionTestUtils; +import tools.jackson.core.JacksonException; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; @@ -42,12 +44,11 @@ * {@code null}, not throw; and that both forms, written through the service's own template into Redis, resolve to the * seeded user. * - *

    Redis wiring (C9-A1, E12). {@code RedisConfig} declares a {@code @Primary} template whose value - * serializer is {@code Jackson2JsonRedisSerializer}, but every {@code ReactiveRedisTemplate} - * injection point (this service, {@code IoHeartBeatTask}, {@code WarmupHelper}) receives + *

    Redis wiring (C9-A1, E12). Every {@code ReactiveRedisTemplate} injection point (this + * service, {@code IoHeartBeatTask}, {@code WarmupHelper}, {@code WorkspaceSeatSyncService}) receives * {@code reactiveStringRedisTemplate}. {@link #sessionTemplatesWriteStringsNotJson} requires each of them to write * {@value #SAMPLE_VALUE} as the bytes {@value #STRING_SERIALIZER_BYTES}; a rewiring that makes Jackson write session - * values (a JSON string literal, {@code 22...22}) fails it. + * values (a JSON string literal, {@code 22...22}, which {@link #JACKSON_SERIALIZER} writes) fails it. * *

    Limits: it runs with the "test" profile, whose {@code SessionUserServiceImplTest} subclass inherits the injected * field unchanged; the template fields are read by name, so renaming one fails the test rather than skipping it. @@ -65,16 +66,16 @@ class SessionCacheContractTest { static final Duration BLOCK_TIMEOUT = Duration.ofSeconds(30); static final String SAMPLE_VALUE = "u1\"é"; static final String STRING_SERIALIZER_BYTES = "753122c3a9"; - static final String JACKSON_TEMPLATE_BEAN = "reactiveRedisOperations"; static final String SESSION_TEMPLATE_FIELD = "reactiveTemplate"; static final String TASK_TEMPLATE_FIELD = "reactiveRedisTemplate"; + static final String SEAT_SYNC_TEMPLATE_FIELD = "redis"; static final String FROM_JSON_QUIETLY_KEY = "fromJsonQuietly"; static final String THROUGH_REDIS_KEY = "throughRedis"; private static final GoldenJson GOLDEN = GoldenJson.forModule(); + /** What a Jackson value serializer writes for {@link #SAMPLE_VALUE}: the serializer this guard tells apart from the string one. */ + private static final JacksonJsonRedisSerializer JACKSON_SERIALIZER = new JacksonJsonRedisSerializer<>(String.class); - @Autowired - private ApplicationContext context; @Autowired private SessionUserServiceImpl sessionUserService; @Autowired @@ -82,6 +83,8 @@ class SessionCacheContractTest { @Autowired private WarmupHelper warmupHelper; @Autowired + private WorkspaceSeatSyncService workspaceSeatSyncService; + @Autowired private ReactiveRedisConnectionFactory connectionFactory; @Autowired private InitData initData; @@ -135,15 +138,15 @@ void sessionValuesResolveToTheirUser() { GOLDEN.assertJson(READ_FIXTURE, actual); } - @BoundarySites("lowcoder-domain/src/main/java/org/lowcoder/domain/configurations/RedisConfig.java##import#1") @Test void sessionTemplatesWriteStringsNotJson() { Map> injected = new LinkedHashMap<>(); injected.put("SessionUserServiceImpl." + SESSION_TEMPLATE_FIELD, template(sessionUserService, SESSION_TEMPLATE_FIELD)); injected.put("IoHeartBeatTask." + TASK_TEMPLATE_FIELD, template(ioHeartBeatTask, TASK_TEMPLATE_FIELD)); injected.put("WarmupHelper." + TASK_TEMPLATE_FIELD, template(warmupHelper, TASK_TEMPLATE_FIELD)); - String jacksonBytes = valueBytes(template(context.getBean(JACKSON_TEMPLATE_BEAN))); - System.out.println("[SessionCacheContractTest] RedisConfig." + JACKSON_TEMPLATE_BEAN + " writes " + SAMPLE_VALUE + " as " + jacksonBytes); + injected.put("WorkspaceSeatSyncService." + SEAT_SYNC_TEMPLATE_FIELD, template(workspaceSeatSyncService, SEAT_SYNC_TEMPLATE_FIELD)); + String jacksonBytes = HexFormat.of().formatHex(JACKSON_SERIALIZER.serialize(SAMPLE_VALUE)); + System.out.println("[SessionCacheContractTest] a Jackson serializer writes " + SAMPLE_VALUE + " as " + jacksonBytes); assertThat(jacksonBytes).as("the Jackson template this guard tells apart").isNotEqualTo(STRING_SERIALIZER_BYTES); injected.forEach((point, template) -> { String bytes = valueBytes(template); @@ -201,7 +204,7 @@ private static String valueBytes(ReactiveRedisOperations templat private static String pretty(Object value) { try { return JsonUtils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(value); - } catch (com.fasterxml.jackson.core.JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalStateException("cannot write " + value, e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/UpsertDatasourceContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/UpsertDatasourceContractTest.java index f00db874a..608b84537 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/UpsertDatasourceContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/boundary/UpsertDatasourceContractTest.java @@ -1,7 +1,6 @@ package org.lowcoder.api.contract.boundary; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.ContractTestClient; import org.lowcoder.api.contract.support.DatasourceSamples; @@ -71,7 +70,7 @@ class UpsertDatasourceContractTest { @Test @BoundarySites({"lowcoder-server/src/main/java/org/lowcoder/api/datasource/UpsertDatasourceRequestMapper.java#UpsertDatasourceRequestMapper.resolve#toJson#1", "lowcoder-server/src/main/java/org/lowcoder/api/datasource/UpsertDatasourceRequestMapper.java#UpsertDatasourceRequestMapper.resolve#fromJson#1"}) - void jsPluginConfigKeepsTheRequestValues() throws JsonProcessingException { + void jsPluginConfigKeepsTheRequestValues() { UpsertDatasourceRequest sample = (UpsertDatasourceRequest) PayloadSamples.of(UpsertDatasourceRequest.class).value(); ContractTestClient.Builder builder = ContractTestClient.builder(); DatasourceApiService datasourceApiService = builder.mock(DatasourceApiService.class); @@ -99,7 +98,7 @@ void jsPluginConfigKeepsTheRequestValues() throws JsonProcessingException { } /** The D1 request with the representative input as {@code datasourceConfig}, its text unchanged. */ - private static String request() throws JsonProcessingException { + private static String request() { ObjectNode request = (ObjectNode) PayloadAssertions.FIXTURE_EDITOR.readTree(EndpointContract.d1(UpsertDatasourceRequest.class)); request.put(DATASOURCE_CONFIG, CONFIG_PLACEHOLDER); return PayloadAssertions.FIXTURE_EDITOR.writeValueAsString(request) diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java index 4f09f6e9d..55a90053e 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApiFlowEndpointsContractTest.java @@ -1,9 +1,8 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.NullNode; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.NullNode; +import tools.jackson.databind.node.ObjectNode; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; import com.github.tomakehurst.wiremock.junit5.WireMockTest; @@ -52,6 +51,7 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.util.retry.RetryBackoffSpec; +import tools.jackson.core.JacksonException; import java.nio.charset.StandardCharsets; import java.time.Duration; @@ -264,7 +264,7 @@ static void everyEndpointAndBranchHasATest() { } @Test - void flow(WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flow(WireMockRuntimeInfo wireMock) { FlowRequest sample = sample(); upstreamAnswers(wireMock, sample, aResponse().withStatus(OK).withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) .withBody(UPSTREAM_ANSWER)); @@ -282,7 +282,7 @@ void flow(WireMockRuntimeInfo wireMock) throws JsonProcessingException { } @Test - void flowUpstreamFailed(WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flowUpstreamFailed(WireMockRuntimeInfo wireMock) { FlowRequest sample = sample(); upstreamAnswers(wireMock, sample, aResponse().withStatus(UPSTREAM_ERROR)); EntityExchangeResult result = exchange(d1Without(tree -> tree.remove(List.of(RETRIES, TIMEOUT)))); @@ -329,7 +329,7 @@ static Stream noHeadersOnBothMounts() { */ @ParameterizedTest @MethodSource("noHeadersOnBothMounts") - void flowWithoutHeaders(String mount, NoHeaders headers, WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flowWithoutHeaders(String mount, NoHeaders headers, WireMockRuntimeInfo wireMock) { FlowRequest sample = sample(); upstreamAnswers(wireMock, sample, aResponse().withStatus(OK).withBody(UPSTREAM_ANSWER)); EntityExchangeResult result = exchangeOn(mount, d1Without(tree -> { @@ -381,7 +381,7 @@ static Stream blankMethodsOnBothMounts() { */ @ParameterizedTest @MethodSource("blankMethodsOnBothMounts") - void flowWithoutMethod(String mount, BlankMethod method, WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flowWithoutMethod(String mount, BlankMethod method, WireMockRuntimeInfo wireMock) { FlowRequest sample = sample(); upstreamAnswers(wireMock, sample, aResponse().withStatus(OK).withBody(UPSTREAM_ANSWER)); EntityExchangeResult result = exchangeOn(mount, d1Without(tree -> { @@ -403,7 +403,7 @@ void flowWithoutMethod(String mount, BlankMethod method, WireMockRuntimeInfo wir */ @ParameterizedTest @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) - void flowWithoutMethodKeepingTheRetries(String mount, WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flowWithoutMethodKeepingTheRetries(String mount, WireMockRuntimeInfo wireMock) { FlowRequest sample = sample(); upstreamAnswers(wireMock, sample, aResponse().withStatus(OK).withBody(UPSTREAM_ANSWER)); EntityExchangeResult result = exchangeOn(mount, d1Without(tree -> tree.remove(METHOD))); @@ -421,7 +421,7 @@ void flowWithoutMethodKeepingTheRetries(String mount, WireMockRuntimeInfo wireMo */ @ParameterizedTest @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) - void flowWithRetriesOrTimeoutOutOfRange(String mount, WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flowWithRetriesOrTimeoutOutOfRange(String mount, WireMockRuntimeInfo wireMock) { FlowRequest sample = sample(); upstreamAnswers(wireMock, sample, aResponse().withStatus(OK).withBody(UPSTREAM_ANSWER)); EntityExchangeResult result = exchangeOn(mount, EndpointContract.d1(FlowRequest.class)); @@ -440,7 +440,7 @@ void flowWithRetriesOrTimeoutOutOfRange(String mount, WireMockRuntimeInfo wireMo * injected synchronous failure; a failure during the request takes the retry path ({@link #flowUpstreamFailed}). */ @Test - void flowFailingBeforeTheRequest(WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flowFailingBeforeTheRequest(WireMockRuntimeInfo wireMock) { IllegalStateException failure = new IllegalStateException(BUILDER_FAILURE); controller.builderFailure = failure; EntityExchangeResult result = exchange(d1InRange()); @@ -462,7 +462,7 @@ void flowFailingBeforeTheRequest(WireMockRuntimeInfo wireMock) throws JsonProces * change of that field makes the read throw and fails the case. Limits: the delays themselves are not run; one mount. */ @Test - void flowRetriesWithoutTimeoutBackOffTenSeconds(WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flowRetriesWithoutTimeoutBackOffTenSeconds(WireMockRuntimeInfo wireMock) { FlowRequest sample = sample(); upstreamAnswers(wireMock, sample, aResponse().withStatus(OK).withBody(UPSTREAM_ANSWER)); EntityExchangeResult result = exchange(d1Without(tree -> { @@ -485,11 +485,11 @@ void flowRetriesWithoutTimeoutBackOffTenSeconds(WireMockRuntimeInfo wireMock) th } @BoundarySites({ - "lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#new ObjectMapper#1", + "lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#JsonMapper.builder#1", "lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#writeValueAsString#1", "lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java##import#1"}) @Test - void flowRepresentativeData(WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flowRepresentativeData(WireMockRuntimeInfo wireMock) { FlowRequest sample = sample(); upstreamAnswers(wireMock, sample, aResponse().withStatus(OK).withBody(UPSTREAM_ANSWER)); String request = d1Without(tree -> { @@ -517,7 +517,7 @@ void flowRepresentativeData(WireMockRuntimeInfo wireMock) throws JsonProcessingE "lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java##import#1"}) @ParameterizedTest @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) - void flowSeatSync(String mount) throws JsonProcessingException { + void flowSeatSync(String mount) { long before = System.currentTimeMillis(); EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(POST, orgData(SEAT_ORG_ID))); long after = System.currentTimeMillis(); @@ -536,7 +536,7 @@ void flowSeatSync(String mount) throws JsonProcessingException { @ParameterizedTest @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) - void flowSeatSyncWithAnotherMethod(String mount) throws JsonProcessingException { + void flowSeatSyncWithAnotherMethod(String mount) { EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(OTHER_METHOD, orgData(SEAT_ORG_ID))); assertStatusExceptionAnswer(result, HttpStatus.METHOD_NOT_ALLOWED); assertNoRelayRequest(); @@ -551,7 +551,7 @@ void flowSeatSyncWithAnotherMethod(String mount) throws JsonProcessingException */ @ParameterizedTest @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) - void flowSeatSyncWithRetriesOutOfRange(String mount) throws JsonProcessingException { + void flowSeatSyncWithRetriesOutOfRange(String mount) { ObjectNode request = (ObjectNode) PayloadAssertions.FIXTURE_EDITOR.readTree(seatSyncRequest(POST, orgData(SEAT_ORG_ID))); request.put(RETRIES, RETRIES_OUT_OF_RANGE); EntityExchangeResult result = exchangeOn(mount, PayloadAssertions.FIXTURE_EDITOR.writeValueAsString(request)); @@ -574,7 +574,7 @@ static Stream blankSeatSyncMethodsOnBothMounts() { */ @ParameterizedTest @MethodSource("blankSeatSyncMethodsOnBothMounts") - void flowSeatSyncWithoutMethod(String mount, String method) throws JsonProcessingException { + void flowSeatSyncWithoutMethod(String mount, String method) { EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(method, orgData(SEAT_ORG_ID))); assertThat(decoded().method()).as("decoded seat-sync method").isEqualTo(method); assertStatusExceptionAnswer(result, HttpStatus.METHOD_NOT_ALLOWED); @@ -584,7 +584,7 @@ void flowSeatSyncWithoutMethod(String mount, String method) throws JsonProcessin @ParameterizedTest @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) - void flowSeatSyncAlreadyRunning(String mount) throws JsonProcessingException { + void flowSeatSyncAlreadyRunning(String mount) { Mockito.when(redis.opsForValue().setIfAbsent(anyString(), anyString(), any(Duration.class))).thenReturn(Mono.just(false)); EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(POST, orgData(SEAT_ORG_ID))); assertStatusExceptionAnswer(result, HttpStatus.CONFLICT); @@ -594,7 +594,7 @@ void flowSeatSyncAlreadyRunning(String mount) throws JsonProcessingException { @ParameterizedTest @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) - void flowSeatSyncRelayFailed(String mount) throws JsonProcessingException { + void flowSeatSyncRelayFailed(String mount) { leaseThenRelayAnswers(requestId -> aResponse().withStatus(UPSTREAM_ERROR)); EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(POST, orgData(SEAT_ORG_ID))); EndpointContract.assertBizError(result, BizError.INTERNAL_SERVER_ERROR, BizError.INTERNAL_SERVER_ERROR.name()); @@ -604,7 +604,7 @@ void flowSeatSyncRelayFailed(String mount) throws JsonProcessingException { @ParameterizedTest @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) - void flowSeatSyncNotConfirmed(String mount) throws JsonProcessingException { + void flowSeatSyncNotConfirmed(String mount) { leaseThenRelayAnswers(requestId -> relayConfirmation(UNCONFIRMED_REQUEST_ID)); EntityExchangeResult result = exchangeOn(mount, seatSyncRequest(POST, orgData(SEAT_ORG_ID))); EndpointContract.assertBizError(result, BizError.INTERNAL_SERVER_ERROR, BizError.INTERNAL_SERVER_ERROR.name()); @@ -644,7 +644,7 @@ static Stream seatSyncRefusals() { @ParameterizedTest @MethodSource("seatSyncRefusals") - void flowSeatSyncRefused(String mount, SeatSyncRefusal refusal) throws JsonProcessingException { + void flowSeatSyncRefused(String mount, SeatSyncRefusal refusal) { JsonNode data = orgData(SEAT_ORG_ID); switch (refusal) { case NO_SESSION -> Mockito.when(sessions.getVisitorOrgMember()).thenReturn(Mono.empty()); @@ -717,7 +717,7 @@ private ResponseDefinitionBuilder relayConfirmation(String requestId) { String body = PayloadAssertions.FIXTURE_EDITOR.writeValueAsString(confirmation) .replace("\"" + DETAIL_PLACEHOLDER + "\"", PayloadSamples.representativeInputText()); return aResponse().withStatus(OK).withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE).withBody(body); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalStateException("cannot write the seat relay's confirmation", e); } } @@ -725,16 +725,16 @@ private ResponseDefinitionBuilder relayConfirmation(String requestId) { /** The snapshot the seat relay received: exactly the five members, the server's values, {@code issuedAt} in the exchange. */ private void assertSeatSnapshot(JsonNode snapshot, long before, long after) { List members = new ArrayList<>(); - snapshot.fieldNames().forEachRemaining(members::add); + snapshot.propertyNames().iterator().forEachRemaining(members::add); assertThat(members).as("snapshot members").containsExactlyInAnyOrder(HOST_ID_MEMBER, ORG_ID_MEMBER, QUANTITY_MEMBER, REQUEST_ID_MEMBER, ISSUED_AT_MEMBER); - assertThat(snapshot.get(HOST_ID_MEMBER).isTextual() ? snapshot.get(HOST_ID_MEMBER).asText() : null).as("snapshot hostId") + assertThat(snapshot.get(HOST_ID_MEMBER).isString() ? snapshot.get(HOST_ID_MEMBER).asString() : null).as("snapshot hostId") .isEqualTo(SEAT_HOST_ID); - assertThat(snapshot.get(ORG_ID_MEMBER).isTextual() ? snapshot.get(ORG_ID_MEMBER).asText() : null).as("snapshot orgId") + assertThat(snapshot.get(ORG_ID_MEMBER).isString() ? snapshot.get(ORG_ID_MEMBER).asString() : null).as("snapshot orgId") .isEqualTo(SEAT_ORG_ID); assertThat(snapshot.get(QUANTITY_MEMBER).isInt() ? snapshot.get(QUANTITY_MEMBER).intValue() : null).as("snapshot quantity, an integer") .isEqualTo(QUANTITY); - assertThat(snapshot.get(REQUEST_ID_MEMBER).isTextual() ? snapshot.get(REQUEST_ID_MEMBER).asText() : null) + assertThat(snapshot.get(REQUEST_ID_MEMBER).isString() ? snapshot.get(REQUEST_ID_MEMBER).asString() : null) .as("snapshot requestId, the lease's").isEqualTo(leaseRequestId); assertThat(snapshot.get(ISSUED_AT_MEMBER).isIntegralNumber()).as("snapshot issuedAt is an integral number").isTrue(); assertThat(snapshot.get(ISSUED_AT_MEMBER).longValue()).as("snapshot issuedAt, a time of the exchange").isBetween(before, after); @@ -775,7 +775,7 @@ private static ObjectNode orgData(String orgId) { } /** The client's seat-sync request ({@code workspaceSeatSync.ts:18-19}) with {@code method} and {@code data}. */ - private static String seatSyncRequest(String method, JsonNode data) throws JsonProcessingException { + private static String seatSyncRequest(String method, JsonNode data) { ObjectNode request = PayloadAssertions.FIXTURE_EDITOR.createObjectNode().put(PATH, WorkspaceSeatSyncService.FLOW_PATH).put(METHOD, method); request.set(DATA, data); request.set(HEADERS, PayloadAssertions.FIXTURE_EDITOR.createObjectNode()); @@ -831,13 +831,13 @@ private static LoggedRequest sentRequest(WireMockRuntimeInfo wireMock) { } /** D1's {@code data} member as text, with its number lexemes. */ - private static String d1Data() throws JsonProcessingException { + private static String d1Data() { return PayloadAssertions.FIXTURE_EDITOR.writeValueAsString(PayloadAssertions.FIXTURE_EDITOR.readTree(EndpointContract.d1(FlowRequest.class)) .get(DATA)); } /** The D1 golden with {@code timeout} and {@code retries} in range (D1's own are refused, NEW-92). */ - private static String d1InRange() throws JsonProcessingException { + private static String d1InRange() { return d1Without(tree -> { tree.put(TIMEOUT, IN_RANGE_TIMEOUT); tree.put(RETRIES, IN_RANGE_RETRIES); @@ -851,7 +851,7 @@ private static FlowRequest d1InRangeRequest() { } /** The D1 golden after {@code edit}, with its number lexemes. */ - private static String d1Without(Consumer edit) throws JsonProcessingException { + private static String d1Without(Consumer edit) { ObjectNode tree = (ObjectNode) PayloadAssertions.FIXTURE_EDITOR.readTree(EndpointContract.d1(FlowRequest.class)); edit.accept(tree); return PayloadAssertions.FIXTURE_EDITOR.writeValueAsString(tree); @@ -908,7 +908,7 @@ public Mono flow(FlowRequest flowRequest) { @ParameterizedTest @ValueSource(strings = {NewUrl.FLOW_URL, Url.FLOW_URL}) @ResourceLock(Resources.LOCALE) - void flowWithALowerCaseOptionsMethodUnderATurkishDefaultLocaleNEW40(String mount, WireMockRuntimeInfo wireMock) throws JsonProcessingException { + void flowWithALowerCaseOptionsMethodUnderATurkishDefaultLocaleNEW40(String mount, WireMockRuntimeInfo wireMock) { FlowRequest sample = sample(); wireMock.getWireMock().register(request(HttpMethod.OPTIONS.name(), urlPathEqualTo(PATH_SEPARATOR + sample.path())) .willReturn(aResponse().withStatus(OK).withBody(UPSTREAM_ANSWER))); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApplicationRecordEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApplicationRecordEndpointsContractTest.java index aab32c794..c92947c2d 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApplicationRecordEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/ApplicationRecordEndpointsContractTest.java @@ -1,6 +1,5 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -102,7 +101,7 @@ void dslById() { } @Test - void dslByIdAsStored() throws JsonProcessingException { + void dslByIdAsStored() { Map stored = StoredValues.dsl(representativeDsl()); GOLDEN.assertJson(STORED_OUTPUT, JsonUtils.getObjectMapper().writeValueAsString(stored)); Mockito.when(recordApiService.getRecordDSLFromApplicationCombineId(new ApplicationCombineId(APPLICATION_ID, RECORD_ID))) diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/EnterpriseLicenseControllerContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/EnterpriseLicenseControllerContractTest.java index e0cc2aeeb..025f095be 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/EnterpriseLicenseControllerContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/EnterpriseLicenseControllerContractTest.java @@ -1,10 +1,8 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.databind.node.TextNode; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.ArrayNode; +import tools.jackson.databind.node.ObjectNode; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; import com.github.tomakehurst.wiremock.junit5.WireMockTest; @@ -38,6 +36,8 @@ import org.springframework.http.MediaType; import org.springframework.test.web.reactive.server.EntityExchangeResult; import reactor.core.publisher.Mono; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.node.StringNode; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -289,7 +289,7 @@ static void everyEndpointAndBranchHasATest() { * confirmed purchase: the relay receives the lookup, the client its answer, and the empty answer is recorded. */ @Test - void request() throws JsonProcessingException { + void request() { register(RELAY_URL, PUBLIC_URL); long before = System.currentTimeMillis(); EntityExchangeResult result = exchange(STATUS, write(orgBody(ORG_ID).put(RETURN_ORIGIN_MEMBER, PUBLIC_URL))); @@ -303,27 +303,27 @@ void request() throws JsonProcessingException { } @Test - void requestWithoutASession() throws JsonProcessingException { + void requestWithoutASession() { Mockito.when(sessions.getVisitorOrgMember()).thenReturn(Mono.empty()); register(RELAY_URL, PUBLIC_URL); assertRefusedBeforeTheRelay(exchange(SYNC, write(orgBody(ORG_ID))), HttpStatus.UNAUTHORIZED, DEFAULT_MESSAGE); } @Test - void requestByANonAdmin() throws JsonProcessingException { + void requestByANonAdmin() { Mockito.when(sessions.getVisitorOrgMember()).thenReturn(Mono.just(member(ORG_ID, MemberRole.MEMBER))); register(RELAY_URL, PUBLIC_URL); assertRefusedBeforeTheRelay(exchange(SYNC, write(orgBody(ORG_ID))), HttpStatus.FORBIDDEN, DEFAULT_MESSAGE); } @Test - void checkoutOnThePublicCloud() throws JsonProcessingException { + void checkoutOnThePublicCloud() { register(RELAY_URL, PUBLIC_CLOUD_URL); assertRefusedBeforeTheRelay(exchange(CHECKOUT, write(checkoutBody())), HttpStatus.FORBIDDEN, PUBLIC_CLOUD_MESSAGE); } @Test - void requestNotConfigured() throws JsonProcessingException { + void requestNotConfigured() { Mockito.when(config.deployment().ofString(DEPLOYMENT_ID_KEY, BLANK).get()).thenReturn(BLANK); register(RELAY_URL, PUBLIC_URL); assertRefusedBeforeTheRelay(exchange(SYNC, write(orgBody(ORG_ID))), HttpStatus.SERVICE_UNAVAILABLE, NOT_CONFIGURED_MESSAGE); @@ -331,7 +331,7 @@ void requestNotConfigured() throws JsonProcessingException { /** An admin of another workspace than the body's {@code orgId}: the third part of the condition at {@code :53-54}. */ @Test - void requestForAnotherWorkspace() throws JsonProcessingException { + void requestForAnotherWorkspace() { register(RELAY_URL, PUBLIC_URL); assertRefusedBeforeTheRelay(exchange(SYNC, write(orgBody(OTHER_ORG_ID))), HttpStatus.FORBIDDEN, DEFAULT_MESSAGE); } @@ -341,7 +341,7 @@ void requestForAnotherWorkspace() throws JsonProcessingException { * only {@code isInvalid} ({@code OrgMember.java:28-29}), the first part of the condition at {@code :53}, refuses. */ @Test - void requestByAnInvalidMember() throws JsonProcessingException { + void requestByAnInvalidMember() { Mockito.when(sessions.getVisitorOrgMember()).thenReturn(Mono.just(member(BLANK, MemberRole.ADMIN))); register(RELAY_URL, PUBLIC_URL); assertRefusedBeforeTheRelay(exchange(SYNC, write(orgBody(BLANK))), HttpStatus.FORBIDDEN, DEFAULT_MESSAGE); @@ -375,7 +375,7 @@ void requestWithoutABody() { /** The relay answers 503: {@code retrieve()} fails, and {@code relay} maps the error to its own 503 ({@code :166-168}). */ @Test - void requestRelayFailed() throws JsonProcessingException { + void requestRelayFailed() { relayAnswers(aResponse().withStatus(RELAY_ERROR)); register(RELAY_URL, PUBLIC_URL); EntityExchangeResult result = exchange(SYNC, write(orgBody(ORG_ID))); @@ -386,7 +386,7 @@ void requestRelayFailed() throws JsonProcessingException { /** No public URL configured and a {@code returnOrigin} that is neither {@code https} nor loopback: the 503 of {@code :105}. */ @Test - void checkoutWithAnUnsafeReturnOrigin() throws JsonProcessingException { + void checkoutWithAnUnsafeReturnOrigin() { register(RELAY_URL, BLANK); assertRefusedBeforeTheRelay(exchange(CHECKOUT, write(checkoutBody().put(RETURN_ORIGIN_MEMBER, UNSAFE_RETURN_ORIGIN))), HttpStatus.SERVICE_UNAVAILABLE, UNSAFE_RETURN_ORIGIN_MESSAGE); @@ -394,7 +394,7 @@ void checkoutWithAnUnsafeReturnOrigin() throws JsonProcessingException { /** No public URL configured and a {@code returnOrigin} that {@code URI.create} rejects: the 400 of {@code :94-97}. */ @Test - void checkoutWithAMalformedReturnOrigin() throws JsonProcessingException { + void checkoutWithAMalformedReturnOrigin() { register(RELAY_URL, BLANK); assertRefusedBeforeTheRelay(exchange(CHECKOUT, write(checkoutBody().put(RETURN_ORIGIN_MEMBER, MALFORMED_RETURN_ORIGIN))), HttpStatus.BAD_REQUEST, MALFORMED_RETURN_ORIGIN_MESSAGE); @@ -403,7 +403,7 @@ void checkoutWithAMalformedReturnOrigin() throws JsonProcessingException { /** A valid checkout without one of the members {@code :84-87} require: the {@code BAD_REQUEST} of {@code :85}. */ @ParameterizedTest @ValueSource(strings = {REQUEST_ID_MEMBER, BILLING_INTERVAL_MEMBER, CONTACT_DATA_MEMBER}) - void checkoutWithoutARequiredMember(String member) throws JsonProcessingException { + void checkoutWithoutARequiredMember(String member) { register(RELAY_URL, PUBLIC_URL); ObjectNode body = checkoutBody(); body.remove(member); @@ -416,13 +416,13 @@ static Stream foreignDeployments() { .add(FOURTH_HOST_ID); ArrayNode none = PayloadAssertions.FIXTURE_EDITOR.createArrayNode(); return Stream.of(Arguments.of(ANOTHER_HOST_FIRST, anotherHostFirst), Arguments.of(FOUR_DEPLOYMENTS, fourHosts), - Arguments.of(NO_DEPLOYMENT, none), Arguments.of(DEPLOYMENT_AS_A_STRING, TextNode.valueOf(HOST_ID))); + Arguments.of(NO_DEPLOYMENT, none), Arguments.of(DEPLOYMENT_AS_A_STRING, StringNode.valueOf(HOST_ID))); } /** {@code deploymentIds} that are not one to three ids led by this deployment: the {@code BAD_REQUEST} of {@code :79-83}. */ @ParameterizedTest(name = "{0}") @MethodSource("foreignDeployments") - void checkoutWithForeignDeployments(String name, JsonNode deploymentIds) throws JsonProcessingException { + void checkoutWithForeignDeployments(String name, JsonNode deploymentIds) { register(RELAY_URL, PUBLIC_URL); ObjectNode body = checkoutBody(); body.set(DEPLOYMENT_IDS_MEMBER, deploymentIds); @@ -441,7 +441,7 @@ static Stream relayUrlsWithoutHttps() { */ @ParameterizedTest(name = "{0}") @MethodSource("relayUrlsWithoutHttps") - void requestToARelayWithoutHttps(String name, String relayUrl) throws JsonProcessingException { + void requestToARelayWithoutHttps(String name, String relayUrl) { register(relayUrl, PUBLIC_URL); EntityExchangeResult result = exchange(SYNC, write(orgBody(ORG_ID))); assertLicensingError(result, HttpStatus.SERVICE_UNAVAILABLE, RELAY_NOT_HTTPS_MESSAGE); @@ -462,7 +462,7 @@ void requestToARelayWithoutHttps(String name, String relayUrl) throws JsonProces "lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java#EnterpriseLicenseController.send#bodyToMono#1", "lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java##import#1"}) @Test - void checkoutRepresentativeData() throws JsonProcessingException { + void checkoutRepresentativeData() { String representative = PayloadSamples.representativeInputText().strip(); assertThat(representative).as("the representative input is an object").startsWith(JSON_OBJECT_START); relayAnswers(json(JSON_OBJECT_START + CHECKOUT_ANSWER_MEMBERS + representative.substring(JSON_OBJECT_START.length()))); @@ -488,7 +488,7 @@ void checkoutRepresentativeData() throws JsonProcessingException { + (CanonicalJson.compare(output, write(sentTree.get(CONTACT_DATA_MEMBER))).equivalent() ? "equals" : "differs from") + " the production mapper's output " + PayloadSamples.REPRESENTATIVE_OUTPUT + "; relay actions when the attempt was recorded: " + actionsAtTheAttempt.get()); - assertThat(answerTree.path(EndpointContract.DATA).path(CHECKOUT_URL_MEMBER).asText()).as("checkoutUrl").isEqualTo(CHECKOUT_URL); + assertThat(answerTree.path(EndpointContract.DATA).path(CHECKOUT_URL_MEMBER).asString()).as("checkoutUrl").isEqualTo(CHECKOUT_URL); assertThat(actionsAtTheAttempt.get()).as("relay actions when the attempt was recorded").isEmpty(); Mockito.verify(capabilities).checkoutAttempted(HOST_ID, ORG_ID, USER_ID); } @@ -505,7 +505,7 @@ static Stream actionsAndAnswers() { */ @ParameterizedTest(name = "{0}") @MethodSource("actionsAndAnswers") - void everyActionSendsItsMembers(String action, String relayAnswer) throws JsonProcessingException { + void everyActionSendsItsMembers(String action, String relayAnswer) { relayAnswers(json(relayAnswer)); register(RELAY_URL, PUBLIC_URL); ObjectNode body = orgBody(ORG_ID).put(RETURN_ORIGIN_MEMBER, PUBLIC_URL); @@ -538,7 +538,7 @@ static Stream libraryRequestsWithoutAPurchase() { */ @ParameterizedTest(name = "{0} refresh={1}") @MethodSource("libraryRequestsWithoutAPurchase") - void statusWithoutAPurchaseAnswersAnEmptyLibrary(String action, boolean refresh) throws JsonProcessingException { + void statusWithoutAPurchaseAnswersAnEmptyLibrary(String action, boolean refresh) { Mockito.when(capabilities.purchaseState(HOST_ID, ORG_ID, USER_ID)).thenReturn(Mono.just(PurchaseState.NONE)); register(RELAY_URL, PUBLIC_URL); ObjectNode body = orgBody(ORG_ID); @@ -554,7 +554,7 @@ void statusWithoutAPurchaseAnswersAnEmptyLibrary(String action, boolean refresh) /** No purchase and {@code refresh}: the deliberate discovery relays a {@code status} lookup ({@code :129-132}). */ @Test - void statusRefreshWithoutAPurchaseAsksTheRelay() throws JsonProcessingException { + void statusRefreshWithoutAPurchaseAsksTheRelay() { Mockito.when(capabilities.purchaseState(HOST_ID, ORG_ID, USER_ID)).thenReturn(Mono.just(PurchaseState.NONE)); register(RELAY_URL, PUBLIC_URL); EntityExchangeResult result = exchange(STATUS, write(orgBody(ORG_ID).put(REFRESH_MEMBER, true))); @@ -573,7 +573,7 @@ void statusRefreshWithoutAPurchaseAsksTheRelay() throws JsonProcessingException */ @ParameterizedTest(name = "lookup finds a purchase={0}") @ValueSource(booleans = {true, false}) - void syncOfAnUnconfirmedPurchase(boolean found) throws JsonProcessingException { + void syncOfAnUnconfirmedPurchase(boolean found) { Mockito.when(capabilities.purchaseState(HOST_ID, ORG_ID, USER_ID)).thenReturn(Mono.just(PurchaseState.UNKNOWN)); AtomicReference> actionsAtTheRecord = new AtomicReference<>(); Mockito.when(capabilities.recordPurchaseStatus(HOST_ID, ORG_ID, USER_ID, found)) @@ -605,7 +605,7 @@ static Stream invalidAnswers() { /** An answer {@code relay} rejects ({@code :153-163}): the 503 of {@code :164-165}, and nothing recorded. */ @ParameterizedTest(name = "{0}") @MethodSource("invalidAnswers") - void relayAnswerThatIsNotValid(String name, String action, String relayAnswer) throws JsonProcessingException { + void relayAnswerThatIsNotValid(String name, String action, String relayAnswer) { relayAnswers(json(relayAnswer)); register(RELAY_URL, PUBLIC_URL); EntityExchangeResult result = exchange(action, write(CHECKOUT.equals(action) ? checkoutBody() : orgBody(ORG_ID))); @@ -662,8 +662,8 @@ private List receivedActions() { for (LoggedRequest request : wireMock.getWireMock().find(anyRequestedFor(anyUrl()))) { System.out.println("[EnterpriseLicenseControllerContractTest] relay received " + request.getBodyAsString()); try { - actions.add(PayloadAssertions.FIXTURE_EDITOR.readTree(request.getBodyAsString()).path(ACTION_MEMBER).asText()); - } catch (JsonProcessingException e) { + actions.add(PayloadAssertions.FIXTURE_EDITOR.readTree(request.getBodyAsString()).path(ACTION_MEMBER).asString()); + } catch (JacksonException e) { throw new IllegalStateException("the relay received a body that is not JSON: " + request.getBodyAsString(), e); } } @@ -732,7 +732,7 @@ private static OrgMember member(String orgId, MemberRole role) { return new OrgMember(orgId, USER_ID, role, MEMBER_STATE, JOIN_TIME); } - private static String write(JsonNode tree) throws JsonProcessingException { + private static String write(JsonNode tree) { return PayloadAssertions.FIXTURE_EDITOR.writeValueAsString(tree); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/GroupEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/GroupEndpointsContractTest.java index 02bfaa199..4b3c39670 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/GroupEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/GroupEndpointsContractTest.java @@ -1,7 +1,6 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -133,7 +132,7 @@ static void everyEndpointAndBranchHasATest() { * {@code allUsersGroup} false (an all-users group is a system group, whose name would be the localized one). */ @Test - void create() throws JsonProcessingException { + void create() { Mockito.when(groupApiService.create(any())).thenReturn(Mono.just(UserManagementSamples.groupViewGroup())); try (ContractTestClient client = client()) { EntityExchangeResult result = CONTRACT.exchange(client, "create", Map.of(), EndpointContract.d1(CreateGroupRequest.class)); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/JsLibraryEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/JsLibraryEndpointsContractTest.java index 68f62d66d..37465ef78 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/JsLibraryEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/JsLibraryEndpointsContractTest.java @@ -1,8 +1,8 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.ArrayNode; +import tools.jackson.databind.node.ObjectNode; import com.google.common.cache.LoadingCache; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; @@ -274,7 +274,7 @@ private static TreeMap resourceDownloadUrls() throws IOException TreeMap urls = new TreeMap<>(); for (JsonNode library : PayloadAssertions.FIXTURE_EDITOR.readTree(new String(resource.readAllBytes(), StandardCharsets.UTF_8))) { JsonNode url = library.path(DOWNLOAD_URL_PROPERTY); - urls.put(library.path(NAME_PROPERTY).asText(), url.isTextual() ? url.asText() : null); + urls.put(library.path(NAME_PROPERTY).asString(), url.isString() ? url.asString() : null); } return urls; } @@ -292,7 +292,7 @@ private static String dataSortedByName(String envelopeJson) throws IOException { if (envelope.get(EndpointContract.DATA) instanceof ArrayNode data) { List elements = new ArrayList<>(); data.forEach(elements::add); - elements.sort(Comparator.comparing(element -> element.path(NAME_PROPERTY).asText())); + elements.sort(Comparator.comparing(element -> element.path(NAME_PROPERTY).asString())); data.removeAll(); data.addAll(elements); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/LibraryQueryRecordEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/LibraryQueryRecordEndpointsContractTest.java index 458336921..714633a87 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/LibraryQueryRecordEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/LibraryQueryRecordEndpointsContractTest.java @@ -1,6 +1,5 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -123,7 +122,7 @@ void dslById() { /** {@link #dslById()} with the DSL as the store gives it back; the body is pinned in the stored output. */ @Test - void dslByIdAsStored() throws JsonProcessingException { + void dslByIdAsStored() { Map stored = StoredValues.dsl(representativeDsl()); GOLDEN.assertJson(ApplicationRecordEndpointsContractTest.STORED_OUTPUT, JsonUtils.getObjectMapper().writeValueAsString(stored)); assertDsl(stored, GOLDEN.read(ApplicationRecordEndpointsContractTest.STORED_OUTPUT)); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/OrganizationEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/OrganizationEndpointsContractTest.java index 6bfb6488b..0e1b6a104 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/OrganizationEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/OrganizationEndpointsContractTest.java @@ -1,7 +1,6 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -134,7 +133,7 @@ static void everyEndpointAndBranchHasATest() { * hands them in reverse order; the defaults sent explicitly, page 1 and size 0 (all). */ @Test - void getOrganizationByUser() throws JsonProcessingException { + void getOrganizationByUser() { Organization later = UserManagementSamples.orgViewOrganization(); later.setName(LATER_NAME_PREFIX + later.getName()); stubUserOrganizations(later, UserManagementSamples.orgViewOrganization()); @@ -151,7 +150,7 @@ void getOrganizationByUser() throws JsonProcessingException { /** An organization without a name compares as equal ({@code OrganizationController.getOrganizationByUser}'s comparator): the order stays. */ @Test - void getOrganizationByUserWithUnnamedOrganization() throws JsonProcessingException { + void getOrganizationByUserWithUnnamedOrganization() { Organization unnamed = UserManagementSamples.orgViewOrganization(); unnamed.setName(null); stubUserOrganizations(UserManagementSamples.orgViewOrganization(), unnamed); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/PluginRouteContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/PluginRouteContractTest.java index c01244689..dbb968fdf 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/PluginRouteContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/PluginRouteContractTest.java @@ -1,6 +1,5 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.ContractTestClient; import org.lowcoder.api.contract.support.MiscSamples; @@ -13,6 +12,7 @@ import org.mockito.Mockito; import org.springframework.http.MediaType; import org.springframework.test.web.reactive.server.EntityExchangeResult; +import tools.jackson.core.JacksonException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -84,7 +84,7 @@ private static String get(ContractTestClient client) { private static String firstInfo(String body) { try { return PayloadAssertions.FIXTURE_EDITOR.writeValueAsString(PayloadAssertions.FIXTURE_EDITOR.readTree(body).get(0).get(INFO)); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalStateException("the plugin list is not JSON: " + body, e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/QueryEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/QueryEndpointsContractTest.java index 92b87eedf..b7e11d9af 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/QueryEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/QueryEndpointsContractTest.java @@ -1,7 +1,6 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -113,7 +112,7 @@ void execute() { /** Without an application id, the request is a library query's, with the same answer. */ @Test - void executeLibraryQuery() throws JsonProcessingException { + void executeLibraryQuery() { Mockito.when(libraryQueryApiService.executeLibraryQuery(any(), any())).thenReturn(Mono.just(QuerySamples.queryExecutionResult())); ObjectNode request = (ObjectNode) PayloadAssertions.FIXTURE_EDITOR.readTree(EndpointContract.d1(QueryExecutionRequest.class)); request.remove(APPLICATION_ID); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/QueryFromNodeTimeoutAnswersTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/QueryFromNodeTimeoutAnswersTest.java index 8e9c99e5f..53c5fb5fe 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/QueryFromNodeTimeoutAnswersTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/QueryFromNodeTimeoutAnswersTest.java @@ -1,8 +1,9 @@ package org.lowcoder.api.contract.endpoint; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -92,7 +93,7 @@ class QueryFromNodeTimeoutAnswersTest { private static final int VIEW_CODE = 1; private static final String OK_QUERY_CODE = "OK"; private static final String DATA = "QueryFromNodeTimeoutAnswersTest.rows"; - private static final ObjectMapper MAPPER = new ObjectMapper(); + private static final ObjectMapper MAPPER = JsonMapper.builderWithJackson2Defaults().build(); private ContractTestClient.Builder builder; private final DatasourceConnectionPool pool = Mockito.mock(DatasourceConnectionPool.class); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/error/ErrorCasesContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/error/ErrorCasesContractTest.java index 4e32c3b45..37c654d71 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/error/ErrorCasesContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/error/ErrorCasesContractTest.java @@ -1,6 +1,6 @@ package org.lowcoder.api.contract.error; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -349,8 +349,8 @@ private static String assertError(EntityExchangeResult result, HttpStatu assertThat(body.path(CODE).isInt()).as("code is a JSON integer").isTrue(); assertThat(body.path(CODE).intValue()).isEqualTo(code); assertThat(body.path(SUCCESS).isBoolean() && !body.path(SUCCESS).booleanValue()).as("success is false").isTrue(); - assertThat(body.path(MESSAGE).asText()).isNotBlank(); - return body.path(MESSAGE).asText(); + assertThat(body.path(MESSAGE).asString()).isNotBlank(); + return body.path(MESSAGE).asString(); } private static void assertPinned(String errorCase, EntityExchangeResult result, HttpStatus status) { diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ApplicationPayloadGettersTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ApplicationPayloadGettersTest.java index 6e5a6b5b7..41cd418f9 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ApplicationPayloadGettersTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ApplicationPayloadGettersTest.java @@ -1,6 +1,5 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.ApplicationSamples; import org.lowcoder.api.contract.support.PayloadSamples; @@ -63,7 +62,7 @@ class ApplicationPayloadGettersTest { @Test @BoundarySites({"lowcoder-domain/src/main/java/org/lowcoder/domain/application/model/Application.java#Application.editingQueries#toJson#1", "lowcoder-domain/src/main/java/org/lowcoder/domain/application/model/Application.java#Application.editingQueries#fromJsonSet#1"}) - void editingQueries() throws JsonProcessingException { + void editingQueries() { Map dsl = dsl(EDITING_PREFIX); Set queries = application(dsl).getEditingQueries(); assertConverted("editingQueries", dsl, queries, EDITING_GOLDEN); @@ -72,7 +71,7 @@ void editingQueries() throws JsonProcessingException { @Test @BoundarySites({"lowcoder-domain/src/main/java/org/lowcoder/domain/application/model/Application.java#Application.getLiveQueries#toJson#1", "lowcoder-domain/src/main/java/org/lowcoder/domain/application/model/Application.java#Application.getLiveQueries#fromJsonSet#1"}) - void liveQueriesOfTheLatestRecord() throws JsonProcessingException { + void liveQueriesOfTheLatestRecord() { Map liveDsl = dsl(LIVE_PREFIX); Application application = application(dsl(EDITING_PREFIX)); ApplicationRecordService records = Mockito.mock(ApplicationRecordService.class); @@ -84,7 +83,7 @@ void liveQueriesOfTheLatestRecord() throws JsonProcessingException { @Test @BoundarySites({"lowcoder-domain/src/main/java/org/lowcoder/domain/application/model/Application.java#Application.getLiveQueries#toJson#1", "lowcoder-domain/src/main/java/org/lowcoder/domain/application/model/Application.java#Application.getLiveQueries#fromJsonSet#1"}) - void liveQueriesWithoutARecordAreTheEditingOnes() throws JsonProcessingException { + void liveQueriesWithoutARecordAreTheEditingOnes() { Map dsl = dsl(EDITING_PREFIX); Application application = application(dsl); ApplicationRecordService records = Mockito.mock(ApplicationRecordService.class); @@ -111,8 +110,7 @@ private static Application application(Map editingDsl) { } @SuppressWarnings("unchecked") - private static void assertConverted(String getter, Map dsl, Set queries, String golden) - throws JsonProcessingException { + private static void assertConverted(String getter, Map dsl, Set queries, String golden) { List sorted = new ArrayList<>(queries); sorted.sort(Comparator.comparing(ApplicationQuery::getId)); String written = JsonUtils.getObjectMapper().writeValueAsString(sorted); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/AuthConfigPolymorphismTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/AuthConfigPolymorphismTest.java index 24241bc96..641d8f8a9 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/AuthConfigPolymorphismTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/AuthConfigPolymorphismTest.java @@ -1,10 +1,13 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.exc.InvalidTypeIdException; -import com.fasterxml.jackson.databind.introspect.AnnotatedClass; -import com.fasterxml.jackson.databind.jsontype.NamedType; -import com.fasterxml.jackson.databind.node.ObjectNode; +import org.lowcoder.sdk.contract.JacksonIntrospection; +import tools.jackson.databind.MapperFeature; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.exc.InvalidTypeIdException; +import tools.jackson.databind.introspect.AnnotatedClass; +import tools.jackson.databind.json.JsonMapper; +import tools.jackson.databind.jsontype.NamedType; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.PayloadAssertions; import org.lowcoder.sdk.auth.AbstractAuthConfig; @@ -43,7 +46,7 @@ class AuthConfigPolymorphismTest { static final String UNKNOWN_ID = "AUTH_CONFIG_POLYMORPHISM_UNKNOWN"; static final String D1 = "D1"; - private static final ObjectMapper MAPPER = JsonUtils.getObjectMapper(); + private static final JsonMapper MAPPER = JsonUtils.getObjectMapper(); private static final GoldenJson GOLDEN = GoldenJson.forModule(); @Test @@ -78,7 +81,8 @@ void unknownAndMissingIdsFail() throws IOException { @Test void aBareMapperResolvesNoId() throws IOException { - ObjectMapper bare = new ObjectMapper(); + // parameter names on, as in production, so that the type definition resolves and only the registered subtypes are missing + ObjectMapper bare = JsonMapper.builderWithJackson2Defaults().enable(MapperFeature.DETECT_PARAMETER_NAMES).build(); for (Map.Entry id : registeredIds().entrySet()) { String input = withId(id.getValue(), id.getKey()); assertThatThrownBy(() -> bare.readValue(input, AbstractAuthConfig.class)).isInstanceOf(InvalidTypeIdException.class) @@ -89,9 +93,9 @@ void aBareMapperResolvesNoId() throws IOException { /** Registered id → class name, as the production mapper resolves them for {@link AbstractAuthConfig}. */ static Map registeredIds() { - AnnotatedClass base = MAPPER.getDeserializationConfig().introspectClassAnnotations(AbstractAuthConfig.class).getClassInfo(); + AnnotatedClass base = JacksonIntrospection.deserializationClass(MAPPER, MAPPER.constructType(AbstractAuthConfig.class)); Map ids = new TreeMap<>(); - for (NamedType subtype : MAPPER.getSubtypeResolver().collectAndResolveSubtypesByTypeId(MAPPER.getDeserializationConfig(), base)) { + for (NamedType subtype : JacksonIntrospection.subtypesByTypeId(MAPPER, base)) { if (subtype.hasName()) { ids.put(subtype.getName(), subtype.getType().getName()); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ContainerCoercionContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ContainerCoercionContractTest.java index 12e3589a2..f239d3e7f 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ContainerCoercionContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ContainerCoercionContractTest.java @@ -1,10 +1,11 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.databind.BeanDescription; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition; -import com.fasterxml.jackson.databind.jsontype.TypeSerializer; +import tools.jackson.databind.json.JsonMapper; +import tools.jackson.databind.BeanDescription; +import tools.jackson.databind.JavaType; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.introspect.BeanPropertyDefinition; +import tools.jackson.databind.jsontype.TypeSerializer; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.payload.ScalarCoercionContractTest.Mechanism; import org.lowcoder.api.contract.support.PayloadAssertions; @@ -59,7 +60,7 @@ class ContainerCoercionContractTest { static final String JSON_KEY = "json"; static final String NULL = "null"; - private static final ObjectMapper MAPPER = JsonUtils.getObjectMapper(); + private static final JsonMapper MAPPER = JsonUtils.getObjectMapper(); private static final GoldenJson GOLDEN = GoldenJson.forModule(); /** One (shape, mechanism) pair and the closure property that represents it. */ @@ -69,12 +70,12 @@ String body(String input) { // the serializer's resolver maps a class to its registered id; the deserializer's only ids to classes TypeSerializer typed; try { - typed = MAPPER.getSerializerProviderInstance().findTypeSerializer(owner); + typed = MAPPER._serializationContext().findTypeSerializer(owner); } catch (Exception e) { throw new IllegalStateException("type serializer of " + owner, e); } String typeId = typed == null ? "" - : "\"" + typed.getPropertyName() + "\": \"" + typed.getTypeIdResolver().idFromValueAndType(null, owner.getRawClass()) + "\", "; + : "\"" + typed.getPropertyName() + "\": \"" + typed.getTypeIdResolver().idFromValueAndType(MAPPER._serializationContext(), null, owner.getRawClass()) + "\", "; return "{" + typeId + "\"" + property.getName() + "\": " + input + "}"; } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/EnumGoldensTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/EnumGoldensTest.java index 05d02fea8..3411f7f5d 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/EnumGoldensTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/EnumGoldensTest.java @@ -1,7 +1,7 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.exc.InvalidFormatException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.exc.InvalidFormatException; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.lowcoder.api.contract.support.PayloadTypeWalker; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/EnvelopeGoldensTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/EnvelopeGoldensTest.java index 3e4789ed0..392697b0b 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/EnvelopeGoldensTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/EnvelopeGoldensTest.java @@ -1,6 +1,5 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.PayloadTypeWalker; import org.lowcoder.api.contract.support.PayloadTypeWalker.Property; @@ -97,8 +96,7 @@ void groupListResponseViewSuccess() throws IOException { } /** Writes {@code envelope}, compares it with its fixture and its names with the walker's, minus {@code nullProperties}. */ - private static void assertEnvelope(Class type, String envelopeCase, Object envelope, String... nullProperties) - throws JsonProcessingException { + private static void assertEnvelope(Class type, String envelopeCase, Object envelope, String... nullProperties) { String json = JsonUtils.getObjectMapper().writeValueAsString(envelope); String fixture = DIRECTORY + type.getSimpleName() + "." + envelopeCase + ".json"; System.out.println("[EnvelopeGoldensTest] " + fixture + ": " + json); @@ -107,7 +105,7 @@ private static void assertEnvelope(Class type, String envelopeCase, Object en .collect(Collectors.toCollection(TreeSet::new)); expectedNames.removeAll(Set.of(nullProperties)); Set names = new TreeSet<>(); - JsonUtils.getObjectMapper().readTree(json).fieldNames().forEachRemaining(names::add); + JsonUtils.getObjectMapper().readTree(json).propertyNames().iterator().forEachRemaining(names::add); assertThat(names).as("top-level names of " + fixture).isEqualTo(expectedNames); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/InstantContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/InstantContractTest.java index 19e6ac302..20062de4d 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/InstantContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/InstantContractTest.java @@ -1,7 +1,7 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/LibraryQueryPayloadGettersTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/LibraryQueryPayloadGettersTest.java index bb0d355d4..0733a518d 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/LibraryQueryPayloadGettersTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/LibraryQueryPayloadGettersTest.java @@ -1,6 +1,5 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.LibraryQuerySamples; import org.lowcoder.api.contract.support.PayloadSamples; @@ -54,7 +53,7 @@ class LibraryQueryPayloadGettersTest { @Test @BoundarySites({"lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQuery.java#LibraryQuery.baseQuerySupplier#toJson#1", "lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQuery.java#LibraryQuery.baseQuerySupplier#fromJson#1"}) - void libraryQueryQuery() throws JsonProcessingException { + void libraryQueryQuery() { Map dsl = dsl(LIBRARY_QUERY_PREFIX); BaseQuery query = LibraryQuery.builder().libraryQueryDSL(dsl).build().getQuery(); assertConverted("LibraryQuery#getQuery", dsl, query, LIBRARY_QUERY_GOLDEN); @@ -63,7 +62,7 @@ void libraryQueryQuery() throws JsonProcessingException { @Test @BoundarySites({"lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQueryRecord.java#LibraryQueryRecord.baseQuerySupplier#toJson#1", "lowcoder-domain/src/main/java/org/lowcoder/domain/query/model/LibraryQueryRecord.java#LibraryQueryRecord.baseQuerySupplier#fromJson#1"}) - void libraryQueryRecordQuery() throws JsonProcessingException { + void libraryQueryRecordQuery() { Map dsl = dsl(RECORD_PREFIX); BaseQuery query = LibraryQueryRecord.builder().libraryQueryDSL(dsl).build().getQuery(); assertConverted("LibraryQueryRecord#getQuery", dsl, query, RECORD_GOLDEN); @@ -97,8 +96,7 @@ private static Map query(Map dsl) { return (Map) dsl.get(LibraryQuerySamples.QUERY); } - private static void assertConverted(String getter, Map dsl, BaseQuery converted, String golden) - throws JsonProcessingException { + private static void assertConverted(String getter, Map dsl, BaseQuery converted, String golden) { String written = JsonUtils.getObjectMapper().writeValueAsString(converted); System.out.println("[LibraryQueryPayloadGettersTest] " + getter + ": written " + written.length() + " chars"); GOLDEN.assertJson(golden, written); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/PayloadSamplesAdequacyTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/PayloadSamplesAdequacyTest.java index 3573c47f4..fb4cf6884 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/PayloadSamplesAdequacyTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/PayloadSamplesAdequacyTest.java @@ -1,12 +1,13 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.introspect.AnnotatedClass; -import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition; -import com.fasterxml.jackson.databind.jsontype.NamedType; -import com.fasterxml.jackson.databind.node.TextNode; +import tools.jackson.databind.json.JsonMapper; +import org.lowcoder.sdk.contract.JacksonIntrospection; +import tools.jackson.databind.JavaType; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.introspect.AnnotatedClass; +import tools.jackson.databind.introspect.BeanPropertyDefinition; +import tools.jackson.databind.jsontype.NamedType; import lombok.Getter; import lombok.Setter; import org.junit.jupiter.api.BeforeAll; @@ -25,6 +26,7 @@ import org.lowcoder.sdk.auth.AbstractAuthConfig; import org.lowcoder.sdk.contract.CanonicalJson; import org.lowcoder.sdk.util.JsonUtils; +import tools.jackson.databind.node.StringNode; import java.lang.reflect.Modifier; import java.math.BigDecimal; @@ -80,7 +82,7 @@ class PayloadSamplesAdequacyTest { /** Rule-3 messages quote the first difference up to this length; the representative input is long. */ static final int MAX_DETAIL = 160; - private static final ObjectMapper MAPPER = JsonUtils.getObjectMapper(); + private static final JsonMapper MAPPER = JsonUtils.getObjectMapper(); private static Closure closure; /** A test-only type with one property of each rule-3 kind. */ @@ -124,7 +126,7 @@ void inadequateSamplesAreReported() { found.addAll(violations(sample(AuthConfigRequest.class, authConfig))); DynamicProbe notRepresentative = new DynamicProbe(); notRepresentative.setValue(Map.of("key", 1, "other", 2)); - notRepresentative.setNode(TextNode.valueOf("not the representative input")); + notRepresentative.setNode(StringNode.valueOf("not the representative input")); found.addAll(violations(sample(DynamicProbe.class, notRepresentative))); found.forEach(violation -> System.out.println("[PayloadSamplesAdequacyTest] broken sample: " + violation)); assertThat(found).anySatisfy(v -> assertThat(v).contains("Folder.name: rule 1")) @@ -329,9 +331,9 @@ static List compareSubtypes(Map> expected, Map concreteSubtypes(JavaType declared) { - AnnotatedClass annotated = MAPPER.getSerializationConfig().introspectClassAnnotations(declared).getClassInfo(); + AnnotatedClass annotated = JacksonIntrospection.serializationClass(MAPPER, declared); Set classes = new TreeSet<>(); - for (NamedType subtype : MAPPER.getSubtypeResolver().collectAndResolveSubtypesByClass(MAPPER.getSerializationConfig(), annotated)) { + for (NamedType subtype : JacksonIntrospection.subtypesByClass(MAPPER, annotated)) { Class type = subtype.getType(); if (!type.isInterface() && !Modifier.isAbstract(type.getModifiers())) { classes.add(type.getSimpleName()); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/QueryResultViewContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/QueryResultViewContractTest.java index 41866de1e..102e38d4c 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/QueryResultViewContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/QueryResultViewContractTest.java @@ -1,6 +1,5 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.ContractTestClient; import org.lowcoder.api.contract.support.EndpointContract; @@ -18,6 +17,7 @@ import org.springframework.http.MediaType; import org.springframework.test.web.reactive.server.EntityExchangeResult; import reactor.core.publisher.Mono; +import tools.jackson.core.JacksonException; import java.nio.charset.StandardCharsets; import java.util.Map; @@ -88,7 +88,7 @@ void mixedResultIsTheSameInAnotherTimeZone() { private static String write(QueryExecutionResult result) { try { return JsonUtils.toJsonThrows(new QueryResultView(result, QuerySamples.RESULT_LOCALE)); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalStateException("the production mapper cannot write the mixed result", e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/RepresentativeInputContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/RepresentativeInputContractTest.java index 432fb7387..0af5404e2 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/RepresentativeInputContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/RepresentativeInputContractTest.java @@ -1,9 +1,9 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.JavaType; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/RequestPayloadGoldensTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/RequestPayloadGoldensTest.java index 2684aab87..3f9b308d9 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/RequestPayloadGoldensTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/RequestPayloadGoldensTest.java @@ -1,11 +1,13 @@ package org.lowcoder.api.contract.payload; +import tools.jackson.databind.json.JsonMapper; +import org.lowcoder.sdk.contract.JacksonIntrospection; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.BeanDescription; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.BeanDescription; +import tools.jackson.databind.JavaType; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.introspect.BeanPropertyDefinition; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -67,7 +69,7 @@ class RequestPayloadGoldensTest { static final String VALUE_KEY = "value"; static final String BUILDER_DEFAULT_PREFIX = "$default$"; - private static final ObjectMapper MAPPER = JsonUtils.getObjectMapper(); + private static final JsonMapper MAPPER = JsonUtils.getObjectMapper(); private static final GoldenJson GOLDEN = GoldenJson.forModule(); private static Closure closure; @@ -103,7 +105,7 @@ void d1BindsTheFixtureToTheSample(Sample sample) throws IOException { Set expectedNames = deserializedProperties(sample.type()).stream().map(Property::name) .collect(Collectors.toCollection(TreeSet::new)); Set fixtureNames = new TreeSet<>(); - PayloadAssertions.FIXTURE_EDITOR.readTree(fixture).fieldNames().forEachRemaining(fixtureNames::add); + PayloadAssertions.FIXTURE_EDITOR.readTree(fixture).propertyNames().iterator().forEachRemaining(fixtureNames::add); assertThat(fixtureNames).as("D1 names of " + sample.name()).isEqualTo(expectedNames); } } @@ -111,8 +113,8 @@ void d1BindsTheFixtureToTheSample(Sample sample) throws IOException { @ParameterizedTest(name = "D2 {0}") @MethodSource("requestSamples") void d2IgnoredInputBindsToTheSameSample(Sample sample) throws IOException { - BeanDescription description = MAPPER.getDeserializationConfig().introspect(sample.type()); - JsonIgnoreProperties.Value ignorals = MAPPER.getDeserializationConfig() + BeanDescription description = JacksonIntrospection.deserialization(MAPPER, sample.type()); + JsonIgnoreProperties.Value ignorals = MAPPER.deserializationConfig() .getDefaultPropertyIgnorals(sample.type().getRawClass(), description.getClassInfo()); // Jackson collects properties, and with them the ignored names, lazily description.findProperties(); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ResponsePayloadGoldensTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ResponsePayloadGoldensTest.java index a06107449..efcfdca8a 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ResponsePayloadGoldensTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ResponsePayloadGoldensTest.java @@ -1,9 +1,8 @@ package org.lowcoder.api.contract.payload; +import tools.jackson.databind.json.JsonMapper; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import org.apache.commons.lang3.exception.ExceptionUtils; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -22,6 +21,7 @@ import org.lowcoder.sdk.contract.CanonicalJson; import org.lowcoder.sdk.contract.GoldenJson; import org.lowcoder.sdk.util.JsonUtils; +import tools.jackson.databind.DatabindException; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -85,7 +85,7 @@ class ResponsePayloadGoldensTest { static final String INDEX_OPEN = "["; static final String INDEX_CLOSE = "]"; - private static final ObjectMapper MAPPER = JsonUtils.getObjectMapper(); + private static final JsonMapper MAPPER = JsonUtils.getObjectMapper(); private static final GoldenJson GOLDEN = GoldenJson.forModule(); private static Closure closure; @@ -107,7 +107,7 @@ static Stream responseSamples() { @ParameterizedTest(name = "S1 {0}") @MethodSource("responseSamples") - void s1WritesTheSample(Sample sample) throws JsonProcessingException { + void s1WritesTheSample(Sample sample) { String output = write(sample, sample.value(), null); System.out.println("[ResponsePayloadGoldensTest] S1 " + sample.name() + " " + output); GOLDEN.assertJson(sample.fixture(S1), output); @@ -123,7 +123,7 @@ void s1WritesTheSample(Sample sample) throws JsonProcessingException { @ParameterizedTest(name = "views {0}") @MethodSource("responseSamples") - void viewsArePinnedWhereTheyChangeTheOutput(Sample sample) throws JsonProcessingException { + void viewsArePinnedWhereTheyChangeTheOutput(Sample sample) { String withoutView = write(sample, sample.value(), null); for (Map.Entry> view : VIEWS.entrySet()) { String output = write(sample, sample.value(), view.getValue()); @@ -149,7 +149,7 @@ void viewsArePinnedWhereTheyChangeTheOutput(Sample sample) throws JsonProcessing @ParameterizedTest(name = "S2 {0}") @MethodSource("responseSamples") - void s2NullsAsPinned(Sample sample) throws JsonProcessingException { + void s2NullsAsPinned(Sample sample) { if (sample.type().isContainerType()) { // a map or collection type has no properties to null: its entries are data, and S1 pins them System.out.println("[ResponsePayloadGoldensTest] S2 skips " + sample.name() + ": a map or collection type"); @@ -183,7 +183,7 @@ void s2NullsAsPinned(Sample sample) throws JsonProcessingException { * a nested bean and one of a list element, with distinct root causes. */ @Test - void failuresAreCollectedAtEveryDepth() throws JsonProcessingException { + void failuresAreCollectedAtEveryDepth() { Map failures = failures(new FailingHolder()); System.out.println("[ResponsePayloadGoldensTest] failures of FailingHolder: " + failures); assertThat(failures).containsExactlyEntriesOf(new TreeMap<>(Map.of( @@ -253,7 +253,7 @@ void unorderedArraysComeFromSetsWithoutStableOrder() throws ReflectiveOperationE * instance of that class, so where the same property of one class fails at several paths only the first is * found; a failure that is not inside a property (a list element's own serializer) fails the test. */ - static Map failures(Object probe) throws JsonProcessingException { + static Map failures(Object probe) { Map failures = new TreeMap<>(); Map, Set> ignored = new LinkedHashMap<>(); ObjectMapper mapper = MAPPER; @@ -261,20 +261,22 @@ static Map failures(Object probe) throws JsonProcessingException try { mapper.writeValueAsString(probe); return failures; - } catch (JsonMappingException e) { - List references = e.getPath(); + } catch (DatabindException e) { + List references = e.getPath(); String path = jsonPath(references); - JsonMappingException.Reference failing = references.isEmpty() ? null : references.get(references.size() - 1); - assertThat(failing != null && failing.getFieldName() != null && failing.getFrom() != null) + DatabindException.Reference failing = references.isEmpty() ? null : references.get(references.size() - 1); + assertThat(failing != null && failing.getPropertyName() != null && failing.from() != null) .as("the failure at '" + path + "' is not inside a property: " + e.getOriginalMessage()).isTrue(); - Class owner = failing.getFrom() instanceof Class type ? type : failing.getFrom().getClass(); - assertThat(ignored.computeIfAbsent(owner, ignoredOwner -> new TreeSet<>()).add(failing.getFieldName())) - .as("ignoring " + owner.getName() + "." + failing.getFieldName() + " did not remove its failure at " + path).isTrue(); + Class owner = failing.from() instanceof Class type ? type : failing.from().getClass(); + assertThat(ignored.computeIfAbsent(owner, ignoredOwner -> new TreeSet<>()).add(failing.getPropertyName())) + .as("ignoring " + owner.getName() + "." + failing.getPropertyName() + " did not remove its failure at " + path).isTrue(); failures.put(path, ExceptionUtils.getRootCause(e).getClass().getName()); - mapper = MAPPER.copy(); + JsonMapper.Builder rebuilt = MAPPER.rebuild(); for (Map.Entry, Set> entry : ignored.entrySet()) { - mapper.configOverride(entry.getKey()).setIgnorals(JsonIgnoreProperties.Value.forIgnoredProperties(entry.getValue())); + rebuilt.withConfigOverride(entry.getKey(), + override -> override.setIgnorals(JsonIgnoreProperties.Value.forIgnoredProperties(entry.getValue()))); } + mapper = rebuilt.build(); } } } @@ -284,20 +286,20 @@ static Map failures(Object probe) throws JsonProcessingException * array elements as {@code [index]}. Limit: a map key is written as a property name, so a key containing * {@value #PATH_SEPARATOR} reads like two levels. */ - static String jsonPath(List references) { + static String jsonPath(List references) { StringBuilder path = new StringBuilder(); - for (JsonMappingException.Reference reference : references) { - if (reference.getFieldName() == null) { + for (DatabindException.Reference reference : references) { + if (reference.getPropertyName() == null) { path.append(INDEX_OPEN).append(reference.getIndex()).append(INDEX_CLOSE); } else { - path.append(path.isEmpty() ? "" : PATH_SEPARATOR).append(reference.getFieldName()); + path.append(path.isEmpty() ? "" : PATH_SEPARATOR).append(reference.getPropertyName()); } } return path.toString(); } /** The sample written with {@code view} ({@code null}: none), its {@link PayloadAssertions#UNORDERED_ARRAYS} sorted. */ - private static String write(Sample sample, Object value, Class view) throws JsonProcessingException { + private static String write(Sample sample, Object value, Class view) { String output = view == null ? MAPPER.writeValueAsString(value) : MAPPER.writerWithView(view).writeValueAsString(value); return PayloadAssertions.sortUnorderedArrays(output, PayloadAssertions.UNORDERED_ARRAYS.getOrDefault(sample.name(), List.of())); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ScalarCoercionContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ScalarCoercionContractTest.java index 7fb62895a..3a1c3eb6a 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ScalarCoercionContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/ScalarCoercionContractTest.java @@ -1,9 +1,11 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.databind.BeanDescription; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition; +import tools.jackson.databind.json.JsonMapper; +import org.lowcoder.sdk.contract.JacksonIntrospection; +import tools.jackson.databind.BeanDescription; +import tools.jackson.databind.JavaType; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.introspect.BeanPropertyDefinition; import lombok.Getter; import lombok.Setter; import lombok.experimental.SuperBuilder; @@ -68,7 +70,7 @@ class ScalarCoercionContractTest { static final String VALUE_KEY = "value"; static final String NULL = "null"; - private static final ObjectMapper MAPPER = JsonUtils.getObjectMapper(); + private static final JsonMapper MAPPER = JsonUtils.getObjectMapper(); private static final GoldenJson GOLDEN = GoldenJson.forModule(); enum Mechanism { @@ -123,7 +125,7 @@ public static class BuilderProbe { /** The mechanism Jackson binds {@code property} of a request type with (see the class comment). */ static Mechanism mechanism(JavaType owner, BeanPropertyDefinition property) { - if (MAPPER.getDeserializationConfig().introspect(owner).findPOJOBuilder() != null) { + if (JacksonIntrospection.builderOf(MAPPER, JacksonIntrospection.deserialization(MAPPER, owner)) != null) { return Mechanism.BUILDER; } return property.getConstructorParameter() != null ? Mechanism.CREATOR : Mechanism.SETTER; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/UserManagementPayloadGettersTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/UserManagementPayloadGettersTest.java index 6a02afb28..cdae06c27 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/UserManagementPayloadGettersTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/payload/UserManagementPayloadGettersTest.java @@ -1,6 +1,5 @@ package org.lowcoder.api.contract.payload; -import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.OrganizationSamples; import org.lowcoder.api.contract.support.UserSamples; @@ -61,7 +60,7 @@ class UserManagementPayloadGettersTest { @BoundarySites({"lowcoder-domain/src/main/java/org/lowcoder/domain/user/model/User.java#User.beforeMongodbWrite#fromJsonSafely#1", "lowcoder-domain/src/main/java/org/lowcoder/domain/user/model/User.java#User.beforeMongodbWrite#toJsonSafely#1"}) @Test - void userBeforeMongodbWrite() throws JsonProcessingException { + void userBeforeMongodbWrite() { User user = UserSamples.user(); user.beforeMongodbWrite(CONTEXT); assertStored(USER_WRITE_GOLDEN, user.getApiKeys()); @@ -82,7 +81,7 @@ void userAfterMongodbRead() { @BoundarySites({"lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java#OrganizationDomain.beforeMongodbWrite#fromJsonSafely#1", "lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java#OrganizationDomain.beforeMongodbWrite#toJsonSafely#1"}) @Test - void organizationDomainBeforeMongodbWrite() throws JsonProcessingException { + void organizationDomainBeforeMongodbWrite() { Organization organization = OrganizationSamples.organization(); organization.beforeMongodbWrite(CONTEXT); assertStored(ORGANIZATION_DOMAIN_WRITE_GOLDEN, ReflectionTestUtils.getField(organization.getOrganizationDomain(), AUTH_CONFIGS_FIELD)); @@ -101,7 +100,7 @@ void organizationDomainAfterMongodbRead() { } /** The stored value against its golden, as JSON and as Java values. */ - private static void assertStored(String golden, Object stored) throws JsonProcessingException { + private static void assertStored(String golden, Object stored) { System.out.println("[UserManagementPayloadGettersTest] " + golden + ": stored " + stored); GOLDEN.assertJson(golden, JsonUtils.getObjectMapper().writeValueAsString(stored)); CanonicalJson.assertSameJava(javaValue(CanonicalJson.parse(GOLDEN.read(golden))), stored); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/EndpointContract.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/EndpointContract.java index 038b2676c..db444168b 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/EndpointContract.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/EndpointContract.java @@ -1,7 +1,6 @@ package org.lowcoder.api.contract.support; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.lowcoder.api.contract.support.ContractRegistry.Row; @@ -21,6 +20,7 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.reactive.function.BodyInserters; +import tools.jackson.core.JacksonException; import java.lang.reflect.Method; import java.nio.file.Files; @@ -396,7 +396,7 @@ private static String envelope(String golden, Map fields, String data } envelope.put(DATA, DATA_PLACEHOLDER); return PayloadAssertions.FIXTURE_EDITOR.writeValueAsString(envelope).replace("\"" + DATA_PLACEHOLDER + "\"", dataJson); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalStateException("cannot build the envelope from " + golden, e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/JsonBoundaryScanner.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/JsonBoundaryScanner.java index cc749896e..752ebac11 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/JsonBoundaryScanner.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/JsonBoundaryScanner.java @@ -47,6 +47,8 @@ public final class JsonBoundaryScanner { public static final String MAPPER_KIND = "mapper"; public static final String MAPPER_CALLEE = "new ObjectMapper"; + /** The Jackson 3 way to make a mapper: an immutable one is built from {@code JsonMapper.builder()}. */ + public static final String BUILDER_CALLEE = "JsonMapper.builder"; public static final String IMPORT_CALLEE = "import"; public static final String FILE_MEMBER = ""; public static final String INITIALIZER_MEMBER = ""; @@ -77,7 +79,7 @@ public final class JsonBoundaryScanner { .map(name -> Pattern.quote(name).replace(".", "\\E\\s*\\.\\s*\\Q")) .collect(Collectors.joining("|")); private static final Pattern CALL_PATTERN = Pattern.compile( - "(::\\s*)\\b(" + NAMES + ")\\b|\\b(" + NAMES + ")\\b\\s*\\(|\\bnew\\s+ObjectMapper\\s*\\(", FLAGS); + "(::\\s*)\\b(" + NAMES + ")\\b|\\b(" + NAMES + ")\\b\\s*\\(|\\bnew\\s+ObjectMapper\\s*\\(|\\bJsonMapper\\s*\\.\\s*builder(?:WithJackson2Defaults)?\\s*\\(", FLAGS); private static final String MODIFIERS = "(?:public|protected|private|static|final|default|synchronized|abstract)"; private static final String STATEMENT_KEYWORDS = "(?!(?:return|throw|new|else|case|yield|assert)\\b)"; private static final Pattern DECLARATION_PATTERN = Pattern.compile( @@ -92,8 +94,16 @@ public final class JsonBoundaryScanner { Pattern.DOTALL | FLAGS); private static final Pattern NON_NEWLINE = Pattern.compile("[^\\n]"); private static final Pattern WHITESPACE = Pattern.compile("\\s+", FLAGS); + /** + * The raw Jackson types of the sources: Jackson 3's ({@code tools.jackson}, what the sources use) and Jackson 2's + * ({@code com.fasterxml.jackson}, still matched so that a reintroduced import is classified like any other, and the + * control fixtures, which the Python prototype reads too, keep their meaning). + */ private static final String RAW_JACKSON_TYPES = - "com\\.fasterxml\\.jackson\\.databind\\.(?:JsonNode\\b|node\\.|ObjectMapper|ObjectReader|ObjectWriter|SerializerProvider" + "tools\\.jackson\\.databind\\.(?:JsonNode\\b|node\\.|ObjectMapper|ObjectReader|ObjectWriter|SerializationContext" + + "|ValueSerializer|ValueDeserializer|DeserializationContext|module\\.|cfg\\.|ser\\.|deser\\.)" + + "|tools\\.jackson\\.core\\.(?:JsonParser|JsonGenerator|json\\.JsonFactory)" + + "|com\\.fasterxml\\.jackson\\.databind\\.(?:JsonNode\\b|node\\.|ObjectMapper|ObjectReader|ObjectWriter|SerializerProvider" + "|JsonSerializer|JsonDeserializer|DeserializationContext|module\\.|cfg\\.|ser\\.|deser\\.)" + "|com\\.fasterxml\\.jackson\\.core\\.(?:JsonFactory|JsonParser|JsonGenerator)" + "|org\\.springframework\\.http\\.codec\\.json\\." @@ -124,7 +134,7 @@ private static Map> kinds() { "createGenerator")); kinds.put("codec-decode", List.of("bodyToMono", "bodyToFlux", "toEntity", "toEntityList")); kinds.put("codec-encode", List.of("bodyValue", "BodyInserters.fromValue")); - kinds.put("codec-config", List.of("codecs", "jackson2JsonEncoder", "jackson2JsonDecoder")); + kinds.put("codec-config", List.of("codecs", "jacksonJsonEncoder", "jacksonJsonDecoder", "jackson2JsonEncoder", "jackson2JsonDecoder")); kinds.put("mapper-access", List.of("getObjectMapper")); kinds.put(WRAPPER_KIND, List.of("renderMustacheJsonString", "renderMustacheArrayJsonString", "renderMustacheJson", "parseResultBody", "getConcatSqlStr")); @@ -265,7 +275,7 @@ private static List sitesIn(String relative, String code, List rawS callee = WHITESPACE.matcher(matcher.group(3)).replaceAll(""); kind = KIND_OF.get(callee); } else { - callee = MAPPER_CALLEE; + callee = matcher.group().startsWith("new") ? MAPPER_CALLEE : BUILDER_CALLEE; kind = MAPPER_KIND; } rawSites.add(new int[]{lineNumber, WRAPPER_SOURCE_KINDS.contains(kind) ? 1 : 0}); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadAssertions.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadAssertions.java index a5364feb8..6167fdffd 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadAssertions.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadAssertions.java @@ -1,20 +1,21 @@ package org.lowcoder.api.contract.support; -import com.fasterxml.jackson.core.JsonPointer; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.JsonNodeFactory; -import com.fasterxml.jackson.databind.util.ClassUtil; +import tools.jackson.databind.cfg.JsonNodeFeature; +import tools.jackson.core.JsonPointer; +import tools.jackson.databind.DeserializationFeature; +import tools.jackson.databind.JavaType; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.introspect.BeanPropertyDefinition; +import tools.jackson.databind.json.JsonMapper; +import tools.jackson.databind.node.ArrayNode; +import tools.jackson.databind.util.ClassUtil; import org.lowcoder.api.contract.support.PayloadSamples.Sample; import org.lowcoder.api.contract.support.PayloadTypeWalker.Direction; import org.lowcoder.domain.application.model.Application; import org.lowcoder.domain.bundle.model.BundleApplication; import org.lowcoder.sdk.contract.CanonicalJson; +import tools.jackson.core.JacksonException; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -39,8 +40,10 @@ public final class PayloadAssertions { /** Edits fixture trees without touching number lexemes ({@code 1.50} stays {@code 1.50}); not for duplicate keys. */ - public static final ObjectMapper FIXTURE_EDITOR = new ObjectMapper().enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS) - .setNodeFactory(JsonNodeFactory.withExactBigDecimals(true)); + public static final ObjectMapper FIXTURE_EDITOR = JsonMapper.builder() + .enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS) + .disable(JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROES) + .build(); /** * Type → JSON pointers (from the type's own output) of arrays that production writes from a {@code HashSet} of a @@ -76,7 +79,7 @@ public static String sortUnorderedArrays(String json, List pointers) { } } return FIXTURE_EDITOR.writeValueAsString(tree); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalArgumentException("not JSON: " + json, e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadSamples.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadSamples.java index de9c84118..dc2527f66 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadSamples.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadSamples.java @@ -1,7 +1,6 @@ package org.lowcoder.api.contract.support; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JavaType; +import tools.jackson.databind.JavaType; import org.lowcoder.api.application.ApplicationEndpoints.ApplicationAsAgencyProfileRequest; import org.lowcoder.api.application.ApplicationEndpoints.ApplicationPublicToAllRequest; import org.lowcoder.api.application.ApplicationEndpoints.ApplicationPublicToMarketplaceRequest; @@ -119,6 +118,7 @@ import org.lowcoder.sdk.models.DatasourceStructure.Table; import org.lowcoder.sdk.models.Param; import org.lowcoder.sdk.util.JsonUtils; +import tools.jackson.core.JacksonException; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -179,7 +179,7 @@ public static String representativeInputText() { public static Object representative(JavaType type) { try { return JsonUtils.getObjectMapper().readValue(representativeInputText(), type); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new IllegalStateException("the representative input does not bind to " + type, e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadTypeWalker.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadTypeWalker.java index eb69bb0b3..fb4801a05 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadTypeWalker.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadTypeWalker.java @@ -1,13 +1,15 @@ package org.lowcoder.api.contract.support; +import tools.jackson.databind.json.JsonMapper; +import org.lowcoder.sdk.contract.JacksonIntrospection; import com.fasterxml.jackson.annotation.JsonView; -import com.fasterxml.jackson.databind.BeanDescription; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.introspect.AnnotatedClass; -import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition; -import com.fasterxml.jackson.databind.jsontype.NamedType; +import tools.jackson.databind.BeanDescription; +import tools.jackson.databind.JavaType; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.introspect.AnnotatedClass; +import tools.jackson.databind.introspect.BeanPropertyDefinition; +import tools.jackson.databind.jsontype.NamedType; import org.lowcoder.api.ServerApplication; import org.lowcoder.api.framework.view.PageResponseView; import org.lowcoder.api.framework.view.ResponseView; @@ -96,7 +98,7 @@ public final class PayloadTypeWalker { private static final Set> ENVELOPES = Set.of(ResponseView.class, PageResponseView.class); private static final List LEAF_PACKAGE_PREFIXES = List.of("java.", "javax.", "jakarta.", "org.springframework.", "org.bson."); - private static final ObjectMapper MAPPER = JsonUtils.getObjectMapper(); + private static final JsonMapper MAPPER = JsonUtils.getObjectMapper(); public enum Direction { REQUEST, RESPONSE } @@ -285,10 +287,10 @@ private void visit(JavaType type, String endpointKey, Direction direction, Strin } } // subtypes belong to the value type, never to its @JsonPOJOBuilder class - AnnotatedClass annotatedClass = MAPPER.getSerializationConfig().introspectClassAnnotations(type).getClassInfo(); + AnnotatedClass annotatedClass = JacksonIntrospection.serializationClass(MAPPER, type); Collection subtypes = direction == Direction.RESPONSE - ? MAPPER.getSubtypeResolver().collectAndResolveSubtypesByClass(MAPPER.getSerializationConfig(), annotatedClass) - : MAPPER.getSubtypeResolver().collectAndResolveSubtypesByTypeId(MAPPER.getDeserializationConfig(), annotatedClass); + ? JacksonIntrospection.subtypesByClass(MAPPER, annotatedClass) + : JacksonIntrospection.subtypesByTypeId(MAPPER, annotatedClass); for (NamedType subtype : subtypes) { if (subtype.getType() != raw) { visit(MAPPER.getTypeFactory().constructType(subtype.getType()), endpointKey, direction, @@ -303,12 +305,12 @@ private void visit(JavaType type, String endpointKey, Direction direction, Strin */ public static BeanDescription beanDescription(JavaType type, Direction direction) { if (direction == Direction.RESPONSE) { - return MAPPER.getSerializationConfig().introspect(type); + return JacksonIntrospection.serialization(MAPPER, type); } - BeanDescription description = MAPPER.getDeserializationConfig().introspect(type); - Class builder = description.findPOJOBuilder(); + BeanDescription description = JacksonIntrospection.deserialization(MAPPER, type); + Class builder = JacksonIntrospection.builderOf(MAPPER, description); if (builder != null) { - return MAPPER.getDeserializationConfig().introspectForBuilder(MAPPER.getTypeFactory().constructType(builder), description); + return JacksonIntrospection.builderDescription(MAPPER, MAPPER.getTypeFactory().constructType(builder), description); } return description; } @@ -324,8 +326,8 @@ private record TypeRecord(Class type, Kind kind, Set directions, S static TypeRecord describe(JavaType type) { Class raw = type.getRawClass(); - BeanDescription deserialization = MAPPER.getDeserializationConfig().introspect(type); - Class builder = deserialization.findPOJOBuilder(); + BeanDescription deserialization = JacksonIntrospection.deserialization(MAPPER, type); + Class builder = JacksonIntrospection.builderOf(MAPPER, deserialization); SortedSet annotations = new TreeSet<>(JacksonAnnotationGuard.annotationNames(MAPPER, raw)); if (builder != null) { annotations.addAll(JacksonAnnotationGuard.annotationNames(MAPPER, builder)); @@ -334,7 +336,7 @@ static TypeRecord describe(JavaType type) { ? Arrays.stream(raw.getEnumConstants()).map(constant -> MAPPER.convertValue(constant, String.class)).toList() : List.of(); return new TypeRecord(raw, kind(raw), EnumSet.noneOf(Direction.class), new TreeSet<>(), annotations, builder, - raw.isEnum() ? List.of() : properties(MAPPER.getSerializationConfig().introspect(type), true), + raw.isEnum() ? List.of() : properties(JacksonIntrospection.serialization(MAPPER, type), true), raw.isEnum() ? List.of() : properties(beanDescription(type, Direction.REQUEST), false), enumValues); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadTypeWalkerTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadTypeWalkerTest.java index ca7ac1bb3..0fcdd4af0 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadTypeWalkerTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/PayloadTypeWalkerTest.java @@ -4,8 +4,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonView; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.lowcoder.api.contract.support.PayloadTypeWalker.Closure; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/QuerySamples.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/QuerySamples.java index 488dd6f7a..d35ab0102 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/QuerySamples.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/QuerySamples.java @@ -1,6 +1,6 @@ package org.lowcoder.api.contract.support; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.lowcoder.api.query.view.LibraryQueryRequestFromJs; import org.lowcoder.api.query.view.QueryExecutionRequest; import org.lowcoder.api.query.view.QueryResultView; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/WorkPackageStatus.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/WorkPackageStatus.java index 5a7d493d1..119422222 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/WorkPackageStatus.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/support/WorkPackageStatus.java @@ -1,9 +1,10 @@ package org.lowcoder.api.contract.support; -import com.fasterxml.jackson.databind.JsonNode; +import java.io.IOException; +import tools.jackson.databind.JsonNode; import org.lowcoder.sdk.util.JsonUtils; +import tools.jackson.core.JacksonException; -import java.io.IOException; import java.io.UncheckedIOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -30,8 +31,8 @@ public static Set done(Path root) { JsonNode status; try { status = JsonUtils.getObjectMapper().readTree(Files.readString(root.resolve(FILE), StandardCharsets.UTF_8)); - } catch (IOException e) { - throw new UncheckedIOException("cannot read " + FILE, e); + } catch (IOException | JacksonException e) { + throw new IllegalStateException("cannot read " + FILE, e); } JsonNode done = status.get(DONE_FIELD); if (done == null || !done.isArray()) { @@ -39,10 +40,10 @@ public static Set done(Path root) { } Set names = new TreeSet<>(); done.forEach(node -> { - if (!node.isTextual() || !WP_NAME.matcher(node.asText()).matches()) { + if (!node.isString() || !WP_NAME.matcher(node.asString()).matches()) { throw new IllegalStateException(FILE + ": not a work package name: " + node); } - names.add(node.asText()); + names.add(node.asString()); }); return names; } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandlerTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandlerTest.java index 4b20648c8..791a3bfc0 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandlerTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandlerTest.java @@ -37,8 +37,9 @@ import org.springframework.web.server.adapter.HttpWebHandlerAdapter; import org.springframework.web.server.handler.ExceptionHandlingWebHandler; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import com.mongodb.MongoExecutionTimeoutException; import com.mongodb.MongoSocketReadTimeoutException; import com.mongodb.MongoTimeoutException; @@ -61,7 +62,7 @@ class CustomErrorWebExceptionHandlerTest { private static final Duration WAIT = Duration.ofSeconds(10); - private static final ObjectMapper JSON = new ObjectMapper(); + private static final ObjectMapper JSON = JsonMapper.builderWithJackson2Defaults().build(); private static final String PATH = "/api/orders"; private static final String MALFORMED_ACCEPT_LANGUAGE = "not !! a language"; private static final String GERMAN = "de"; @@ -110,7 +111,7 @@ void clientError_keepsItsStatus_withTheReasonPhraseAsMessage() throws Exception assertThat(exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); assertThat(body.get("code").asInt()).isEqualTo(404); - assertThat(body.get("message").asText()).isEqualTo("Not Found"); + assertThat(body.get("message").asString()).isEqualTo("Not Found"); } /** Catches a business error losing its own status, code, localised message or headers. */ @@ -124,7 +125,7 @@ void bizException_usesItsStatusCodeLocalisedMessageAndHeaders() throws Exception assertThat(exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.TOO_MANY_REQUESTS); assertThat(body.get("code").asInt()).isEqualTo(BizError.REQUEST_THROTTLED.getBizErrorCode()); - assertThat(body.get("message").asText()).isEqualTo(LocaleUtils.getMessage(Locale.GERMAN, "REQUEST_THROTTLED")); + assertThat(body.get("message").asString()).isEqualTo(LocaleUtils.getMessage(Locale.GERMAN, "REQUEST_THROTTLED")); assertThat(exchange.getResponse().getHeaders().getFirst("X-ORG-ID")).isEqualTo("org-1"); verify(apiPerfHelper).perf(any(BizError.class), any()); } @@ -138,7 +139,7 @@ void bizException_withAcceptLanguageGermanAndAKeyTheGermanBundleLacks_answersThe assertThat(exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); assertThat(body.get("code").asInt()).isEqualTo(BizError.QUERY_EXECUTION_ERROR.getBizErrorCode()); - assertThat(body.get("message").asText()).isEqualTo(QUERY_EXECUTION_ERROR_ENGLISH); + assertThat(body.get("message").asString()).isEqualTo(QUERY_EXECUTION_ERROR_ENGLISH); } static Stream infrastructureErrors() { @@ -160,7 +161,7 @@ void infrastructureErrors_mapToTheirBusinessError(Throwable error, BizError expe assertThat(exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.valueOf(expected.getHttpErrorCode())); assertThat(body.get("code").asInt()).isEqualTo(expected.getBizErrorCode()); - assertThat(body.get("message").asText()).isEqualTo(LocaleUtils.getMessage(Locale.ENGLISH, messageKey)); + assertThat(body.get("message").asString()).isEqualTo(LocaleUtils.getMessage(Locale.ENGLISH, messageKey)); verify(apiPerfHelper).perf(expected, exchange.getRequest().getPath()); } @@ -181,13 +182,13 @@ void malformedAcceptLanguage_getsTheCodedErrorInEnglishBF144() throws Exception assertThat(malformed.getStatusCode()).isEqualTo(HttpStatus.TOO_MANY_REQUESTS); JsonNode body = JSON.readTree(malformedBody); assertThat(body.get("code").asInt()).isEqualTo(BizError.REQUEST_THROTTLED.getBizErrorCode()); - assertThat(body.get("message").asText()).isEqualTo(LocaleUtils.getMessage(Locale.ENGLISH, "REQUEST_THROTTLED")); + assertThat(body.get("message").asString()).isEqualTo(LocaleUtils.getMessage(Locale.ENGLISH, "REQUEST_THROTTLED")); MockServerHttpResponse valid = new MockServerHttpResponse(new DefaultDataBufferFactory()); chain.handle(MockServerHttpRequest.get(PATH).header(HttpHeaders.ACCEPT_LANGUAGE, GERMAN).build(), valid).block(WAIT); String validBody = valid.getBodyAsString().defaultIfEmpty("").block(WAIT); System.out.println("[CustomErrorWebExceptionHandlerTest] valid Accept-Language -> " + valid.getStatusCode() + " body '" + validBody + "'"); assertThat(valid.getStatusCode()).isEqualTo(HttpStatus.TOO_MANY_REQUESTS); - assertThat(JSON.readTree(validBody).get("message").asText()).isEqualTo(LocaleUtils.getMessage(Locale.GERMAN, "REQUEST_THROTTLED")); + assertThat(JSON.readTree(validBody).get("message").asString()).isEqualTo(LocaleUtils.getMessage(Locale.GERMAN, "REQUEST_THROTTLED")); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/home/FolderMoveUnknownGidThroughTheStackTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/home/FolderMoveUnknownGidThroughTheStackTest.java index 8aa12b6ec..967e84476 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/home/FolderMoveUnknownGidThroughTheStackTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/home/FolderMoveUnknownGidThroughTheStackTest.java @@ -1,7 +1,8 @@ package org.lowcoder.api.home; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -25,6 +26,7 @@ import org.springframework.test.web.reactive.server.EntityExchangeResult; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import tools.jackson.core.JacksonException; import java.lang.reflect.Constructor; import java.util.Arrays; @@ -67,7 +69,7 @@ public class FolderMoveUnknownGidThroughTheStackTest { static final String MOVE_URL = NewUrl.FOLDER_URL + "/move/" + APPLICATION_ID; static final String TARGET_PARAMETER = "targetFolderId"; static final int SUCCESS_CODE = 1; - static final ObjectMapper JSON = new ObjectMapper(); + static final ObjectMapper JSON = JsonMapper.builderWithJackson2Defaults().build(); private ContractTestClient client; @@ -140,7 +142,7 @@ private JsonNode put(String targetFolderId, HttpStatus expectedStatus) { System.out.println(TAG + "PUT " + MOVE_URL + " " + TARGET_PARAMETER + "=" + targetFolderId + " -> " + result.getStatus() + " " + body); return body; - } catch (java.io.IOException e) { + } catch (JacksonException e) { throw new IllegalStateException("response is not JSON", e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/home/FolderUnknownGidOperationsProbeTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/home/FolderUnknownGidOperationsProbeTest.java index b7e975a65..dd4294d8e 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/home/FolderUnknownGidOperationsProbeTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/home/FolderUnknownGidOperationsProbeTest.java @@ -1,7 +1,8 @@ package org.lowcoder.api.home; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -11,6 +12,7 @@ import org.lowcoder.domain.folder.repository.FolderRepository; import org.lowcoder.domain.permission.model.ResourceRole; import reactor.test.publisher.PublisherProbe; +import tools.jackson.core.JacksonException; import org.lowcoder.domain.folder.service.FolderElementRelationService; import org.lowcoder.domain.folder.service.FolderService; import org.lowcoder.domain.folder.service.FolderServiceImpl; @@ -69,7 +71,7 @@ public class FolderUnknownGidOperationsProbeTest { static final String USER_ID = "user-id"; static final String ROLE_VALUE = "viewer"; static final String FOLDERS = NewUrl.FOLDER_URL + "/"; - static final ObjectMapper JSON = new ObjectMapper(); + static final ObjectMapper JSON = JsonMapper.builderWithJackson2Defaults().build(); /** The HTTP status and the {@code code} of the envelope. */ record Outcome(int status, int code) { @@ -169,7 +171,7 @@ private Outcome call(String label, HttpMethod method, String path, Object body) Outcome outcome = new Outcome(result.getStatus().value(), json.get("code").asInt()); System.out.println(TAG + label + " -> " + outcome + " " + json); return outcome; - } catch (java.io.IOException e) { + } catch (JacksonException e) { throw new IllegalStateException("response is not JSON", e); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsIntegrationTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsIntegrationTest.java index 7d702ff8b..97449a924 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsIntegrationTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/plugin/ShadedPluginJarsIntegrationTest.java @@ -1,7 +1,8 @@ package org.lowcoder.api.plugin; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import com.icegreen.greenmail.configuration.GreenMailConfiguration; import com.icegreen.greenmail.util.GreenMail; import com.icegreen.greenmail.util.ServerSetup; @@ -80,7 +81,7 @@ public class ShadedPluginJarsIntegrationTest { static final String TAG = "[ShadedPluginJarsIntegrationTest] "; static final Duration TIMEOUT = Duration.ofSeconds(60); static final String QUERY_CODE_OK = "OK"; - static final ObjectMapper JSON = new ObjectMapper(); + static final ObjectMapper JSON = JsonMapper.builderWithJackson2Defaults().build(); static final String POSTGRES = "postgres-plugin"; static final String MYSQL = "mysql-plugin"; @@ -552,11 +553,11 @@ public void restApiPluginRunsFromItsShadedJar() throws Exception { QueryExecutionResult created = datasource.run(connection, write); assertEquals(QUERY_CODE_OK, created.getQueryCode()); assertEquals(7, ((JsonNode) created.getData()).path("id").asInt(), "the POST answer is returned as JSON"); - assertEquals("widget", ((JsonNode) created.getData()).path("created").path("name").asText(), "the server received the body that was written"); + assertEquals("widget", ((JsonNode) created.getData()).path("created").path("name").asString(), "the server received the body that was written"); QueryExecutionResult read = datasource.run(connection, Map.of("httpMethod", "GET", "path", REST_ITEMS_PATH)); assertEquals(QUERY_CODE_OK, read.getQueryCode()); - assertEquals("widget", ((JsonNode) read.getData()).path("items").path(0).path("name").asText(), "the GET answer is returned as JSON"); + assertEquals("widget", ((JsonNode) read.getData()).path("items").path(0).path("name").asString(), "the GET answer is returned as JSON"); } finally { datasource.destroy(connection); } @@ -576,17 +577,17 @@ public void graphqlPluginRunsFromItsShadedJar() throws Exception { try { QueryExecutionResult mutation = datasource.run(connection, Map.of("path", GRAPHQL_PATH, "body", "mutation { addHero(name: \"x\") { id } }", "variables", List.of())); assertEquals(QUERY_CODE_OK, mutation.getQueryCode()); - assertEquals("42", ((JsonNode) mutation.getData()).path("data").path("addHero").path("id").asText(), "the mutation answer is returned"); + assertEquals("42", ((JsonNode) mutation.getData()).path("data").path("addHero").path("id").asString(), "the mutation answer is returned"); QueryExecutionResult query = datasource.run(connection, Map.of("path", GRAPHQL_PATH, "body", "query { hero { name } }", "variables", List.of())); assertEquals(QUERY_CODE_OK, query.getQueryCode()); - assertEquals("R2-D2", ((JsonNode) query.getData()).path("data").path("hero").path("name").asText(), "the query answer is returned"); + assertEquals("R2-D2", ((JsonNode) query.getData()).path("data").path("hero").path("name").asString(), "the query answer is returned"); } finally { datasource.destroy(connection); } List requests = graphqlServer.requests().subList(before, graphqlServer.requests().size()); assertEquals(2, requests.size()); - assertTrue(JSON.readTree(requests.get(0).bodyText()).path("query").asText().startsWith("mutation"), "the first request carried the mutation: " + requests.get(0).bodyText()); - assertTrue(JSON.readTree(requests.get(1).bodyText()).path("query").asText().startsWith("query"), "the second request carried the query: " + requests.get(1).bodyText()); + assertTrue(JSON.readTree(requests.get(0).bodyText()).path("query").asString().startsWith("mutation"), "the first request carried the mutation: " + requests.get(0).bodyText()); + assertTrue(JSON.readTree(requests.get(1).bodyText()).path("query").asString().startsWith("query"), "the second request carried the query: " + requests.get(1).bodyText()); } } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/query/PagedEndpointPageNumZeroThroughTheStackTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/query/PagedEndpointPageNumZeroThroughTheStackTest.java index c3a75cbac..26846f372 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/query/PagedEndpointPageNumZeroThroughTheStackTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/query/PagedEndpointPageNumZeroThroughTheStackTest.java @@ -1,7 +1,8 @@ package org.lowcoder.api.query; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -14,6 +15,7 @@ import org.springframework.http.HttpStatus; import org.springframework.test.web.reactive.server.EntityExchangeResult; import reactor.core.publisher.Mono; +import tools.jackson.core.JacksonException; import java.util.List; @@ -53,7 +55,7 @@ public class PagedEndpointPageNumZeroThroughTheStackTest { /** {@code ILLEGAL_PAGE_NUMBER} in {@code locale_en.properties}. */ static final String INVALID_PAGE_NUMBER_MESSAGE = "Invalid page number."; static final int SUCCESS_CODE = 1; - static final ObjectMapper JSON = new ObjectMapper(); + static final ObjectMapper JSON = JsonMapper.builderWithJackson2Defaults().build(); private ContractTestClient client; private LibraryQueryApiService libraryQueryApiService; @@ -93,7 +95,7 @@ private JsonNode get(Integer pageNum, Integer pageSize, HttpStatus expectedStatu System.out.println(TAG + "GET " + LIST_URL + " " + PAGE_NUM + "=" + pageNum + " " + PAGE_SIZE + "=" + pageSize + " -> " + result.getStatus() + " " + body); return body; - } catch (java.io.IOException e) { + } catch (JacksonException e) { throw new IllegalStateException("response is not JSON", e); } } @@ -101,7 +103,7 @@ private JsonNode get(Integer pageNum, Integer pageSize, HttpStatus expectedStatu /** Asserts the BF-153 parameter error: HTTP 500 (set by the test's {@code get}), code 5002, the English message, no data. */ private static void assertInvalidPageNumber(JsonNode body) { assertEquals(BizError.INVALID_PARAMETER.getBizErrorCode(), body.get("code").asInt()); - assertEquals(INVALID_PAGE_NUMBER_MESSAGE, body.get("message").asText()); + assertEquals(INVALID_PAGE_NUMBER_MESSAGE, body.get("message").asString()); assertTrue(body.get("data") == null || body.get("data").isNull()); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/EnterpriseLicenseControllerTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/EnterpriseLicenseControllerTest.java index 791ba6706..74fe72026 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/EnterpriseLicenseControllerTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/EnterpriseLicenseControllerTest.java @@ -1,11 +1,13 @@ package org.lowcoder.api.subscription; -import com.fasterxml.jackson.databind.*; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import org.junit.jupiter.api.*; import org.lowcoder.api.home.SessionUserService; import org.lowcoder.domain.enterprise.EnterpriseLicenseCapabilityService; import org.lowcoder.domain.enterprise.EnterpriseLicenseCapabilityService.PurchaseState; import org.lowcoder.api.contract.support.ContractHarness; -import org.lowcoder.sdk.webclient.Jackson2ClientCodecs; +import org.lowcoder.sdk.webclient.JacksonClientCodecs; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.web.reactive.function.client.WebClientResponseException; @@ -24,7 +26,7 @@ import static org.mockito.Mockito.*; class EnterpriseLicenseControllerTest { - final ObjectMapper mapper = new ObjectMapper(); + final ObjectMapper mapper = JsonMapper.builderWithJackson2Defaults().build(); final SessionUserService sessions = mock(SessionUserService.class); final ConfigCenter config = mock(ConfigCenter.class,withSettings().defaultAnswer(RETURNS_DEEP_STUBS)); final EnterpriseLicenseCapabilityService capabilities = mock(EnterpriseLicenseCapabilityService.class); @@ -38,13 +40,12 @@ JsonNode relayResult() { JsonNode emptyLibrary() { return mapper.valueToTree(Map.of("success", true, "orders", List.of(), "licenses", List.of())); } final List contexts = new ArrayList<>(); WebTestClient webClient() { - // the production server codecs: the request body is a Jackson 2 JsonNode + // the production server codecs var context = ContractHarness.codecContext(); contexts.add(context); context.registerBean(EnterpriseLicenseController.class, () -> controller); context.refresh(); - // the request body is a Jackson 2 JsonNode, which the default client codecs (Jackson 3) would not write as its content - return WebTestClient.bindToApplicationContext(context).configureClient().codecs(Jackson2ClientCodecs::apply).build(); + return WebTestClient.bindToApplicationContext(context).configureClient().codecs(JacksonClientCodecs::apply).build(); } @AfterEach void closeContexts() { contexts.forEach(AnnotationConfigApplicationContext::close); } @BeforeEach void setup() { @@ -81,7 +82,7 @@ WebTestClient webClient() { assertThrows(ResponseStatusException.class,()->controller.request("sync",body,request).block()); verify(controller,never()).send(anyMap(),eq("private-test-token")); } @Test void firstDeploymentCannotBeSubstituted() { - ((com.fasterxml.jackson.databind.node.ObjectNode)body).set("deploymentIds",mapper.valueToTree(List.of("foreign"))); + ((tools.jackson.databind.node.ObjectNode)body).set("deploymentIds",mapper.valueToTree(List.of("foreign"))); assertThrows(ResponseStatusException.class,()->controller.request("checkout",body,request).block()); verify(controller,never()).send(anyMap(),eq("private-test-token")); } @Test void downloadScopeCannotBeOverriddenByRequestFields() { @@ -99,7 +100,7 @@ WebTestClient webClient() { @Test void localCheckoutAndPortalCanReturnToTheDevelopmentUi() { controller=mock(EnterpriseLicenseController.class,withSettings().useConstructor(sessions,config,capabilities,"https://flow.example/webhook/enterprise","").defaultAnswer(CALLS_REAL_METHODS)); for (String origin:List.of("http://localhost:8000", "http://127.0.0.1:8000", "http://[::1]:8000", "https://ui.example")) { - ((com.fasterxml.jackson.databind.node.ObjectNode)body).put("returnOrigin",origin); + ((tools.jackson.databind.node.ObjectNode)body).put("returnOrigin",origin); doAnswer(call->{ Map p=call.getArgument(0); assertEquals(origin+"/setting/subscription?enterpriseLicense=return",p.get("returnUrl")); return Mono.just(relayResult()); }).when(controller).send(anyMap(),eq("private-test-token")); @@ -110,7 +111,7 @@ WebTestClient webClient() { for (String publicUrl : List.of("https://app.lowcoder.cloud", "https://APP.LOWCODER.CLOUD/", "https://app.lowcoder.cloud.:443/")) { controller = mock(EnterpriseLicenseController.class,withSettings() .useConstructor(sessions,config,capabilities,"https://flow.example/webhook/enterprise",publicUrl).defaultAnswer(CALLS_REAL_METHODS)); - ((com.fasterxml.jackson.databind.node.ObjectNode)body).put("returnOrigin", "https://self-hosted.example"); + ((tools.jackson.databind.node.ObjectNode)body).put("returnOrigin", "https://self-hosted.example"); ResponseStatusException error = assertThrows(ResponseStatusException.class, () -> controller.request("checkout",body,request).block()); assertEquals(HttpStatus.FORBIDDEN, error.getStatusCode()); verify(controller,never()).send(anyMap(),anyString()); @@ -120,7 +121,7 @@ WebTestClient webClient() { @Test void publicCloudRequestHostRejectsCheckoutWithoutPublicUrlConfiguration() { controller = mock(EnterpriseLicenseController.class,withSettings() .useConstructor(sessions,config,capabilities,"https://flow.example/webhook/enterprise","").defaultAnswer(CALLS_REAL_METHODS)); - ((com.fasterxml.jackson.databind.node.ObjectNode)body).put("returnOrigin", "https://self-hosted.example"); + ((tools.jackson.databind.node.ObjectNode)body).put("returnOrigin", "https://self-hosted.example"); ServerHttpRequest cloudRequest = MockServerHttpRequest.post("https://app.lowcoder.cloud/api/enterprise-licenses/checkout").build(); ResponseStatusException error = assertThrows(ResponseStatusException.class, () -> controller.request("checkout",body,cloudRequest).block()); assertEquals(HttpStatus.FORBIDDEN, error.getStatusCode()); @@ -128,7 +129,7 @@ WebTestClient webClient() { verifyNoInteractions(capabilities); } @Test void publicCloudReturnOriginCannotStartCheckoutThroughAnInternalHost() { - ((com.fasterxml.jackson.databind.node.ObjectNode)body).put("returnOrigin", "https://app.lowcoder.cloud"); + ((tools.jackson.databind.node.ObjectNode)body).put("returnOrigin", "https://app.lowcoder.cloud"); ResponseStatusException error = assertThrows(ResponseStatusException.class, () -> controller.request("checkout",body,request).block()); assertEquals(HttpStatus.FORBIDDEN, error.getStatusCode()); verify(controller,never()).send(anyMap(),anyString()); @@ -157,7 +158,7 @@ WebTestClient webClient() { for (String origin:List.of("http://example.test", "http://localhost.evil.test", "http://127.0.0.1.evil.test", "http://localhost@evil.test", "http://evil.test@localhost", "http://192.168.1.2:8000", "http://localhost:0", "http://localhost:65536", "http://localhost:8000/other", "http://localhost?next=elsewhere", "http://localhost#other", "file:///tmp")) { - ((com.fasterxml.jackson.databind.node.ObjectNode)body).put("returnOrigin",origin); + ((tools.jackson.databind.node.ObjectNode)body).put("returnOrigin",origin); assertThrows(ResponseStatusException.class,()->controller.request("checkout",body,request).block(),origin); } verify(controller,never()).send(anyMap(),anyString()); @@ -174,7 +175,7 @@ WebTestClient webClient() { @Test void openingLibraryExplicitlyCanDiscoverAnExistingPurchase() { when(capabilities.purchaseState("real-deployment", "org", "real-admin")).thenReturn(Mono.just(PurchaseState.NONE)); - ((com.fasterxml.jackson.databind.node.ObjectNode) body).put("refresh", true); + ((tools.jackson.databind.node.ObjectNode) body).put("refresh", true); controller.request("status", body, request).block(); verify(controller).send(argThat(p -> "status".equals(p.get("action"))), anyString()); verify(capabilities).recordPurchaseStatus("real-deployment", "org", "real-admin", true); @@ -247,7 +248,7 @@ WebTestClient webClient() { @Test void authorizationAndValidationKeepTheirHttpStatus() { WebTestClient client = webClient(); - ((com.fasterxml.jackson.databind.node.ObjectNode) body).set("deploymentIds", mapper.valueToTree(List.of("foreign"))); + ((tools.jackson.databind.node.ObjectNode) body).set("deploymentIds", mapper.valueToTree(List.of("foreign"))); client.post().uri("/api/enterprise-licenses/checkout").bodyValue(body).exchange().expectStatus().isBadRequest(); when(sessions.getVisitorOrgMember()).thenReturn(Mono.just(new OrgMember("org", "real-admin", MemberRole.MEMBER, "normal", 0))); client.post().uri("/api/enterprise-licenses/status").bodyValue(body).exchange().expectStatus().isForbidden(); diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/RedirectedEnterpriseLicenseController.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/RedirectedEnterpriseLicenseController.java index 8e6bef97c..74441e155 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/RedirectedEnterpriseLicenseController.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/RedirectedEnterpriseLicenseController.java @@ -1,6 +1,6 @@ package org.lowcoder.api.subscription; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.lowcoder.api.contract.support.WebClientRedirect; import org.lowcoder.api.home.SessionUserService; import org.lowcoder.domain.enterprise.EnterpriseLicenseCapabilityService; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/RedirectedWorkspaceSeatSyncService.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/RedirectedWorkspaceSeatSyncService.java index b7bdfef5d..6947d9254 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/RedirectedWorkspaceSeatSyncService.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/RedirectedWorkspaceSeatSyncService.java @@ -1,6 +1,6 @@ package org.lowcoder.api.subscription; -import com.fasterxml.jackson.databind.JsonNode; +import tools.jackson.databind.JsonNode; import org.lowcoder.api.contract.support.WebClientRedirect; import org.lowcoder.api.home.SessionUserService; import org.lowcoder.sdk.config.dynamic.ConfigCenter; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/WorkspaceSeatSyncServiceTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/WorkspaceSeatSyncServiceTest.java index 52a753699..79578ed80 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/WorkspaceSeatSyncServiceTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/subscription/WorkspaceSeatSyncServiceTest.java @@ -1,6 +1,7 @@ package org.lowcoder.api.subscription; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.lowcoder.api.home.SessionUserService; @@ -40,7 +41,7 @@ class WorkspaceSeatSyncServiceTest { Map snapshot = call.getArgument(0); assertEquals("host", snapshot.get("hostId")); assertEquals(3, snapshot.get("quantity")); - return Mono.just(new ObjectMapper().valueToTree(Map.of("success", true, "quantity", 3, + return Mono.just(JsonMapper.builderWithJackson2Defaults().build().valueToTree(Map.of("success", true, "quantity", 3, "requestId", snapshot.get("requestId")))); }).when(service).send(anyMap()); String response = new ApiFlowController(service).flow(new FlowRequest(WorkspaceSeatSyncService.FLOW_PATH, @@ -88,7 +89,7 @@ class WorkspaceSeatSyncServiceTest { } @Test void mismatchedConfirmationIsNotReportedAsSuccess() { - doReturn(Mono.just(new ObjectMapper().valueToTree(Map.of("success", true, "quantity", 3, "requestId", "wrong")))) + doReturn(Mono.just(JsonMapper.builderWithJackson2Defaults().build().valueToTree(Map.of("success", true, "quantity", 3, "requestId", "wrong")))) .when(service).send(anyMap()); assertThrows(IllegalStateException.class, () -> service.synchronize("workspace").block()); verify(redis, never()).execute(any(), anyList(), anyList()); diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv b/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv index 5483367f0..251241f24 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary-sites/json-boundary-sites.tsv @@ -29,7 +29,7 @@ lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/G lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryConfig.java:49 toJson test:config-binding lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryConfig.java#GraphQLQueryConfig.from#toJson#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java:138 toJson not-jackson org.bson.Document#toJson lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java#MongoPlugin.MongoEngine.executeQuery#toJson#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java:285 toJson test:downstream-render JSON-quoting of a Mongo query argument lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java#MongoPlugin.MongoEngine.removeOrAddQuotesAroundSpecialTypes#toJson#1 -lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java:71 new ObjectMapper unreachable field declared and never used (no other reference to objectMapper in lowcoder-plugins/mongoPlugin) lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java#MongoCommand.objectMapper#new ObjectMapper#1 +lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java:71 JsonMapper.builder unreachable field declared and never used (no other reference to objectMapper in lowcoder-plugins/mongoPlugin) lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java#MongoCommand.objectMapper#JsonMapper.builder#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/model/MongoDatasourceConfig.java:72 fromJson test:config-binding lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/model/MongoDatasourceConfig.java#MongoDatasourceConfig.buildFrom#fromJson#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/model/MongoDatasourceConfig.java:72 toJson test:config-binding lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/model/MongoDatasourceConfig.java#MongoDatasourceConfig.buildFrom#toJson#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/utils/MongoQueryUtils.java:158 readTree test:external-json lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/utils/MongoQueryUtils.java#MongoQueryUtils.parseResultBody#readTree#1 @@ -81,7 +81,7 @@ lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/http/RawHttpHandlerHelper.jav lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/http/RawHttpHandlerHelper.java:49 BodyInserters.fromValue not-jackson String body lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/http/RawHttpHandlerHelper.java#RawHttpHandlerHelper.buildBodyInserter#BodyInserters.fromValue#4 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/mysql/MysqlDatasourceConfig.java:34 fromJson test:config-binding lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/mysql/MysqlDatasourceConfig.java#MysqlDatasourceConfig.buildFrom#fromJson#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/mysql/MysqlDatasourceConfig.java:34 toJson test:config-binding lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/mysql/MysqlDatasourceConfig.java#MysqlDatasourceConfig.buildFrom#toJson#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:63 new ObjectMapper unreachable field assigned and configured but never read (DataUtils.java:55, :63-64 are its only references) lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java#DataUtils.DataUtils#new ObjectMapper#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:63 JsonMapper.builder unreachable field assigned and configured but never read (DataUtils.java:55, :63-64 are its only references) lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java#DataUtils.DataUtils#JsonMapper.builder#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:77 BodyInserters.fromValue not-jackson byte[] body lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java#DataUtils.buildBodyInserter#BodyInserters.fromValue#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:83 BodyInserters.fromValue not-jackson byte[] body lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java#DataUtils.buildBodyInserter#BodyInserters.fromValue#2 lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:85 BodyInserters.fromValue not-jackson String form data lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java#DataUtils.buildBodyInserter#BodyInserters.fromValue#3 @@ -117,7 +117,7 @@ lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/Organizatio lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java:33 toJsonSafely test:payload-getters lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java#OrganizationDomain.beforeMongodbWrite#toJsonSafely#1 lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java:38 fromJsonSafely test:payload-getters lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java#OrganizationDomain.afterMongodbRead#fromJsonSafely#1 lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java:38 toJson test:payload-getters lowcoder-domain/src/main/java/org/lowcoder/domain/organization/model/OrganizationDomain.java#OrganizationDomain.afterMongodbRead#toJson#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:65 new ObjectMapper test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.OBJECT_MAPPER#new ObjectMapper#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:65 JsonMapper.builder test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.OBJECT_MAPPER#JsonMapper.builder#1 lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:85 bodyValue test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.getPluginDynamicConfig#bodyValue#1 lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:88 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.getPluginDynamicConfig#bodyToMono#1 lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:115 bodyToMono test:node-service lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.getDatasourcePluginDefinitions#bodyToMono#1 @@ -151,7 +151,7 @@ lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceI lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java:71 fromJson test:config-center config-center value parsed from JSON text lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java#AutoReloadConfigInstanceImpl.fromJson#fromJson#1 lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java:76 fromJsonList test:config-center config-center value parsed from JSON text lowcoder-infra/src/main/java/org/lowcoder/infra/config/AutoReloadConfigInstanceImpl.java#AutoReloadConfigInstanceImpl.fromJsonList#fromJsonList#1 lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java:34 toJson log lowcoder-infra/src/main/java/org/lowcoder/infra/util/NetworkUtils.java#NetworkUtils.getRemoteIp#toJson#1 -lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java:34 new ObjectMapper test:marketplace-render the snapshot mapper, ORDER_MAP_ENTRIES_BY_KEYS: the layout text and its hash do not depend on map order lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java#MarketplacePreviewWorker.JSON#new ObjectMapper#1 +lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java:36 JsonMapper.builder test:marketplace-render the snapshot mapper, ORDER_MAP_ENTRIES_BY_KEYS: the layout text and its hash do not depend on map order lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java#MarketplacePreviewWorker.JSON#JsonMapper.builder#1 lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java:115 writeValueAsString test:marketplace-render layout snapshot of maps, lists and scalars from the stored DSL (staticDsl, :124-141), hashed with the render version (:116-117) and sent as the render payload lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java#MarketplacePreviewWorker.snapshotOf#writeValueAsString#1 lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:49 bodyValue test:marketplace-render Map.of of the Long timestamp and two Strings (payload, signature); default client codecs (:23-28) lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.render#bodyValue#1 lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:50 bodyToMono not-jackson byte[] response, decoded by the byte-array decoder, not Jackson lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.render#bodyToMono#1 @@ -184,8 +184,8 @@ lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/req lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/OryRequest.java:91 toJson test:error-message-json AuthException message; becomes a FAIL_TO_GET_OIDC_INFO argument (AbstractOauth2Request.java:35-37) lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/OryRequest.java#OryRequest.refreshAuthToken#toJson#1 lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/OryRequest.java:112 bodyToMono test:oauth provider JSON decoded by WebClientBuildHelper client codecs (E8) lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/OryRequest.java#OryRequest.getAuthUser#bodyToMono#1 lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/OryRequest.java:116 toJson test:error-message-json AuthException message; becomes a FAIL_TO_GET_OIDC_INFO argument (AbstractOauth2Request.java:35-37) lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/OryRequest.java#OryRequest.getAuthUser#toJson#1 -lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java:9 new ObjectMapper test:jwt-claims bare new ObjectMapper(); JWT payload claims read during authentication lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java#JwtDecoderUtil.objectMapper#new ObjectMapper#1 -lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java:33 readValue test:jwt-claims bare new ObjectMapper(); JWT payload claims read during authentication lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java#JwtDecoderUtil.decodeJwtPayload#readValue#1 +lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java:11 JsonMapper.builder test:jwt-claims builderWithJackson2Defaults() mapper; JWT payload claims read during authentication lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java#JwtDecoderUtil.objectMapper#JsonMapper.builder#1 +lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java:33 readValue test:jwt-claims builderWithJackson2Defaults() mapper; JWT payload claims read during authentication lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java#JwtDecoderUtil.decodeJwtPayload#readValue#1 lowcoder-server/src/main/java/org/lowcoder/api/datasource/UpsertDatasourceRequestMapper.java:43 fromJson test:upsert-datasource lowcoder-server/src/main/java/org/lowcoder/api/datasource/UpsertDatasourceRequestMapper.java#UpsertDatasourceRequestMapper.resolve#fromJson#1 lowcoder-server/src/main/java/org/lowcoder/api/datasource/UpsertDatasourceRequestMapper.java:43 toJson test:upsert-datasource lowcoder-server/src/main/java/org/lowcoder/api/datasource/UpsertDatasourceRequestMapper.java#UpsertDatasourceRequestMapper.resolve#toJson#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java:85 BodyInserters.fromValue test:error-handler lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWebExceptionHandler.java#CustomErrorWebExceptionHandler.render#BodyInserters.fromValue#1 @@ -193,7 +193,7 @@ lowcoder-server/src/main/java/org/lowcoder/api/framework/exception/CustomErrorWe lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java:51 bodyToMono not-jackson byte[] request body lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/data/PluginServerRequest.java#PluginServerRequest.fromServerRequest#bodyToMono#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/endpoint/PluginEndpointHandlerImpl.java:279 bodyValue not-jackson byte[] plugin response body (EndpointResponse.body()) lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/endpoint/PluginEndpointHandlerImpl.java#PluginEndpointHandlerImpl.createServerResponse#bodyValue#1 lowcoder-server/src/main/java/org/lowcoder/api/home/SessionUserServiceImpl.java:141 fromJsonQuietly test:session-cache legacy User JSON or a plain user id; fromJsonQuietly must return null for the latter lowcoder-server/src/main/java/org/lowcoder/api/home/SessionUserServiceImpl.java#SessionUserServiceImpl.resolveSessionUserFromCookie#fromJsonQuietly#1 -lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:82 new ObjectMapper test:api-flow lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#new ObjectMapper#1 +lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:83 JsonMapper.builder test:api-flow lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#JsonMapper.builder#1 lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:83 writeValueAsString test:api-flow lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#writeValueAsString#1 lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:90 BodyInserters.fromValue not-jackson String body (already serialized at :83) lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#BodyInserters.fromValue#1 lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:93 bodyToMono not-jackson String response lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java#ApiFlowController.flow#bodyToMono#1 @@ -210,52 +210,54 @@ lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncSer lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java:83 bodyToMono test:subscription-relay relay answer as JsonNode, read with path(...).asBoolean/asText/asInt (:65-67) lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java#WorkspaceSeatSyncService.send#bodyToMono#1 lowcoder-server/src/main/java/org/lowcoder/runner/eventlistener/OrgAndGroupEventListener.java:71 toJson log lowcoder-server/src/main/java/org/lowcoder/runner/eventlistener/OrgAndGroupEventListener.java#OrgAndGroupEventListener.onOrgDeleted#toJson#1 lowcoder-server/src/main/java/org/lowcoder/runner/eventlistener/OrgAndGroupEventListener.java:157 toJson log lowcoder-server/src/main/java/org/lowcoder/runner/eventlistener/OrgAndGroupEventListener.java#OrgAndGroupEventListener.onGroupDeleted#toJson#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:92 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.EXCHANGE_STRATEGIES#codecs#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:106 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.exchangeStrategies#codecs#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java:132 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java#WebClientBuildHelper.toWebClientBuilder#codecs#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:45 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.EXCHANGE_STRATEGIES#codecs#1 -lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:65 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.EXCHANGE_STRATEGY#codecs#1 -lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:0 import test:client-codec-guard sha256=e272a285100971a9; imports Jackson2ClientCodecs, whose use is the listed codecs site lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java##import#1 -lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:24 codecs test:client-codec-guard Jackson2ClientCodecs.apply, then maxInMemorySize (2 MiB, in effect as MarketplaceRenderContractTest#renderEnforcesItsDeclaredLimit shows) lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.EXCHANGE_STRATEGIES#codecs#1 -lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:0 import test:client-codec-guard sha256=87625933b753d6d5; imports Jackson2ClientCodecs, whose use is the listed codecs site lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java:32 jackson2JsonEncoder test:client-codec-guard explicit Jackson 2 client codec, one per client slot lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java#Jackson2ClientCodecs.apply#jackson2JsonEncoder#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java:33 jackson2JsonDecoder test:client-codec-guard explicit Jackson 2 client codec, one per client slot lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java#Jackson2ClientCodecs.apply#jackson2JsonDecoder#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java:0 import test:client-codec-guard sha256=3b1d91bd170767cc; imports the Jackson 2 codec types it constructs; the only use is the two listed sites lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/Jackson2ClientCodecs.java##import#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:92 codecs test:client-codec-guard JacksonClientCodecs.apply, then maxInMemorySize lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java#GraphQLExecutor.EXCHANGE_STRATEGIES#codecs#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:106 codecs test:client-codec-guard JacksonClientCodecs.apply, then maxInMemorySize lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java#RestApiExecutor.exchangeStrategies#codecs#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java:132 codecs test:client-codec-guard JacksonClientCodecs.apply, then maxInMemorySize lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/WebClientBuildHelper.java#WebClientBuildHelper.toWebClientBuilder#codecs#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:45 codecs test:client-codec-guard JacksonClientCodecs.apply, then maxInMemorySize lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java#DatasourcePluginClient.EXCHANGE_STRATEGIES#codecs#1 +lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:65 codecs test:client-codec-guard JacksonClientCodecs.apply, then maxInMemorySize lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java#JsLibraryController.EXCHANGE_STRATEGY#codecs#1 +lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java:0 import test:client-codec-guard sha256=40d2c4be7609d4fd; imports JacksonClientCodecs, whose use is the listed codecs site lowcoder-server/src/main/java/org/lowcoder/api/misc/JsLibraryController.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:24 codecs test:client-codec-guard JacksonClientCodecs.apply, then maxInMemorySize (2 MiB, in effect as MarketplaceRenderContractTest#renderEnforcesItsDeclaredLimit shows) lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java#MarketplaceRenderClient.EXCHANGE_STRATEGIES#codecs#1 +lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java:0 import test:client-codec-guard sha256=274eb4012d7adab4; imports JacksonClientCodecs, whose use is the listed codecs site lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplaceRenderClient.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java:29 jacksonJsonEncoder test:client-codec-guard explicit Jackson 3 client codec, one per client slot lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java#JacksonClientCodecs.apply#jacksonJsonEncoder#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java:30 jacksonJsonDecoder test:client-codec-guard explicit Jackson 3 client codec, one per client slot lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java#JacksonClientCodecs.apply#jacksonJsonDecoder#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java:34 JsonMapper.builder test:client-codec-guard the mapper behind both codecs: Jackson 2 defaults, FAIL_ON_UNKNOWN_PROPERTIES off lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java#JacksonClientCodecs.mapper#JsonMapper.builder#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java:0 import test:client-codec-guard sha256=e5ba30e0c744cdc3; imports the Jackson 3 codec and mapper types it constructs; the only uses are the three listed sites lowcoder-sdk/src/main/java/org/lowcoder/sdk/webclient/JacksonClientCodecs.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:34 getObjectMapper test:server-codec-guard production mapper bean for the server codecs lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.objectMapper#getObjectMapper#1 -lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:49 jackson2JsonDecoder test:server-codec-guard server decoder with the production mapper lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jackson2JsonDecoder#1 -lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:51 jackson2JsonEncoder test:server-codec-guard server encoder with the production mapper lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jackson2JsonEncoder#1 -lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java:0 import unreachable sha256=a8f23c404bf9f11b; only Jackson use is the never-read field at :71 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java##import#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:0 import test:node-service sha256=c3a7bd47e8d0cd8e; OBJECT_MAPPER (:65) is used only at :142, a listed site lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java##import#1 -lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java:0 import test:jwt-claims sha256=5869011927b2fe4f; objectMapper (:9) is used only at :33, a listed site lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java##import#1 -lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java:0 import test:marketplace-render sha256=fa0b872f2c0cea8b; the mapper of :34 is used only at :115, a listed site; SerializationFeature is its configuration lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java##import#1 -lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:0 import test:server-codec-guard sha256=ecf32a99e3566ae1; Jackson uses are :34, :49, :51, all listed sites lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java##import#1 -lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:0 import test:api-flow sha256=4a4195c176c865b8; the mapper of :82 is used only at :83, a listed site lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java##import#1 -lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java:0 import test:subscription-relay sha256=0ad6f8dd9c9447c3; JsonNode is the request body and the answer's data (server codec) and the relay answer of the listed :202; JsonNodeFactory builds the empty library (:124-126); request members are read with path/asText/asBoolean/hasNonNull/isArray/size (:54, :61, :76, :79-81, :85, :89-90, :92) and put into the payload as nodes (:86), encoded at the listed :202; the relay answer is read with path/isEmpty/asBoolean/isArray/asText/equals (:145, :154-161); no toString/toPrettyString/String.valueOf/concatenation on a node lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java##import#1 -lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java:0 import test:subscription-relay sha256=4955235aa695f2f7; the relay answer, decoded at the listed :83, is written with JsonNode.toString() (:70, Jackson's internal default mapper) and answered as text through ApiFlowController.java:71 lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:49 jacksonJsonDecoder test:server-codec-guard server decoder with the production mapper lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jacksonJsonDecoder#1 +lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:51 jacksonJsonEncoder test:server-codec-guard server encoder with the production mapper lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java#CustomWebFluxConfiguration.configureHttpMessageCodecs#jacksonJsonEncoder#1 +lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java:0 import unreachable sha256=30a7d64ba199b4e5; only Jackson use is the never-read field at :71 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/commands/MongoCommand.java##import#1 +lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java:0 import test:node-service sha256=165de6fc27c541a3; OBJECT_MAPPER (:65) is used only at :142, a listed site lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java:0 import test:jwt-claims sha256=b59cd152697b1f43; objectMapper (:9) is used only at :33, a listed site lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JwtDecoderUtil.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java:0 import test:marketplace-render sha256=2b6c0d2309602416; the mapper of :34 is used only at :115, a listed site; SerializationFeature is its configuration lowcoder-server/src/main/java/org/lowcoder/api/application/marketplace/MarketplacePreviewWorker.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java:0 import test:server-codec-guard sha256=adeb544dcb8fe7c7; Jackson uses are :34, :49, :51, all listed sites lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration/CustomWebFluxConfiguration.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java:0 import test:api-flow sha256=b6e3e3388fd6aec5; the mapper of :82 is used only at :83, a listed site lowcoder-server/src/main/java/org/lowcoder/api/misc/ApiFlowController.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java:0 import test:subscription-relay sha256=9a58413c14d4b6a2; JsonNode is the request body and the answer's data (server codec) and the relay answer of the listed :202; JsonNodeFactory builds the empty library (:124-126); request members are read with path/asText/asBoolean/hasNonNull/isArray/size (:54, :61, :76, :79-81, :85, :89-90, :92) and put into the payload as nodes (:86), encoded at the listed :202; the relay answer is read with path/isEmpty/asBoolean/isArray/asText/equals (:145, :154-161); no toString/toPrettyString/String.valueOf/concatenation on a node lowcoder-server/src/main/java/org/lowcoder/api/subscription/EnterpriseLicenseController.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java:0 import test:subscription-relay sha256=a6794dfda54c949b; the relay answer, decoded at the listed :83, is written with JsonNode.toString() (:70, Jackson's internal default mapper) and answered as text through ApiFlowController.java:71 lowcoder-server/src/main/java/org/lowcoder/api/subscription/WorkspaceSeatSyncService.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/KeycloakRequest.java:0 import not-jackson sha256=edba88faf88fbf4a; the only static import from BodyInserters is fromFormData (form encoding, :49, :86); its Jackson calls are listed sites lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/KeycloakRequest.java##import#1 lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/OryRequest.java:0 import not-jackson sha256=f35cccae5679fdbe; the only static import from BodyInserters is fromFormData (form encoding, :46, :83); its Jackson calls are listed sites lowcoder-server/src/main/java/org/lowcoder/api/authentication/request/oauth2/request/OryRequest.java##import#1 -lowcoder-domain/src/main/java/org/lowcoder/domain/configurations/RedisConfig.java:0 import test:session-cache sha256=5cf1d318355bc001; the Jackson2JsonRedisSerializer bean (:22-27) is never injected: every ReactiveRedisTemplate injection point receives reactiveStringRedisTemplate (E12, docs/tools/redis-probe.out); session-cache asserts that wiring lowcoder-domain/src/main/java/org/lowcoder/domain/configurations/RedisConfig.java##import#1 lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonParser.java:19 createParser not-jackson tv.twelvetone RJsonParserFactory#createParser (import RjsonParser.java:7, field :11), not Jackson lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonParser.java#RjsonParser.getJsonParser#createParser#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java:0 import test:tree-text sha256=1e233267739a881e; renderMustacheJsonString returns renderMustacheJson(...).toString() (:33), a JsonNode written by Jackson's internal default mapper; :94 and :179 call toString on an rjson JsonValue and on non-Number/Boolean param values, :127 textValue reads a node lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java##import#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:0 import test:tree-text sha256=76f021ca76899eae; the special-JSON body is queryBody.getJsonValue().toString() (:511); other tree use builds ObjectNodes whose conversions are listed sites lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java##import#1 -lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/utils/MongoQueryUtils.java:0 import test:tree-text sha256=d1e03c988e7b34fe; resultNode.toString() (:204) is re-read by the listed readTree at :204; the other toString calls (:158-202) are org.json JSONObject/JSONArray lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/utils/MongoQueryUtils.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:0 import tree-only sha256=ed09595a4676c041; the ObjectMapper field (:55, :63-64) is never read; renderMustacheJson nodes are navigated, asText only after isTextual (:203-212), and parseJsonBody's node is encoded at the listed RawHttpHandlerHelper.java:42; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none else lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java##import#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:0 import tree-only sha256=3fe1a2f213b9500b; ObjectNodes are built for headers and request params; their conversions are listed sites (header-json, codecs); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java##import#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryExecutionContext.java:0 import tree-only sha256=ca8494af6557abc9; holds variablesParams as a JsonNode (:31); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryExecutionContext.java##import#1 -lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/utils/GraphQLBodyUtils.java:0 import tree-only sha256=ee5f8671e61ff22c; puts the variables JsonNode into the body map (:20-22), encoded by GraphQLExecutor's listed codec site; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/utils/GraphQLBodyUtils.java##import#1 -lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/QueryBody.java:0 import tree-only sha256=78fab8baf8c11727; holds a JsonNode or String (:6-11); the JsonNode is written at RestApiExecutor.java:506 (tree-text); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/QueryBody.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java:0 import tree-only sha256=e1475f77c404b933; holds response headers as a JsonNode (:34, :91), serialized by the server codec with QueryResultView (WP5); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java##import#1 -lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java:0 import tree-only sha256=32e890eadd5cf0d5; exposes headers as a JsonNode (:36), serialized by the server codec (WP5 QueryResultView test); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java:0 import tree-only sha256=a832da76a4fb79e7; renderMustacheJson result navigated (:23); values converted at listed jsonNodeToObject/fromJsonNode sites; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java:0 import tree-only sha256=8df07e85d3a90bf5; iterates ObjectNode fields (:36) and converts values with the listed JsonUtils.jsonNodeToObject; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRows.java:0 import tree-only sha256=1bba1d871b219b6f; iterates ArrayNode elements into SheetChangeSetRow; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRows.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetObjectChangeSet.java:0 import tree-only sha256=7c9ec8f805beb21a; renderMustacheJson result navigated (:24); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetObjectChangeSet.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/BulkObjectChangeSet.java:0 import tree-only sha256=2eb2c5530b7b1f09; renderMustacheJson result navigated (:25); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/BulkObjectChangeSet.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRow.java:0 import tree-only sha256=d563e3bae4940668; iterates ObjectNode fields (:36) and converts values with the listed GuiSqlValue.fromJsonNode; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRow.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRows.java:0 import tree-only sha256=532978febad32096; iterates ArrayNode elements into ChangeSetRow; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRows.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java:0 import tree-only sha256=ddb8c67e5736ff01; renderMustacheJson result navigated (:23); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/MustacheHelper.java:0 import tree-only sha256=4662581d1b39be9d; renderMustacheJson/renderMustacheJsonString delegate to RjsonMustacheParser (:259-264), whose toString is tree-text; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none (its toString calls are on StringBuilders and Number/Boolean/String values, :177, :247, :325, :396, :501) lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/MustacheHelper.java##import#1 -lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java:0 import tree-only sha256=6ef23227c3bd88b4; renderMustacheJson result (:94) converted with the listed fromJsonNode; String.valueOf at :141 and :152 is on converted Java values; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java:0 import test:tree-text sha256=2708a42d076ff6c7; renderMustacheJsonString returns renderMustacheJson(...).toString() (:33), a JsonNode written by Jackson's internal default mapper; :94 and :179 call toString on an rjson JsonValue and on non-Number/Boolean param values, :127 textValue reads a node lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/RjsonMustacheParser.java##import#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java:0 import test:tree-text sha256=be9268e86b99dcf7; the special-JSON body is queryBody.getJsonValue().toString() (:511); other tree use builds ObjectNodes whose conversions are listed sites lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/RestApiExecutor.java##import#1 +lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/utils/MongoQueryUtils.java:0 import test:tree-text sha256=a955d9dbafcda744; resultNode.toString() (:204) is re-read by the listed readTree at :204; the other toString calls (:158-202) are org.json JSONObject/JSONArray lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/utils/MongoQueryUtils.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java:0 import tree-only sha256=7487bc16d3ca1384; the ObjectMapper field (:55, :63-64) is never read; renderMustacheJson nodes are navigated, asText only after isTextual (:203-212), and parseJsonBody's node is encoded at the listed RawHttpHandlerHelper.java:42; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none else lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/restapi/DataUtils.java##import#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java:0 import tree-only sha256=8f99e92845341c7f; ObjectNodes are built for headers and request params; their conversions are listed sites (header-json, codecs); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/GraphQLExecutor.java##import#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryExecutionContext.java:0 import tree-only sha256=11f741f977a7f23d; holds variablesParams as a JsonNode (:31); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/model/GraphQLQueryExecutionContext.java##import#1 +lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/utils/GraphQLBodyUtils.java:0 import tree-only sha256=c9d81c044d61d1c9; puts the variables JsonNode into the body map (:20-22), encoded by GraphQLExecutor's listed codec site; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/graphqlPlugin/src/main/java/org/lowcoder/plugin/graphql/utils/GraphQLBodyUtils.java##import#1 +lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/QueryBody.java:0 import tree-only sha256=8212925b518807c0; holds a JsonNode or String (:6-11); the JsonNode is written at RestApiExecutor.java:506 (tree-text); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-plugins/restApiPlugin/src/main/java/org/lowcoder/plugin/restapi/model/QueryBody.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java:0 import tree-only sha256=cd1a04fb905011d1; holds response headers as a JsonNode (:34, :91), serialized by the server codec with QueryResultView (WP5); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/models/QueryExecutionResult.java##import#1 +lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java:0 import tree-only sha256=6cd578e36655b4d2; exposes headers as a JsonNode (:36), serialized by the server codec (WP5 QueryResultView test); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-server/src/main/java/org/lowcoder/api/query/view/QueryResultView.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java:0 import tree-only sha256=bebaf0d19dba2db4; renderMustacheJson result navigated (:23); values converted at listed jsonNodeToObject/fromJsonNode sites; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetBulkObjectChangeSet.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java:0 import tree-only sha256=995e0c36b5f2278c; iterates ObjectNode fields (:36) and converts values with the listed JsonUtils.jsonNodeToObject; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRow.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRows.java:0 import tree-only sha256=fcfd714dd31cede7; iterates ArrayNode elements into SheetChangeSetRow; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetChangeSetRows.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetObjectChangeSet.java:0 import tree-only sha256=b28055cb8f8c8612; renderMustacheJson result navigated (:24); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sheet/changeset/SheetObjectChangeSet.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/BulkObjectChangeSet.java:0 import tree-only sha256=2cc7e5694e6ef009; renderMustacheJson result navigated (:25); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/BulkObjectChangeSet.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRow.java:0 import tree-only sha256=30e599d41a0b355f; iterates ObjectNode fields (:36) and converts values with the listed GuiSqlValue.fromJsonNode; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRow.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRows.java:0 import tree-only sha256=1a0de92389a4a822; iterates ArrayNode elements into ChangeSetRow; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ChangeSetRows.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java:0 import tree-only sha256=ebb26e696f599a81; renderMustacheJson result navigated (:23); reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/changeset/ObjectChangeSet.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/MustacheHelper.java:0 import tree-only sha256=dbe85ea3a858675d; renderMustacheJson/renderMustacheJsonString delegate to RjsonMustacheParser (:259-264), whose toString is tree-text; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none (its toString calls are on StringBuilders and Number/Boolean/String values, :177, :247, :325, :396, :501) lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/MustacheHelper.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java:0 import tree-only sha256=5cd5648037315233; renderMustacheJson result (:94) converted with the listed fromJsonNode; String.valueOf at :141 and :152 is on converted Java values; reviewed for toString/toPrettyString/asText/as/String.valueOf/concatenation on nodes: none lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/SqlGuiUtils.java##import#1 +lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/LegacyBeanNaming.java:0 import not-jackson sha256=50f34c1918c86789; the PropertyNamingStrategy that JsonUtils installs: it renames accessor property names and reads or writes no JSON value lowcoder-sdk/src/main/java/org/lowcoder/sdk/util/LegacyBeanNaming.java##import#1 +lowcoder-plugins/postgresPlugin/src/main/java/org/lowcoder/plugin/postgres/PostgresExecutor.java:0 import not-jackson sha256=ecc6b715a1698b1e; imports only JacksonException, caught around PostgresResultParser.parseRows (its Jackson calls are listed sites); no JSON value is read or written here lowcoder-plugins/postgresPlugin/src/main/java/org/lowcoder/plugin/postgres/PostgresExecutor.java##import#1 lowcoder-plugins/elasticSearchPlugin/src/main/java/org/lowcoder/plugin/es/EsQueryExecutor.java:131 renderMustacheJsonString test:tree-text Elasticsearch DSL text lowcoder-plugins/elasticSearchPlugin/src/main/java/org/lowcoder/plugin/es/EsQueryExecutor.java#EsQueryExecutor.renderJson#renderMustacheJsonString#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java:184 renderMustacheJsonString test:tree-text raw Mongo command text lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java#MongoPlugin.MongoEngine.buildQueryExecutionContext#renderMustacheJsonString#1 lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java:255 renderMustacheJsonString test:tree-text Mongo GUI command text lowcoder-plugins/mongoPlugin/src/main/java/org/lowcoder/plugin/mongo/MongoPlugin.java#MongoPlugin.MongoEngine.evaluateString#renderMustacheJsonString#1 diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary/jwt-claims/claims.read.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary/jwt-claims/claims.read.json index d44905d30..4b922fa5f 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary/jwt-claims/claims.read.json +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/boundary/jwt-claims/claims.read.json @@ -70,7 +70,7 @@ }, "errors" : { "noPayloadSegment" : "java.lang.IllegalArgumentException: Invalid JWT format.", - "payloadNotJson" : "com.fasterxml.jackson.core.JsonParseException", - "payloadNotAnObject" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "payloadNotJson" : "tools.jackson.core.exc.StreamReadException", + "payloadNotAnObject" : "tools.jackson.databind.exc.MismatchedInputException" } } \ No newline at end of file diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.builder.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.builder.json index 5d1abd311..58f6b825f 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.builder.json +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.builder.json @@ -49,13 +49,13 @@ "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Integer" : { @@ -72,7 +72,7 @@ "value" : "1" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { "class" : "java.lang.Integer", @@ -87,10 +87,10 @@ "value" : "1" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { "class" : "null", @@ -105,38 +105,38 @@ "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Boolean" : { "\"1\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1" : { "class" : "java.lang.Boolean", "value" : "true" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "java.lang.Boolean", "value" : "false" }, "\" 1 \"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "true" : { "class" : "java.lang.Boolean", @@ -159,38 +159,38 @@ "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "boolean" : { "\"1\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1" : { "class" : "java.lang.Boolean", "value" : "true" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "java.lang.Boolean", "value" : "false" }, "\" 1 \"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "true" : { "class" : "java.lang.Boolean", @@ -213,13 +213,13 @@ "value" : "false" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.time.Instant" : { @@ -252,30 +252,30 @@ "value" : "1970-01-01T00:00:01Z" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { "class" : "null", "value" : "null" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Object" : { @@ -350,13 +350,13 @@ "value" : "RECYCLED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.application.model.ApplicationStatus", @@ -367,39 +367,39 @@ "value" : "RECYCLED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"NORMAL\"" : { "class" : "org.lowcoder.domain.application.model.ApplicationStatus", "value" : "NORMAL" }, "\"normal\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.application.model.ApplicationStatus", @@ -416,13 +416,13 @@ "value" : "RECYCLED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.bundle.model.BundleStatus", @@ -433,39 +433,39 @@ "value" : "RECYCLED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"NORMAL\"" : { "class" : "org.lowcoder.domain.bundle.model.BundleStatus", "value" : "NORMAL" }, "\"normal\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.bundle.model.BundleStatus", @@ -482,13 +482,13 @@ "value" : "DELETED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.datasource.model.DatasourceStatus", @@ -499,39 +499,39 @@ "value" : "DELETED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"NORMAL\"" : { "class" : "org.lowcoder.domain.datasource.model.DatasourceStatus", "value" : "NORMAL" }, "\"normal\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.datasource.model.DatasourceStatus", @@ -548,13 +548,13 @@ "value" : "LOGO" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.material.model.MaterialType", @@ -565,39 +565,39 @@ "value" : "LOGO" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"COMMON\"" : { "class" : "org.lowcoder.domain.material.model.MaterialType", "value" : "COMMON" }, "\"common\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.material.model.MaterialType", @@ -614,13 +614,13 @@ "value" : "DELETED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.organization.model.OrganizationState", @@ -631,39 +631,39 @@ "value" : "DELETED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"ACTIVE\"" : { "class" : "org.lowcoder.domain.organization.model.OrganizationState", "value" : "ACTIVE" }, "\"active\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.organization.model.OrganizationState", diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.creator.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.creator.json index 5d1abd311..58f6b825f 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.creator.json +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.creator.json @@ -49,13 +49,13 @@ "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Integer" : { @@ -72,7 +72,7 @@ "value" : "1" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { "class" : "java.lang.Integer", @@ -87,10 +87,10 @@ "value" : "1" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { "class" : "null", @@ -105,38 +105,38 @@ "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Boolean" : { "\"1\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1" : { "class" : "java.lang.Boolean", "value" : "true" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "java.lang.Boolean", "value" : "false" }, "\" 1 \"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "true" : { "class" : "java.lang.Boolean", @@ -159,38 +159,38 @@ "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "boolean" : { "\"1\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1" : { "class" : "java.lang.Boolean", "value" : "true" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "java.lang.Boolean", "value" : "false" }, "\" 1 \"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "true" : { "class" : "java.lang.Boolean", @@ -213,13 +213,13 @@ "value" : "false" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.time.Instant" : { @@ -252,30 +252,30 @@ "value" : "1970-01-01T00:00:01Z" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { "class" : "null", "value" : "null" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Object" : { @@ -350,13 +350,13 @@ "value" : "RECYCLED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.application.model.ApplicationStatus", @@ -367,39 +367,39 @@ "value" : "RECYCLED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"NORMAL\"" : { "class" : "org.lowcoder.domain.application.model.ApplicationStatus", "value" : "NORMAL" }, "\"normal\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.application.model.ApplicationStatus", @@ -416,13 +416,13 @@ "value" : "RECYCLED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.bundle.model.BundleStatus", @@ -433,39 +433,39 @@ "value" : "RECYCLED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"NORMAL\"" : { "class" : "org.lowcoder.domain.bundle.model.BundleStatus", "value" : "NORMAL" }, "\"normal\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.bundle.model.BundleStatus", @@ -482,13 +482,13 @@ "value" : "DELETED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.datasource.model.DatasourceStatus", @@ -499,39 +499,39 @@ "value" : "DELETED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"NORMAL\"" : { "class" : "org.lowcoder.domain.datasource.model.DatasourceStatus", "value" : "NORMAL" }, "\"normal\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.datasource.model.DatasourceStatus", @@ -548,13 +548,13 @@ "value" : "LOGO" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.material.model.MaterialType", @@ -565,39 +565,39 @@ "value" : "LOGO" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"COMMON\"" : { "class" : "org.lowcoder.domain.material.model.MaterialType", "value" : "COMMON" }, "\"common\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.material.model.MaterialType", @@ -614,13 +614,13 @@ "value" : "DELETED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.organization.model.OrganizationState", @@ -631,39 +631,39 @@ "value" : "DELETED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"ACTIVE\"" : { "class" : "org.lowcoder.domain.organization.model.OrganizationState", "value" : "ACTIVE" }, "\"active\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.organization.model.OrganizationState", diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.field-setter.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.field-setter.json index 5d1abd311..58f6b825f 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.field-setter.json +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D5.field-setter.json @@ -49,13 +49,13 @@ "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Integer" : { @@ -72,7 +72,7 @@ "value" : "1" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { "class" : "java.lang.Integer", @@ -87,10 +87,10 @@ "value" : "1" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { "class" : "null", @@ -105,38 +105,38 @@ "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Boolean" : { "\"1\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1" : { "class" : "java.lang.Boolean", "value" : "true" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "java.lang.Boolean", "value" : "false" }, "\" 1 \"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "true" : { "class" : "java.lang.Boolean", @@ -159,38 +159,38 @@ "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "boolean" : { "\"1\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1" : { "class" : "java.lang.Boolean", "value" : "true" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "java.lang.Boolean", "value" : "false" }, "\" 1 \"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "true" : { "class" : "java.lang.Boolean", @@ -213,13 +213,13 @@ "value" : "false" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.time.Instant" : { @@ -252,30 +252,30 @@ "value" : "1970-01-01T00:00:01Z" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { "class" : "null", "value" : "null" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Object" : { @@ -350,13 +350,13 @@ "value" : "RECYCLED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.application.model.ApplicationStatus", @@ -367,39 +367,39 @@ "value" : "RECYCLED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"NORMAL\"" : { "class" : "org.lowcoder.domain.application.model.ApplicationStatus", "value" : "NORMAL" }, "\"normal\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.application.model.ApplicationStatus", @@ -416,13 +416,13 @@ "value" : "RECYCLED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.bundle.model.BundleStatus", @@ -433,39 +433,39 @@ "value" : "RECYCLED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"NORMAL\"" : { "class" : "org.lowcoder.domain.bundle.model.BundleStatus", "value" : "NORMAL" }, "\"normal\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.bundle.model.BundleStatus", @@ -482,13 +482,13 @@ "value" : "DELETED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.datasource.model.DatasourceStatus", @@ -499,39 +499,39 @@ "value" : "DELETED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"NORMAL\"" : { "class" : "org.lowcoder.domain.datasource.model.DatasourceStatus", "value" : "NORMAL" }, "\"normal\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.datasource.model.DatasourceStatus", @@ -548,13 +548,13 @@ "value" : "LOGO" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.material.model.MaterialType", @@ -565,39 +565,39 @@ "value" : "LOGO" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"COMMON\"" : { "class" : "org.lowcoder.domain.material.model.MaterialType", "value" : "COMMON" }, "\"common\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.material.model.MaterialType", @@ -614,13 +614,13 @@ "value" : "DELETED" }, "1.5" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"1.5\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "1e2" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "-0" : { "class" : "org.lowcoder.domain.organization.model.OrganizationState", @@ -631,39 +631,39 @@ "value" : "DELETED" }, "true" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"true\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"null\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", "value" : "null" }, "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"1\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"ACTIVE\"" : { "class" : "org.lowcoder.domain.organization.model.OrganizationState", "value" : "ACTIVE" }, "\"active\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "\"D5_UNKNOWN\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "0" : { "class" : "org.lowcoder.domain.organization.model.OrganizationState", diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D6.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D6.json index 6b14b0bc0..f596dd4be 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D6.json +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/coercion/D6.json @@ -21,10 +21,10 @@ "json" : "[\"1\",\"true\"]" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidDefinitionException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", @@ -32,10 +32,10 @@ "json" : "null" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{\"a\": 1, \"b\": true, \"c\": null, \"d\": 1.5}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "[Ljava.lang.String; @ field-setter (QueryExecutionRequest.path)" : { @@ -60,10 +60,10 @@ "json" : "[\"1\",\"true\"]" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidDefinitionException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", @@ -71,10 +71,10 @@ "json" : "null" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{\"a\": 1, \"b\": true, \"c\": null, \"d\": 1.5}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.lang.Object @ creator (UpdateOrgCommonSettingsRequest.value)" : { @@ -173,22 +173,22 @@ }, "java.util.HashMap @ builder (Oauth2GenericAuthConfig.sourceMappings)" : { "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",\"a\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",null]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[1, true]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", @@ -228,10 +228,10 @@ "json" : "[\"1\",\"true\"]" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", @@ -239,10 +239,10 @@ "json" : "null" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{\"a\": 1, \"b\": true, \"c\": null, \"d\": 1.5}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.util.List @ field-setter (OrganizationDomain.configs)" : { @@ -252,19 +252,19 @@ "json" : "[]" }, "[\"a\",\"a\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidTypeIdException" + "exception" : "tools.jackson.databind.exc.InvalidTypeIdException" }, "[\"a\",null]" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidTypeIdException" + "exception" : "tools.jackson.databind.exc.InvalidTypeIdException" }, "[1, true]" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidTypeIdException" + "exception" : "tools.jackson.databind.exc.InvalidTypeIdException" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "null" : { "class" : "null", @@ -272,10 +272,10 @@ "json" : "null" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{\"a\": 1, \"b\": true, \"c\": null, \"d\": 1.5}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.util.List @ field-setter (LibraryQueryRequestFromJs.params)" : { @@ -285,19 +285,19 @@ "json" : "[]" }, "[\"a\",\"a\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",null]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[1, true]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "null" : { "class" : "null", @@ -305,30 +305,30 @@ "json" : "null" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{\"a\": 1, \"b\": true, \"c\": null, \"d\": 1.5}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "java.util.Map @ builder (Application.editingApplicationDSL)" : { "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",\"a\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",null]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[1, true]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", @@ -348,22 +348,22 @@ }, "java.util.Map @ creator (CreateApplicationRequest.editingApplicationDSL)" : { "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",\"a\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",null]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[1, true]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", @@ -383,22 +383,22 @@ }, "java.util.Map @ field-setter (UpsertDatasourceRequest.datasourceConfig)" : { "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",\"a\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",null]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[1, true]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", @@ -418,22 +418,22 @@ }, "java.util.Map @ creator (FlowRequest.headers)" : { "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",\"a\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",null]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[1, true]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", @@ -473,10 +473,10 @@ "json" : "[\"1\",\"true\"]" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", @@ -484,30 +484,30 @@ "json" : "null" }, "{}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "{\"a\": 1, \"b\": true, \"c\": null, \"d\": 1.5}" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" } }, "org.lowcoder.domain.organization.model.Organization$OrganizationCommonSettings @ builder (Organization.commonSettings)" : { "[]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",\"a\"]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[\"a\",null]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "[1, true]" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"a\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.MismatchedInputException" + "exception" : "tools.jackson.databind.exc.MismatchedInputException" }, "\"\"" : { - "exception" : "com.fasterxml.jackson.databind.exc.InvalidFormatException" + "exception" : "tools.jackson.databind.exc.InvalidFormatException" }, "null" : { "class" : "null", diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv b/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv index e98a6d8ae..323e222fe 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv @@ -108,7 +108,7 @@ MaterialEndpoints#download(String, String, ServerHttpResponse) codec WP7 org.low MaterialEndpoints#getFileList() codec WP7 org.lowcoder.api.contract.endpoint.MaterialEndpointsContractTest pass-through 68 return=getFileList MaterialEndpoints#upload(UploadMaterialRequestDTO) codec WP7 org.lowcoder.api.contract.endpoint.MaterialEndpointsContractTest assembling 32 return=upload; 39 return=upload MetaEndpoints#getMetaData(GetMetaDataRequest) codec WP7 org.lowcoder.api.contract.endpoint.MetaEndpointsContractTest assembling 54 return=getMetaData -ApiFlowEndpoints#flow(FlowRequest) decode-only WP7 org.lowcoder.api.contract.endpoint.ApiFlowEndpointsContractTest pass-through 64 return=flowSeatSyncWithAnotherMethod; 64 Mono.error=flowSeatSyncWithAnotherMethod; 68 return=flowSeatSyncWithRetriesOutOfRange; 71 return=flowSeatSync; 74 return=flowWithoutMethod; 78 return=flowWithRetriesOrTimeoutOutOfRange; 84 return=flow; 94 onErrorResume=flowUpstreamFailed; 98 return=flowFailingBeforeTheRequest; 98 Mono.error=flowFailingBeforeTheRequest §1.3: the outbound HTTPS client is built inline (ApiFlowController.java:84-93; the seat-sync path (:62-72) delegates to WorkspaceSeatSyncService) and the answer is the upstream's text, not JSON; FlowRequest is decoded at codec level, the outbound request is run against a local server through a test subclass that redirects the client, and the outbound body is pinned by api-flow +ApiFlowEndpoints#flow(FlowRequest) decode-only WP7 org.lowcoder.api.contract.endpoint.ApiFlowEndpointsContractTest pass-through 65 return=flowSeatSyncWithAnotherMethod; 65 Mono.error=flowSeatSyncWithAnotherMethod; 69 return=flowSeatSyncWithRetriesOutOfRange; 72 return=flowSeatSync; 75 return=flowWithoutMethod; 79 return=flowWithRetriesOrTimeoutOutOfRange; 85 return=flow; 95 onErrorResume=flowUpstreamFailed; 99 return=flowFailingBeforeTheRequest; 99 Mono.error=flowFailingBeforeTheRequest §1.3: the outbound HTTPS client is built inline (ApiFlowController.java:84-93; the seat-sync path (:62-72) delegates to WorkspaceSeatSyncService) and the answer is the upstream's text, not JSON; FlowRequest is decoded at codec level, the outbound request is run against a local server through a test subclass that redirects the client, and the outbound body is pinned by api-flow JsLibraryEndpoints#getMeta(Collection) codec WP7 org.lowcoder.api.contract.endpoint.JsLibraryEndpointsContractTest pass-through 114 return=getMetaWithoutNames; 116 return=getMeta; 119 return=getMetaRecommended; 120 defaultIfEmpty=getMetaRecommendedNotLoadedYet; 122 return=getMeta; 123 onErrorReturn=getMetaFetchFailed JsLibraryEndpoints#getRecommendationMetas() codec WP7 org.lowcoder.api.contract.endpoint.JsLibraryEndpointsContractTest pass-through 108 return=getRecommendationMetas PrivateNpmRegistryEndpoint#getNpmPackageAsset(String, String) codec WP7 org.lowcoder.api.contract.endpoint.PrivateNpmRegistryEndpointContractTest pass-through 46 return=getNpmPackageAsset diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/dynamic/representative.read.json b/server/api-service/lowcoder-server/src/test/resources/json-contract/dynamic/representative.read.json index 746262a35..440a51718 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/dynamic/representative.read.json +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/dynamic/representative.read.json @@ -173,50 +173,50 @@ }, "JSON_NODE" : { "classes" : { - "" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/zeta" : "com.fasterxml.jackson.databind.node.TextNode", - "/int" : "com.fasterxml.jackson.databind.node.IntNode", - "/negativeInt" : "com.fasterxml.jackson.databind.node.IntNode", - "/intMax" : "com.fasterxml.jackson.databind.node.IntNode", - "/intMaxPlusOne" : "com.fasterxml.jackson.databind.node.LongNode", - "/intMinMinusOne" : "com.fasterxml.jackson.databind.node.LongNode", - "/longMax" : "com.fasterxml.jackson.databind.node.LongNode", - "/longMaxPlusOne" : "com.fasterxml.jackson.databind.node.BigIntegerNode", - "/longMinMinusOne" : "com.fasterxml.jackson.databind.node.BigIntegerNode", - "/decimal" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/trailingZeroDecimal" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/zeroPointZero" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/negativeZero" : "com.fasterxml.jackson.databind.node.IntNode", - "/exponent" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/exponentUpperCase" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/negativeExponent" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/longDecimal" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/true" : "com.fasterxml.jackson.databind.node.BooleanNode", - "/false" : "com.fasterxml.jackson.databind.node.BooleanNode", - "/null" : "com.fasterxml.jackson.databind.node.NullNode", - "/emptyObject" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/emptyArray" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/nested" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/nested/array" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/nested/array/0" : "com.fasterxml.jackson.databind.node.IntNode", - "/nested/array/1" : "com.fasterxml.jackson.databind.node.TextNode", - "/nested/array/2" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/nested/array/2/0" : "com.fasterxml.jackson.databind.node.IntNode", - "/nested/array/2/1" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/nested/array/2/1/four" : "com.fasterxml.jackson.databind.node.DoubleNode", - "/nested/array/3" : "com.fasterxml.jackson.databind.node.NullNode", - "/nested/array/4" : "com.fasterxml.jackson.databind.node.BooleanNode", - "/nested/array/5" : "com.fasterxml.jackson.databind.node.LongNode", - "/nested/object" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/nested/object/z" : "com.fasterxml.jackson.databind.node.IntNode", - "/nested/object/a" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/nested/object/a/deeper" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/nested/object/a/deeper/0" : "com.fasterxml.jackson.databind.node.ArrayNode", - "/nested/object/a/deeper/1" : "com.fasterxml.jackson.databind.node.ObjectNode", - "/unicode" : "com.fasterxml.jackson.databind.node.TextNode", - "/escapes" : "com.fasterxml.jackson.databind.node.TextNode", - "/key with escaped name" : "com.fasterxml.jackson.databind.node.TextNode", - "/alpha" : "com.fasterxml.jackson.databind.node.TextNode" + "" : "tools.jackson.databind.node.ObjectNode", + "/zeta" : "tools.jackson.databind.node.StringNode", + "/int" : "tools.jackson.databind.node.IntNode", + "/negativeInt" : "tools.jackson.databind.node.IntNode", + "/intMax" : "tools.jackson.databind.node.IntNode", + "/intMaxPlusOne" : "tools.jackson.databind.node.LongNode", + "/intMinMinusOne" : "tools.jackson.databind.node.LongNode", + "/longMax" : "tools.jackson.databind.node.LongNode", + "/longMaxPlusOne" : "tools.jackson.databind.node.BigIntegerNode", + "/longMinMinusOne" : "tools.jackson.databind.node.BigIntegerNode", + "/decimal" : "tools.jackson.databind.node.DoubleNode", + "/trailingZeroDecimal" : "tools.jackson.databind.node.DoubleNode", + "/zeroPointZero" : "tools.jackson.databind.node.DoubleNode", + "/negativeZero" : "tools.jackson.databind.node.IntNode", + "/exponent" : "tools.jackson.databind.node.DoubleNode", + "/exponentUpperCase" : "tools.jackson.databind.node.DoubleNode", + "/negativeExponent" : "tools.jackson.databind.node.DoubleNode", + "/longDecimal" : "tools.jackson.databind.node.DoubleNode", + "/true" : "tools.jackson.databind.node.BooleanNode", + "/false" : "tools.jackson.databind.node.BooleanNode", + "/null" : "tools.jackson.databind.node.NullNode", + "/emptyObject" : "tools.jackson.databind.node.ObjectNode", + "/emptyArray" : "tools.jackson.databind.node.ArrayNode", + "/nested" : "tools.jackson.databind.node.ObjectNode", + "/nested/array" : "tools.jackson.databind.node.ArrayNode", + "/nested/array/0" : "tools.jackson.databind.node.IntNode", + "/nested/array/1" : "tools.jackson.databind.node.StringNode", + "/nested/array/2" : "tools.jackson.databind.node.ArrayNode", + "/nested/array/2/0" : "tools.jackson.databind.node.IntNode", + "/nested/array/2/1" : "tools.jackson.databind.node.ObjectNode", + "/nested/array/2/1/four" : "tools.jackson.databind.node.DoubleNode", + "/nested/array/3" : "tools.jackson.databind.node.NullNode", + "/nested/array/4" : "tools.jackson.databind.node.BooleanNode", + "/nested/array/5" : "tools.jackson.databind.node.LongNode", + "/nested/object" : "tools.jackson.databind.node.ObjectNode", + "/nested/object/z" : "tools.jackson.databind.node.IntNode", + "/nested/object/a" : "tools.jackson.databind.node.ObjectNode", + "/nested/object/a/deeper" : "tools.jackson.databind.node.ArrayNode", + "/nested/object/a/deeper/0" : "tools.jackson.databind.node.ArrayNode", + "/nested/object/a/deeper/1" : "tools.jackson.databind.node.ObjectNode", + "/unicode" : "tools.jackson.databind.node.StringNode", + "/escapes" : "tools.jackson.databind.node.StringNode", + "/key with escaped name" : "tools.jackson.databind.node.StringNode", + "/alpha" : "tools.jackson.databind.node.StringNode" }, "keyOrder" : { "/emptyObject" : [ ], From d834e09feb9136664021c26e6db826d785e20687 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Wed, 25 Nov 2026 22:34:08 +0100 Subject: [PATCH 12/40] test: adapt two tests to the merged behaviour 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 --- .../GenericAuthenticateTest.java | 40 ++++++++----------- .../endpoint/UserEndpointsContractTest.java | 2 +- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/GenericAuthenticateTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/GenericAuthenticateTest.java index b5d8680ca..ac03e93e0 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/GenericAuthenticateTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/GenericAuthenticateTest.java @@ -167,34 +167,28 @@ public void testGoogleLoginSuccess(WireMockRuntimeInfo wmRuntimeInfo) { MockServerHttpRequest request1 = MockServerHttpRequest.post("").build(); MockServerWebExchange exchange1 = MockServerWebExchange.builder(request1).build(); - Mono userMono1 = authenticationController.formLogin(formLoginRequest, null, null, exchange1) - .then(userRepository.findByConnections_SourceAndConnections_RawId(source1, email)); + // A form login whose address matches an account only by e-mail (the Google account above) is refused: the + // address alone never links two logins, and nothing of the Google account changes. + StepVerifier.create(authenticationController.formLogin(formLoginRequest, null, null, exchange1)) + .expectErrorSatisfies(throwable -> { + BizException bizException = assertInstanceOf(BizException.class, throwable); + assertEquals(BizError.USER_LOGIN_ID_EXIST, bizException.getError()); + assertEquals("USER_LOGIN_ID_EXIST", bizException.getMessageKey()); + }) + .verify(); - StepVerifier.create(userMono1) + StepVerifier.create(userRepository.findByConnections_SourceAndConnections_RawId(source, uid)) .assertNext(user -> { - assertEquals(email, user.getEmail()); - assertEquals(UserState.ACTIVATED, user.getState()); - assertTrue(user.getIsEnabled()); - assertTrue(encryptionService.matchPassword(password, user.getPassword())); - assertFalse(user.getIsAnonymous()); - assertFalse(user.getIsNewUser());// - assertFalse(user.isHasSetNickname()); - assertNotNull(user.getId()); - //connections - assertEquals(2, user.getConnections().size()); - Connection connection = Iterables.getLast(user.getConnections(), null); - assertNotNull(connection); - assertEquals(authId1, connection.getAuthId()); - assertEquals(source1, connection.getSource()); - assertEquals(email, connection.getRawId()); - assertEquals(email, connection.getName()); - assertNull(connection.getAvatar()); - assertEquals(1, connection.getOrgIds().size()); - assertNull(connection.getAuthConnectionAuthToken()); - assertEquals(Map.of("email", email), connection.getRawUserInfo()); + assertEquals("Tech Ninja", user.getName()); + assertEquals(1, user.getConnections().size()); + assertEquals(source, Iterables.getOnlyElement(user.getConnections()).getSource()); + assertFalse(encryptionService.matchPassword(password, user.getPassword())); }) .verifyComplete(); + StepVerifier.create(userRepository.findByConnections_SourceAndConnections_RawId(source1, email)) + .verifyComplete(); + // Mockito.framework().clearInlineMocks(); } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/UserEndpointsContractTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/UserEndpointsContractTest.java index 9ef665ed8..d7626b120 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/UserEndpointsContractTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/contract/endpoint/UserEndpointsContractTest.java @@ -557,7 +557,7 @@ void deleteProfilePhotoById_targetSuperAdminVisitorSuperAdmin_allowed() { Mockito.when(userService.deleteProfilePhoto(member)).thenReturn(Mono.empty()); try (ContractTestClient client = client()) { EntityExchangeResult result = CONTRACT.exchange(client, "deleteProfilePhotoById", Map.of(), null, ORG_ID, USER_ID); - EndpointContract.assertEmptyResponse(result, HttpStatus.OK, MediaType.APPLICATION_JSON); + EndpointContract.assertEmptyResponse(result, HttpStatus.OK, NO_CONTENT_TYPE); Mockito.verify(userService).deleteProfilePhoto(member); } } From 8524e3b83a4673024a873df5385a138508ecb28b Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Wed, 25 Nov 2026 22:40:03 +0100 Subject: [PATCH 13/40] build: update Spring Boot from 4.1.2 to 4.1.3 Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb --- server/api-service/lowcoder-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api-service/lowcoder-dependencies/pom.xml b/server/api-service/lowcoder-dependencies/pom.xml index 61f3ff43b..7df034af9 100644 --- a/server/api-service/lowcoder-dependencies/pom.xml +++ b/server/api-service/lowcoder-dependencies/pom.xml @@ -18,7 +18,7 @@ org.springframework.boot spring-boot-dependencies - 4.1.2 + 4.1.3 pom import From d6e326fa805356a843bf6c138e8da88a02e93f1b Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Wed, 25 Nov 2026 23:14:44 +0100 Subject: [PATCH 14/40] build: update AssertJ, GreenMail, WireMock and the Jetty BOM 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 --- .../api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml | 2 +- server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml | 2 +- server/api-service/lowcoder-plugins/smtpPlugin/pom.xml | 2 +- server/api-service/lowcoder-server/pom.xml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml index 49cf6e189..96af8629c 100644 --- a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml @@ -51,7 +51,7 @@ org.assertj assertj-core - 3.13.2 + 3.27.7 test diff --git a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml index c070d450b..e1cd97eba 100644 --- a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml @@ -68,7 +68,7 @@ org.assertj assertj-core - 3.13.2 + 3.27.7 test diff --git a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml index 1ae1407b1..4728c25cf 100644 --- a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml @@ -44,7 +44,7 @@ com.icegreen greenmail - 2.0.1 + 2.1.15 test diff --git a/server/api-service/lowcoder-server/pom.xml b/server/api-service/lowcoder-server/pom.xml index 04ee33f31..f3ac4d067 100644 --- a/server/api-service/lowcoder-server/pom.xml +++ b/server/api-service/lowcoder-server/pom.xml @@ -198,7 +198,7 @@ com.icegreen greenmail - 2.0.1 + 2.1.15 test @@ -253,7 +253,7 @@ org.wiremock wiremock-jetty12 - 3.6.0 + 3.13.2 test @@ -267,7 +267,7 @@ org.eclipse.jetty.ee10 jetty-ee10-bom - 12.1.14 + 12.1.15 pom import From a9f51fa9beaef70682dff41e8b10150edf116dee Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Wed, 25 Nov 2026 23:24:09 +0100 Subject: [PATCH 15/40] build: update runtime libraries and the sentry, springdoc and postgresql 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 --- .../api-service/lowcoder-dependencies/pom.xml | 18 +++++++++--------- .../infra/localcache/ReloadableCache.java | 2 +- .../googleSheetsPlugin/pom.xml | 2 +- .../lowcoder-plugins/mysqlPlugin/pom.xml | 2 +- .../lowcoder-plugins/oraclePlugin/pom.xml | 2 +- .../lowcoder-plugins/postgresPlugin/pom.xml | 2 +- .../lowcoder-plugins/smtpPlugin/pom.xml | 2 +- .../sdk/plugin/sqlcommand/GuiSqlCommand.java | 2 +- server/api-service/lowcoder-server/pom.xml | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/server/api-service/lowcoder-dependencies/pom.xml b/server/api-service/lowcoder-dependencies/pom.xml index 7df034af9..b4abb81af 100644 --- a/server/api-service/lowcoder-dependencies/pom.xml +++ b/server/api-service/lowcoder-dependencies/pom.xml @@ -50,12 +50,12 @@ org.apache.commons commons-text - 1.11.0 + 1.15.0 commons-io commons-io - 2.16.0 + 2.22.0 org.glassfish @@ -76,12 +76,12 @@ org.apache.commons commons-collections4 - 4.4 + 4.6.0 com.google.guava guava - 33.1.0-jre + 33.8.0-jre @@ -97,7 +97,7 @@ com.github.spullara.mustache.java compiler - 0.9.11 + 0.9.14 @@ -129,20 +129,20 @@ com.querydsl querydsl-mongodb - 5.0.0 + 5.1.0 jakarta io.sentry sentry-spring-boot-4 - 8.65.0 + 8.66.0 org.jgrapht jgrapht-core - 1.5.2 + 1.5.3 @@ -168,7 +168,7 @@ org.springdoc springdoc-openapi-starter-webflux-ui - 3.2.0 + 3.2.1 diff --git a/server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/localcache/ReloadableCache.java b/server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/localcache/ReloadableCache.java index 64171ada3..c64a147fa 100644 --- a/server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/localcache/ReloadableCache.java +++ b/server/api-service/lowcoder-infra/src/main/java/org/lowcoder/infra/localcache/ReloadableCache.java @@ -7,7 +7,7 @@ import org.lowcoder.sdk.destructor.DestructorUtil; import reactor.core.publisher.Mono; -import javax.annotation.CheckReturnValue; +import com.google.errorprone.annotations.CheckReturnValue; import java.time.Duration; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; diff --git a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml index 96af8629c..15a756a09 100644 --- a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml @@ -63,7 +63,7 @@ com.google.guava guava - 31.1-jre + 33.8.0-jre compile diff --git a/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml index 07ffbc489..8ccd6bff6 100644 --- a/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml @@ -28,7 +28,7 @@ mysql mysql-connector-java - 8.0.30 + 8.0.33 org.lowcoder diff --git a/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml b/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml index 821b24ae2..dbb6281d4 100644 --- a/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml @@ -29,7 +29,7 @@ com.oracle.database.jdbc ojdbc11 - 23.7.0.25.01 + 23.26.4.0.0 org.testcontainers diff --git a/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml b/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml index 47ce5ed12..1eec898c3 100644 --- a/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml @@ -29,7 +29,7 @@ org.postgresql postgresql - 42.3.8 + 42.7.15 diff --git a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml index 4728c25cf..aaffd5204 100644 --- a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml @@ -28,7 +28,7 @@ com.sun.mail jakarta.mail - 2.0.1 + 2.0.2 provided diff --git a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/GuiSqlCommand.java b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/GuiSqlCommand.java index fc620040e..b9cd112a2 100644 --- a/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/GuiSqlCommand.java +++ b/server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/plugin/sqlcommand/GuiSqlCommand.java @@ -51,7 +51,7 @@ public boolean returnsGeneratedKeys() { } static String parseTable(Map commandDetail) { - String table = MapUtils.getString(commandDetail, TABLE_KEY, null); + String table = MapUtils.getString(commandDetail, TABLE_KEY); if (StringUtils.isBlank(table)) { throw new PluginException(INVALID_GUI_SETTINGS, "GUI_FIELD_EMPTY"); } diff --git a/server/api-service/lowcoder-server/pom.xml b/server/api-service/lowcoder-server/pom.xml index f3ac4d067..27ce92277 100644 --- a/server/api-service/lowcoder-server/pom.xml +++ b/server/api-service/lowcoder-server/pom.xml @@ -219,7 +219,7 @@ com.auth0 java-jwt - 4.4.0 + 4.6.2 From d914480e19c7b93d03f9df318de9728336cb5a4e Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Wed, 25 Nov 2026 23:41:13 +0100 Subject: [PATCH 16/40] build: update the Maven plugins and JaCoCo 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 --- server/api-service/lowcoder-coverage-report/pom.xml | 2 +- server/api-service/lowcoder-domain/pom.xml | 2 +- .../lowcoder-plugins/clickHousePlugin/pom.xml | 2 +- .../lowcoder-plugins/elasticSearchPlugin/pom.xml | 2 +- .../lowcoder-plugins/googleSheetsPlugin/pom.xml | 2 +- .../lowcoder-plugins/graphqlPlugin/pom.xml | 2 +- .../api-service/lowcoder-plugins/mongoPlugin/pom.xml | 2 +- .../api-service/lowcoder-plugins/mssqlPlugin/pom.xml | 2 +- .../api-service/lowcoder-plugins/mysqlPlugin/pom.xml | 2 +- .../lowcoder-plugins/oraclePlugin/pom.xml | 2 +- server/api-service/lowcoder-plugins/pom.xml | 6 +++--- .../lowcoder-plugins/postgresPlugin/pom.xml | 2 +- .../api-service/lowcoder-plugins/redisPlugin/pom.xml | 2 +- .../lowcoder-plugins/restApiPlugin/pom.xml | 2 +- .../api-service/lowcoder-plugins/smtpPlugin/pom.xml | 4 ++-- .../lowcoder-plugins/snowflakePlugin/pom.xml | 2 +- server/api-service/lowcoder-sdk/pom.xml | 2 +- server/api-service/lowcoder-server/pom.xml | 8 ++++---- server/api-service/pom.xml | 12 ++++++------ 19 files changed, 30 insertions(+), 30 deletions(-) diff --git a/server/api-service/lowcoder-coverage-report/pom.xml b/server/api-service/lowcoder-coverage-report/pom.xml index ede26f05c..508859898 100644 --- a/server/api-service/lowcoder-coverage-report/pom.xml +++ b/server/api-service/lowcoder-coverage-report/pom.xml @@ -174,7 +174,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 org.jacoco diff --git a/server/api-service/lowcoder-domain/pom.xml b/server/api-service/lowcoder-domain/pom.xml index b81a9afd5..123b266a3 100644 --- a/server/api-service/lowcoder-domain/pom.xml +++ b/server/api-service/lowcoder-domain/pom.xml @@ -278,7 +278,7 @@ org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 generate-sources diff --git a/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml b/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml index 44560db0f..d60e54b2a 100644 --- a/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml @@ -65,7 +65,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml b/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml index 48a6dd16a..fa0ff9f7a 100644 --- a/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml @@ -58,7 +58,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml index 15a756a09..611856891 100644 --- a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml @@ -75,7 +75,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml index e1cd97eba..2c3577e3e 100644 --- a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml @@ -100,7 +100,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/mongoPlugin/pom.xml b/server/api-service/lowcoder-plugins/mongoPlugin/pom.xml index a2d8b914f..5af1ea099 100644 --- a/server/api-service/lowcoder-plugins/mongoPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/mongoPlugin/pom.xml @@ -49,7 +49,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml index b8f140959..00c689438 100644 --- a/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml @@ -60,7 +60,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml index 8ccd6bff6..87ea527f3 100644 --- a/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/mysqlPlugin/pom.xml @@ -54,7 +54,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml b/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml index dbb6281d4..04fd3845b 100644 --- a/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/oraclePlugin/pom.xml @@ -53,7 +53,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/pom.xml b/server/api-service/lowcoder-plugins/pom.xml index ebacdf59e..85a93b8c2 100644 --- a/server/api-service/lowcoder-plugins/pom.xml +++ b/server/api-service/lowcoder-plugins/pom.xml @@ -190,7 +190,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.13.0 + 3.16.0 ${java.version} @@ -201,12 +201,12 @@ org.apache.maven.plugins maven-dependency-plugin - 3.6.1 + 3.11.0 org.apache.maven.plugins maven-antrun-plugin - 3.1.0 + 3.2.0 create-plugin-properties diff --git a/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml b/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml index 1eec898c3..df6bb0f14 100644 --- a/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/postgresPlugin/pom.xml @@ -56,7 +56,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/redisPlugin/pom.xml b/server/api-service/lowcoder-plugins/redisPlugin/pom.xml index 023bf8619..67c4e85bf 100644 --- a/server/api-service/lowcoder-plugins/redisPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/redisPlugin/pom.xml @@ -52,7 +52,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/restApiPlugin/pom.xml b/server/api-service/lowcoder-plugins/restApiPlugin/pom.xml index 1b432cb9b..c126ec425 100644 --- a/server/api-service/lowcoder-plugins/restApiPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/restApiPlugin/pom.xml @@ -88,7 +88,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml index aaffd5204..0a59c1a81 100644 --- a/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/smtpPlugin/pom.xml @@ -60,7 +60,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar @@ -112,7 +112,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.5 + 3.6.1 us-ascii-default-charset diff --git a/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml b/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml index d62c91ab0..b8349408a 100644 --- a/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml @@ -48,7 +48,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.6.2 shade-plugin-jar diff --git a/server/api-service/lowcoder-sdk/pom.xml b/server/api-service/lowcoder-sdk/pom.xml index 17ea61507..cd2e4bf79 100644 --- a/server/api-service/lowcoder-sdk/pom.xml +++ b/server/api-service/lowcoder-sdk/pom.xml @@ -185,7 +185,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 3.5.1 diff --git a/server/api-service/lowcoder-server/pom.xml b/server/api-service/lowcoder-server/pom.xml index 27ce92277..23cd52a39 100644 --- a/server/api-service/lowcoder-server/pom.xml +++ b/server/api-service/lowcoder-server/pom.xml @@ -324,7 +324,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 3.5.1 @@ -341,7 +341,7 @@ org.apache.maven.plugins maven-jarsigner-plugin - 3.0.0 + 3.1.0 sign @@ -367,7 +367,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.1.2 + 3.6.1 ${skipUnitTests} @@ -399,7 +399,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.2.5 + 3.6.1 ${skipIntegrationTests} false @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.6.3 + 3.7.0 require-jdk-25 @@ -110,12 +110,12 @@ org.codehaus.mojo license-maven-plugin - 2.4.0 + 2.9.0 org.apache.maven.plugins maven-dependency-plugin - 3.6.1 + 3.11.0 From 634d4917e3d6261ef36991bb2dc2a5100c57e689 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 07:54:34 +0100 Subject: [PATCH 24/40] build: update Jedis to 8.1.0 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 --- .../lowcoder-plugins/redisPlugin/pom.xml | 2 +- .../java/org/lowcoder/plugin/redis/RedisPlugin.java | 5 ++++- .../lowcoder/plugin/redis/utils/RedisUriUtils.java | 5 +---- .../plugin/redis/RedisEngineConnectionTest.java | 11 ++++------- .../plugin/redis/utils/RedisUriUtilsTest.java | 13 +++++-------- 5 files changed, 15 insertions(+), 21 deletions(-) diff --git a/server/api-service/lowcoder-plugins/redisPlugin/pom.xml b/server/api-service/lowcoder-plugins/redisPlugin/pom.xml index 67c4e85bf..4e4e52c68 100644 --- a/server/api-service/lowcoder-plugins/redisPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/redisPlugin/pom.xml @@ -28,7 +28,7 @@ redis.clients jedis - 3.3.0 + 8.1.0 org.slf4j diff --git a/server/api-service/lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/RedisPlugin.java b/server/api-service/lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/RedisPlugin.java index cbf8d6b26..ba5504455 100644 --- a/server/api-service/lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/RedisPlugin.java +++ b/server/api-service/lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/RedisPlugin.java @@ -90,7 +90,10 @@ public Mono createConnection(RedisDatasourceConfig connectionConfig) }) .subscribeOn(scheduler) .onErrorMap(t -> { - if (t instanceof ArrayIndexOutOfBoundsException && connectionConfig.isUsingUri()) { + // Jedis refuses a user name without a password with an IllegalArgumentException (before Jedis 8, with an + // ArrayIndexOutOfBoundsException); the exact class excludes its subclass NumberFormatException (a bad port). + if (connectionConfig.isUsingUri() + && (t instanceof ArrayIndexOutOfBoundsException || t.getClass() == IllegalArgumentException.class)) { return new PluginException(REDIS_URL_ERROR, "REDIS_URL_ERROR", t.getMessage()); } return t; diff --git a/server/api-service/lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/utils/RedisUriUtils.java b/server/api-service/lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/utils/RedisUriUtils.java index f622bbd26..04c9d8ece 100644 --- a/server/api-service/lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/utils/RedisUriUtils.java +++ b/server/api-service/lowcoder-plugins/redisPlugin/src/main/java/org/lowcoder/plugin/redis/utils/RedisUriUtils.java @@ -61,13 +61,10 @@ private static String getUriHostAndPort(RedisDatasourceConfig datasourceConfigur /** * The user info of the URI, {@code user:password@}, each part percent-encoded (BF-055): Jedis reads them with - * {@link URI#getUserInfo()}, which decodes, and splits at the first colon, so a password with {@code @ : / # %} or a space + * the raw user info at its first colon and decodes each part, so a user name or a password with {@code @ : / # %} or a space * comes back unchanged. A user name without a password is kept as {@code user:@}, which Jedis sends as {@code AUTH user ""} * (a user with {@code nopass} is let in); without the colon Jedis would fail to read the password. A blank user name or * password counts as absent. - *

    - * Limits: a user name containing a colon cannot be given: Jedis splits the decoded user info at its first colon, so the - * rest of the name becomes part of the password. */ private static String getUriAuth(RedisDatasourceConfig datasourceConfiguration) { String username = datasourceConfiguration.getUsername(); diff --git a/server/api-service/lowcoder-plugins/redisPlugin/src/test/java/org/lowcoder/plugin/redis/RedisEngineConnectionTest.java b/server/api-service/lowcoder-plugins/redisPlugin/src/test/java/org/lowcoder/plugin/redis/RedisEngineConnectionTest.java index d516b425e..59d478671 100644 --- a/server/api-service/lowcoder-plugins/redisPlugin/src/test/java/org/lowcoder/plugin/redis/RedisEngineConnectionTest.java +++ b/server/api-service/lowcoder-plugins/redisPlugin/src/test/java/org/lowcoder/plugin/redis/RedisEngineConnectionTest.java @@ -28,8 +28,8 @@ * is contacted: the host is a reserved test address that nothing answers), with the pool settings of {@code buildPoolConfig}; * an unparsable URI is reported; destroying null or twice does not throw. * - *

    Limits: the pool settings are read from the Jedis pool's protected {@code internalPool} field by reflection (Jedis 3.3.0 has - * no public getter for them); borrowing behaviour against a server is RD-6. + *

    Limits: the pool settings are read by reflection from the Jedis pool, which is a commons-pool2 {@code GenericObjectPool} since + * Jedis 4; borrowing behaviour against a server is RD-6. */ public class RedisEngineConnectionTest { @@ -40,10 +40,7 @@ public class RedisEngineConnectionTest { private final RedisPlugin.RedisEngine engine = new RedisPlugin.RedisEngine(); private static Object poolSetting(JedisPool pool, String getter) throws Exception { - Field internal = redis.clients.jedis.util.Pool.class.getDeclaredField("internalPool"); - internal.setAccessible(true); - Object generic = internal.get(pool); - return generic.getClass().getMethod(getter).invoke(generic); + return pool.getClass().getMethod(getter).invoke(pool); } @Test @@ -70,7 +67,7 @@ public void createConnectionBuildsALazyPoolWithTheConfiguredSettings() throws Ex } } - /** Observation: only an ArrayIndexOutOfBoundsException is mapped to REDIS_URL_ERROR; an unparsable URI reaches the caller as the raw URISyntaxException. */ + /** Observation: only an ArrayIndexOutOfBoundsException or a plain IllegalArgumentException is mapped to REDIS_URL_ERROR; an unparsable URI reaches the caller as the raw URISyntaxException. */ @Test public void unparsableUriInUriModeReachesTheCallerAsAUriSyntaxException() { RedisDatasourceConfig bad = RedisDatasourceConfig.buildFrom(Map.of("usingUri", true, "uri", "redis://bad host:1")); diff --git a/server/api-service/lowcoder-plugins/redisPlugin/src/test/java/org/lowcoder/plugin/redis/utils/RedisUriUtilsTest.java b/server/api-service/lowcoder-plugins/redisPlugin/src/test/java/org/lowcoder/plugin/redis/utils/RedisUriUtilsTest.java index 5ba8d4484..58b8f03f3 100644 --- a/server/api-service/lowcoder-plugins/redisPlugin/src/test/java/org/lowcoder/plugin/redis/utils/RedisUriUtilsTest.java +++ b/server/api-service/lowcoder-plugins/redisPlugin/src/test/java/org/lowcoder/plugin/redis/utils/RedisUriUtilsTest.java @@ -112,19 +112,16 @@ public void passwordsWithReservedCharactersRoundTripBF055() throws Exception { } /** - * BF-055, the user-name half: a user name with characters a URI gives a meaning to comes back unchanged, except a colon: - * Jedis splits the decoded user info at its first colon, so a user name with one cannot be given (the limit documented on - * {@code RedisUriUtils.getUriAuth}). + * BF-055, the user-name half: a user name with characters a URI gives a meaning to comes back unchanged, a colon included: + * Jedis 8 splits the raw user info at its first colon before it decodes, so the encoded colon stays in the user name + * (Jedis 3 split the decoded text, so the rest of the name became part of the password). */ @Test - public void userNamesWithReservedCharactersRoundTripExceptAColonBF055() throws Exception { + public void userNamesWithReservedCharactersRoundTripBF055() throws Exception { for (String username : RESERVED) { - if (username.contains(":")) { - continue; - } assertEquals(List.of(username, PASSWORD, HOST), readBack(username, PASSWORD), username); } - assertEquals(List.of("a", "b:" + PASSWORD, HOST), readBack("a:b", PASSWORD), "the colon limit"); + assertEquals(List.of("a:b", PASSWORD, HOST), readBack("a:b", PASSWORD), "a colon in the user name"); } /** From a6876d4f6d1b97e317d869ea3830bc2244ebe4bb Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 07:55:19 +0100 Subject: [PATCH 25/40] build: update the Google API client stack of the Sheets plugin 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 --- .../api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml index 611856891..4cc7f9c4c 100644 --- a/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/googleSheetsPlugin/pom.xml @@ -28,17 +28,17 @@ com.google.api-client google-api-client - 1.31.2 + 2.9.2 com.google.oauth-client google-oauth-client-jetty - 1.30.6 + 1.39.0 com.google.auth google-auth-library-oauth2-http - 1.3.0 + 1.58.0 com.google.apis From ea9b561a04030187ca002a5916fe29182066118d Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 07:56:38 +0100 Subject: [PATCH 26/40] build: update the SQL Server JDBC driver to 13.6.2 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 --- server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml | 2 +- .../org/lowcoder/plugin/mssql/MssqlConnectorUrlTest.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml index 00c689438..5c5ae042e 100644 --- a/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/mssqlPlugin/pom.xml @@ -28,7 +28,7 @@ com.microsoft.sqlserver mssql-jdbc - 10.2.1.jre11 + 13.6.2.jre11 org.lowcoder diff --git a/server/api-service/lowcoder-plugins/mssqlPlugin/src/test/java/org/lowcoder/plugin/mssql/MssqlConnectorUrlTest.java b/server/api-service/lowcoder-plugins/mssqlPlugin/src/test/java/org/lowcoder/plugin/mssql/MssqlConnectorUrlTest.java index 018b8c81a..80e61a987 100644 --- a/server/api-service/lowcoder-plugins/mssqlPlugin/src/test/java/org/lowcoder/plugin/mssql/MssqlConnectorUrlTest.java +++ b/server/api-service/lowcoder-plugins/mssqlPlugin/src/test/java/org/lowcoder/plugin/mssql/MssqlConnectorUrlTest.java @@ -9,6 +9,7 @@ import java.sql.DriverPropertyInfo; import java.util.LinkedHashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Properties; @@ -46,7 +47,9 @@ private static String url(String host, String portAndDatabase) { private static Map parsed(String jdbcUrl) throws Exception { Map properties = new LinkedHashMap<>(); for (DriverPropertyInfo info : new SQLServerDriver().getPropertyInfo(jdbcUrl, new Properties())) { - properties.put(info.name, info.value); + // the driver reports a boolean property as "True"/"False" since 13.x and as "true"/"false" before; the URL says "true" + boolean isBoolean = "true".equalsIgnoreCase(info.value) || "false".equalsIgnoreCase(info.value); + properties.put(info.name, isBoolean ? info.value.toLowerCase(Locale.ROOT) : info.value); } return properties; } From 720f7488b195a6640f70d2c69d3bdb336189aabe Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 07:58:17 +0100 Subject: [PATCH 27/40] build: update the Snowflake JDBC driver to 4.4.1 Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb --- server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml | 2 +- .../org/lowcoder/plugin/snowflake/SnowflakeDriverStubTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml b/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml index b8349408a..16c40dc1f 100644 --- a/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/snowflakePlugin/pom.xml @@ -27,7 +27,7 @@ net.snowflake snowflake-jdbc - 3.22.0 + 4.4.1 org.lowcoder diff --git a/server/api-service/lowcoder-plugins/snowflakePlugin/src/test/java/org/lowcoder/plugin/snowflake/SnowflakeDriverStubTest.java b/server/api-service/lowcoder-plugins/snowflakePlugin/src/test/java/org/lowcoder/plugin/snowflake/SnowflakeDriverStubTest.java index cddd7a8ad..00a36bb4c 100644 --- a/server/api-service/lowcoder-plugins/snowflakePlugin/src/test/java/org/lowcoder/plugin/snowflake/SnowflakeDriverStubTest.java +++ b/server/api-service/lowcoder-plugins/snowflakePlugin/src/test/java/org/lowcoder/plugin/snowflake/SnowflakeDriverStubTest.java @@ -234,7 +234,7 @@ public void aSelectRunsThroughTheExecutorAndItsRowsComeFromTheJsonRowset() throw try (Connection connection = dataSource.getConnection()) { DatabaseMetaData metaData = connection.getMetaData(); System.out.println(TAG + "driver " + metaData.getDriverName() + " " + metaData.getDriverVersion()); - assertTrue(metaData.getDriverVersion().startsWith("3.22"), "the driver is snowflake-jdbc 3.22.x: " + metaData.getDriverVersion()); + assertTrue(metaData.getDriverVersion().startsWith("4.4"), "the driver is snowflake-jdbc 4.4.x: " + metaData.getDriverVersion()); } SnowflakeQueryExecutor executor = new SnowflakeQueryExecutor(); From d400392eac2c3896964d2f5ea87170e2cdb539fa Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 08:04:25 +0100 Subject: [PATCH 28/40] build: update the ClickHouse JDBC driver to 0.11.2 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 --- .../lowcoder-plugins/clickHousePlugin/pom.xml | 2 +- .../plugin/clickhouse/ClickHouseConnector.java | 18 +++++++++++++++--- .../clickhouse/ClickHouseQueryExecutor.java | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml b/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml index aa4d5afa7..da56d2961 100644 --- a/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/clickHousePlugin/pom.xml @@ -39,7 +39,7 @@ com.clickhouse clickhouse-jdbc - 0.3.2-patch11 + 0.11.2 all diff --git a/server/api-service/lowcoder-plugins/clickHousePlugin/src/main/java/org/lowcoder/plugin/clickhouse/ClickHouseConnector.java b/server/api-service/lowcoder-plugins/clickHousePlugin/src/main/java/org/lowcoder/plugin/clickhouse/ClickHouseConnector.java index 6bb47a2f1..6cf83f765 100644 --- a/server/api-service/lowcoder-plugins/clickHousePlugin/src/main/java/org/lowcoder/plugin/clickhouse/ClickHouseConnector.java +++ b/server/api-service/lowcoder-plugins/clickHousePlugin/src/main/java/org/lowcoder/plugin/clickhouse/ClickHouseConnector.java @@ -3,6 +3,9 @@ import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import com.zaxxer.hikari.pool.HikariPool.PoolInitializationException; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; import jakarta.annotation.Nonnull; import org.apache.commons.lang3.StringUtils; import org.lowcoder.plugin.clickhouse.model.ClickHouseDatasourceConfig; @@ -28,6 +31,7 @@ @Extension public class ClickHouseConnector implements DatasourceConnector { + private static final String VALIDATION_QUERY = "SELECT 1"; private static final String JDBC_DRIVER = "com.clickhouse.jdbc.ClickHouseDriver"; private static final long LEAK_DETECTION_THRESHOLD_MS = Duration.ofSeconds(30).toMillis(); private static final long MAX_LIFETIME_MS = TimeUnit.HOURS.toMillis(2); @@ -159,9 +163,8 @@ private HikariDataSource createHikariDataSource(ClickHouseDatasourceConfig datas String url = "jdbc:clickhouse:" + scheme + host + ":" + port + "/" + database; config.setJdbcUrl(url); - config.addDataSourceProperty("characterEncoding", "UTF-8"); - config.addDataSourceProperty("useUnicode", "true"); - + // No characterEncoding / useUnicode: they are MySQL driver properties that the 0.3 ClickHouse driver ignored and + // the 0.11 driver refuses ("Unknown and unmapped config properties"); the HTTP interface is UTF-8 anyway. config.setReadOnly(datasourceConfig.isReadonly()); HikariDataSource datasource; @@ -171,6 +174,15 @@ private HikariDataSource createHikariDataSource(ClickHouseDatasourceConfig datas throw new PluginException(DATASOURCE_ARGUMENT_ERROR, "DATASOURCE_ARGUMENT_ERROR", e.getMessage()); } + // The 0.11 driver connects lazily: a wrong password, a closed port or https against the HTTP port no longer fails + // the pool initialization, so the data source is checked with one query here, as the pool initialization did before. + try (Connection connection = datasource.getConnection(); Statement statement = connection.createStatement()) { + statement.execute(VALIDATION_QUERY); + } catch (SQLException | RuntimeException e) { + datasource.close(); + throw new PluginException(DATASOURCE_ARGUMENT_ERROR, "DATASOURCE_ARGUMENT_ERROR", e.getMessage()); + } + return datasource; } diff --git a/server/api-service/lowcoder-plugins/clickHousePlugin/src/main/java/org/lowcoder/plugin/clickhouse/ClickHouseQueryExecutor.java b/server/api-service/lowcoder-plugins/clickHousePlugin/src/main/java/org/lowcoder/plugin/clickhouse/ClickHouseQueryExecutor.java index b1b57ac9a..6e4b722ef 100644 --- a/server/api-service/lowcoder-plugins/clickHousePlugin/src/main/java/org/lowcoder/plugin/clickhouse/ClickHouseQueryExecutor.java +++ b/server/api-service/lowcoder-plugins/clickHousePlugin/src/main/java/org/lowcoder/plugin/clickhouse/ClickHouseQueryExecutor.java @@ -153,7 +153,7 @@ private QueryExecutionResult executeQuery0(HikariDataSource hikariDataSource, St resultSet = preparedQuery.getResultSet(); } else { statement = connection.createStatement(); - isResultSet = statement.execute(renderMustacheString(query, requestParams), Statement.RETURN_GENERATED_KEYS); + isResultSet = statement.execute(renderMustacheString(query, requestParams)); resultSet = statement.getResultSet(); } From 42467dfe05da284c01eb08b746bccdd6c4f44b03 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 08:08:05 +0100 Subject: [PATCH 29/40] build: update jjwt to 0.13.0 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 --- .../lowcoder-plugins/graphqlPlugin/pom.xml | 4 +-- server/api-service/lowcoder-server/pom.xml | 6 ++-- .../api/authentication/util/JWTUtils.java | 32 ++++++++++++------- .../api/authentication/util/JWTUtilsTest.java | 31 ++++++++++++++++++ 4 files changed, 57 insertions(+), 16 deletions(-) diff --git a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml index 2c3577e3e..fb18e5e9f 100644 --- a/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/graphqlPlugin/pom.xml @@ -52,12 +52,12 @@ io.jsonwebtoken jjwt-api - 0.11.2 + 0.13.0 io.jsonwebtoken jjwt-impl - 0.11.2 + 0.13.0 io.jsonwebtoken diff --git a/server/api-service/lowcoder-server/pom.xml b/server/api-service/lowcoder-server/pom.xml index b7ca5ad4f..230383e82 100644 --- a/server/api-service/lowcoder-server/pom.xml +++ b/server/api-service/lowcoder-server/pom.xml @@ -231,19 +231,19 @@ io.jsonwebtoken jjwt-api - 0.11.5 + 0.13.0 compile io.jsonwebtoken jjwt-jackson - 0.11.5 + 0.13.0 compile io.jsonwebtoken jjwt-impl - 0.11.5 + 0.13.0 runtime diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JWTUtils.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JWTUtils.java index 3bf20fcc4..5a8a7ddab 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JWTUtils.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/util/JWTUtils.java @@ -3,8 +3,9 @@ import io.jsonwebtoken.Claims; import io.jsonwebtoken.JwtParser; import io.jsonwebtoken.Jwts; -import io.jsonwebtoken.SignatureAlgorithm; +import io.jsonwebtoken.io.Decoders; import io.jsonwebtoken.io.Encoders; +import io.jsonwebtoken.security.Keys; import jakarta.annotation.PostConstruct; import lombok.extern.slf4j.Slf4j; import org.lowcoder.domain.user.model.User; @@ -16,6 +17,8 @@ import java.util.Date; +import javax.crypto.SecretKey; + @Component @Slf4j(topic = "JWTUtils") public class JWTUtils { @@ -25,6 +28,9 @@ public class JWTUtils { private JwtParser jwtParser; + private SecretKey signingKey; + + /** The Base64 text of the secret; tests read it to sign tokens of their own. */ private String base64EncodedSecret; private final String TOKEN_HEADER = "Authorization"; @@ -32,9 +38,12 @@ public class JWTUtils { @PostConstruct public void setup(){ + // The key is the configured secret's bytes, as before (jjwt 0.11 took the Base64 text of the secret and decoded it again), + // so tokens signed before the jjwt update keep validating. A secret under 256 bits is refused for HS256, as before. base64EncodedSecret = Encoders.BASE64.encode(authProperties.getApiKey().getSecret().getBytes()); - this.jwtParser = Jwts.parserBuilder() - .setSigningKey(base64EncodedSecret) + this.signingKey = Keys.hmacShaKeyFor(Decoders.BASE64.decode(base64EncodedSecret)); + this.jwtParser = Jwts.parser() + .verifyWith(signingKey) .build(); } @@ -48,20 +57,21 @@ public void setup(){ */ public String createToken(User user) { Claims claims = Jwts.claims() - .setSubject(user.getId()) - .setIssuedAt(new Date()) - .setId(IDUtils.generate()); - claims.put("userId", user.getId() ); - claims.put("createdBy", user.getName()); + .subject(user.getId()) + .issuedAt(new Date()) + .id(IDUtils.generate()) + .add("userId", user.getId()) + .add("createdBy", user.getName()) + .build(); return Jwts.builder() - .setClaims(claims) - .signWith(SignatureAlgorithm.HS256, base64EncodedSecret) + .claims(claims) + .signWith(signingKey, Jwts.SIG.HS256) .compact(); } public Claims parseJwtClaims(String token) { try { - return jwtParser.parseClaimsJws(token).getBody(); + return jwtParser.parseSignedClaims(token).getPayload(); } catch (Exception e) { log.warn("Failed to validate token. Exception: ", e); return null; diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/util/JWTUtilsTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/util/JWTUtilsTest.java index ca7fb0133..10c24d682 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/util/JWTUtilsTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/authentication/util/JWTUtilsTest.java @@ -43,6 +43,14 @@ class JWTUtilsTest { private static final String NEW134_LOG = "[NEW-134] "; private static final long MILLIS_PER_SECOND = 1000L; + /** + * A token signed by {@code JWTUtils.createToken} with jjwt 0.11.5, before the update to jjwt 0.13 (secret {@link #SECRET}, + * HS256, no expiry). API keys already stored by users are such tokens; they must keep validating. + */ + private static final String TOKEN_SIGNED_BY_JJWT_0_11_5 = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyLTEiLCJpYXQiOjE3MDAwMDAwMDAsImp0aSI6ImZpeHR1cmUtanRpIiwidXNlcklkIjoidXNlci0xIiwiY3JlYXRlZEJ5IjoiVXNlciBPbmUifQ.ibwWQtNPSgaymyzU_Z5GUhnfHwgXkwt2PNE2NyJpYFM"; + private static final String FIXTURE_JTI = "fixture-jti"; + private static final long FIXTURE_ISSUED_AT_SECONDS = 1_700_000_000L; + private JWTUtils jwtUtils; private static JWTUtils jwtUtilsWithSecret(String secret) { @@ -193,4 +201,27 @@ void resolveToken_prefixOnly_isTheEmptyString() { assertThat(jwtUtils.resolveToken(exchange("Bearer "))).isEmpty(); System.out.println("[JWTUtilsTest] 'Bearer ' -> empty string (today's behaviour)"); } + + @Test + void aTokenSignedBeforeTheJjwtUpdateStillValidates() { + Claims claims = jwtUtilsWithSecret(SECRET).parseJwtClaims(TOKEN_SIGNED_BY_JJWT_0_11_5); + assertNotNull(claims, "a stored API key must keep authenticating"); + assertThat(claims.getSubject()).isEqualTo(USER_ID); + assertThat(claims.get(USER_ID_CLAIM, String.class)).isEqualTo(USER_ID); + assertThat(claims.get(CREATED_BY_CLAIM, String.class)).isEqualTo(USER_NAME); + assertThat(claims.getId()).isEqualTo(FIXTURE_JTI); + assertThat(claims.getIssuedAt().getTime()).isEqualTo(FIXTURE_ISSUED_AT_SECONDS * MILLIS_PER_SECOND); + } + + @Test + void theTokenSignedBeforeTheJjwtUpdateIsRejectedUnderAnotherSecret() { + assertThat(jwtUtilsWithSecret(OTHER_SECRET).parseJwtClaims(TOKEN_SIGNED_BY_JJWT_0_11_5)).isNull(); + } + + @Test + void aTokenCreatedNowIsSignedWithHs256LikeTheOldOnes() { + String token = jwtUtilsWithSecret(SECRET).createToken(user(USER_ID, USER_NAME)); + String header = new String(java.util.Base64.getUrlDecoder().decode(token.split("\\.")[0]), java.nio.charset.StandardCharsets.UTF_8); + assertThat(header).isEqualTo("{\"alg\":\"HS256\"}"); + } } From 56425a0b61acec34b9b7ae8dcffa7fface341bdf Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 08:08:59 +0100 Subject: [PATCH 30/40] build: update BlockHound of the Elasticsearch plugin to 1.0.19.RELEASE Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb --- server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml b/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml index da5db7ca9..8c78f044e 100644 --- a/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml +++ b/server/api-service/lowcoder-plugins/elasticSearchPlugin/pom.xml @@ -47,7 +47,7 @@ io.projectreactor.tools blockhound - 1.0.6.RELEASE + 1.0.19.RELEASE test From 7db31e5e9d43289d3d4fe97511f943e985394222 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 08:33:43 +0100 Subject: [PATCH 31/40] build: use the rjson 1.3.1 release instead of the 1.3.1 snapshot 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 --- .../rjson/1.3.1-SNAPSHOT/_remote.repositories | 4 --- .../maven-metadata-vault-proxy.xml | 25 ---------------- ...ta-vault-proxy.xml.7536061247895154110.tmp | 25 ---------------- .../maven-metadata-vault-proxy.xml.sha1 | 1 - .../1.3.1-SNAPSHOT/resolver-status.properties | 3 -- .../rjson-1.3.1-20210724.182155-1.jar | Bin 137412 -> 0 bytes .../rjson-1.3.1-20210724.182155-1.jar.sha1 | 1 - .../rjson-1.3.1-20210724.182155-1.pom | 8 ------ .../rjson-1.3.1-20210724.182155-1.pom.sha1 | 1 - .../1.3.1-SNAPSHOT/rjson-1.3.1-SNAPSHOT.jar | Bin 137412 -> 0 bytes .../1.3.1-SNAPSHOT/rjson-1.3.1-SNAPSHOT.pom | 8 ------ .../rjson/maven-metadata-vault-proxy.xml | 13 --------- .../rjson/maven-metadata-vault-proxy.xml.sha1 | 1 - .../rjson/rjson/resolver-status.properties | 3 -- .../api-service/lowcoder-dependencies/pom.xml | 2 +- server/api-service/lowcoder-plugins/pom.xml | 9 +----- server/api-service/lowcoder-sdk/pom.xml | 9 +----- server/api-service/lowcoder-server/pom.xml | 27 ------------------ 18 files changed, 3 insertions(+), 137 deletions(-) delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/_remote.repositories delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml.7536061247895154110.tmp delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml.sha1 delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/resolver-status.properties delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.jar delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.jar.sha1 delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.pom delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.pom.sha1 delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-SNAPSHOT.jar delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-SNAPSHOT.pom delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/maven-metadata-vault-proxy.xml delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/maven-metadata-vault-proxy.xml.sha1 delete mode 100644 server/api-service/local-repo/tv/twelvetone/rjson/rjson/resolver-status.properties diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/_remote.repositories b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/_remote.repositories deleted file mode 100644 index db303e7ab..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice. -#Sat Sep 21 00:11:37 CEST 2024 -rjson-1.3.1-20210724.182155-1.jar>vault-proxy= -rjson-1.3.1-20210724.182155-1.pom>vault-proxy= diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml deleted file mode 100644 index c47f1b1e1..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - tv.twelvetone.rjson - rjson - 1.3.1-SNAPSHOT - - - 20210724.182155 - 1 - - 20210724182155 - - - pom - 1.3.1-20210724.182155-1 - 20210724182155 - - - jar - 1.3.1-20210724.182155-1 - 20210724182155 - - - - diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml.7536061247895154110.tmp b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml.7536061247895154110.tmp deleted file mode 100644 index c47f1b1e1..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml.7536061247895154110.tmp +++ /dev/null @@ -1,25 +0,0 @@ - - - tv.twelvetone.rjson - rjson - 1.3.1-SNAPSHOT - - - 20210724.182155 - 1 - - 20210724182155 - - - pom - 1.3.1-20210724.182155-1 - 20210724182155 - - - jar - 1.3.1-20210724.182155-1 - 20210724182155 - - - - diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml.sha1 b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml.sha1 deleted file mode 100644 index b19dd9b68..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/maven-metadata-vault-proxy.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -f102838e293f93813c3cd40d32d0266dec77e664 \ No newline at end of file diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/resolver-status.properties b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/resolver-status.properties deleted file mode 100644 index 3cc83f9bc..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/resolver-status.properties +++ /dev/null @@ -1,3 +0,0 @@ -#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice. -#Tue Sep 30 10:51:07 CEST 2025 -maven-metadata-vault-proxy.xml.lastUpdated=1759222267613 diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.jar b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.jar deleted file mode 100644 index db939773c61671163f65d930cc2e54d17755ead3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 137412 zcmaf)1yEe;)}|8(5TFT8a0u@1?(QDE@y6XHSmOkD2ol`gA$V|icX#(8_ul#EoI7=9 zx@%Ki)VDXyx1V~~TJKt0K^pP{+`D%lKfa5%yi*;)b}O>FF~ z=qzj;EkV|LRyIaXmd1wq`uZks#|Hy7is4_zJ){asdFo0TDar|&F+UQE5|in>kCU{O zQj#`R6ApEVy4N)oqf)dXjLw6M&~nN0jCOK^5{!0S6KyH&V6zT}sYXUoH_jnq)L-a&>cNlQ^dhB96LI*7xp!Tihr@n=)szWV>{9^~6+N9X@*-~PJf z)4!KEx)@tJ8#~%q8~<(fpN;wJ>OZ^ucEP`_wl{aMvHsgRf4+p-5UBPm)Vp`0DW4``u(hB=V}~hcFNE6*Wla5_BF`OoIQYX_xPu_`#rt&@KZj{$klm- z51`43Rr6S@QCl@8VyS8a;Kou zEzKKrtne>P<=LK2w^e7F!0rQ3)2`Qv1$qTFxwNu$|sOm8s$7QhFWhvZFx?NV9C` z0Hc&SA+-=2I^CQxgf8F{m>h#j9M4aI{-o=@PFHa>OZQeQ2bm+F&Ey4>0ElrhqZ{wWzwkS6Ip>FY_qyBsz$)U ziYvzMOfeUke)aQun10g^To<5PW=57AxV|R#(&Up+<_6)hP=TXpf0-l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HiKBuNf~W53;tD%p6(rtXdn^=KN&)DU5~;CMv=FF6bK1m=_IxoA zO$msGy!@3<55d#f)!tzPs3mmySBTm3B|tuhBxO3&!Bps2AAWH2lop61F%U<*NURgA z5UhQfoZ56}wH9W+o16|xo?oze=^}x^8K9!`NR?D@LR7NTyCYUWp+!dfFTaZ#&=50o zIwYDO4+QOJ=pV97Z=U+#@mV0AJJ16a67(G(1a#L>yJ%=BRYja}?13v007;QeFC`2C z{3|q}sqK?JVGBUSQZPhE_VrD0&jxv!?pNA_Mx7Oq^h^W-N&x|pjY2L1fs%ByxA#;s zu|Hs`1fenj+9@E-|15~{-|D6PG|0O<=u|(HA7G%M6o5H9<=*w+GdF-n77~ECx3jZO z4Bfm*w^kNm(18VlyoEeZ$5Dsm{V|uJ{^R?ir2|=q0^Dq8 zfC(+~$_y#-1)xMF;MmB0nwlXb4xxfw`3}mBtA^!P1wae<*!#Pl2BQO!J6b&~37H>V zw?OoiwZI#Zg{_1^l6M8&eRu%6{UwXf9{U0$Hb5dzP_nHLMII(E>BJbVAkaiL@G;~; zh&>2XC;!|I1=cK-`Vf3vYNA=$q) z3oYyZcMbjKITakp+jRnH;QsUde*={&4g~I+{*W$x|B2qe$(7Xyl6U*zzs~pGAE^6} z?fuPWt~-#8bPC&k;{Nj=e-n9HAc;E*SBK0z_8$}X8*1JL2}M|cZ&L72arYnS^P7y{ zb0GPra-oj**{_cMhg>q2d&ll#{d8T diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.jar.sha1 b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.jar.sha1 deleted file mode 100644 index b5ec94e07..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -33eff182d4ddc80f75e7a5cc34564a01e70a6881 \ No newline at end of file diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.pom b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.pom deleted file mode 100644 index dbe1e2aad..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.pom +++ /dev/null @@ -1,8 +0,0 @@ - - - 4.0.0 - tv.twelvetone.rjson - rjson - 1.3.1-SNAPSHOT - diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.pom.sha1 b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.pom.sha1 deleted file mode 100644 index f2ec62472..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-20210724.182155-1.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -7d3c2960bb2d14b9ca280d73a35cf11314b871f7 \ No newline at end of file diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-SNAPSHOT.jar b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-SNAPSHOT.jar deleted file mode 100644 index db939773c61671163f65d930cc2e54d17755ead3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 137412 zcmaf)1yEe;)}|8(5TFT8a0u@1?(QDE@y6XHSmOkD2ol`gA$V|icX#(8_ul#EoI7=9 zx@%Ki)VDXyx1V~~TJKt0K^pP{+`D%lKfa5%yi*;)b}O>FF~ z=qzj;EkV|LRyIaXmd1wq`uZks#|Hy7is4_zJ){asdFo0TDar|&F+UQE5|in>kCU{O zQj#`R6ApEVy4N)oqf)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yZcMbjKITakp+jRnH;QsUde*={&4g~I+{*W$x|B2qe$(7Xyl6U*zzs~pGAE^6} z?fuPWt~-#8bPC&k;{Nj=e-n9HAc;E*SBK0z_8$}X8*1JL2}M|cZ&L72arYnS^P7y{ zb0GPra-oj**{_cMhg>q2d&ll#{d8T diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-SNAPSHOT.pom b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-SNAPSHOT.pom deleted file mode 100644 index dbe1e2aad..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/1.3.1-SNAPSHOT/rjson-1.3.1-SNAPSHOT.pom +++ /dev/null @@ -1,8 +0,0 @@ - - - 4.0.0 - tv.twelvetone.rjson - rjson - 1.3.1-SNAPSHOT - diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/maven-metadata-vault-proxy.xml b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/maven-metadata-vault-proxy.xml deleted file mode 100644 index 5f71bffbe..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/maven-metadata-vault-proxy.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - tv.twelvetone.rjson - rjson - - 1.3.1-SNAPSHOT - - 1.0-SNAPSHOT - 1.3.1-SNAPSHOT - - 20210724182156 - - diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/maven-metadata-vault-proxy.xml.sha1 b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/maven-metadata-vault-proxy.xml.sha1 deleted file mode 100644 index 19f923ae5..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/maven-metadata-vault-proxy.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -c560949fd4404bbf2f643ec320e9d077c3b06934 \ No newline at end of file diff --git a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/resolver-status.properties b/server/api-service/local-repo/tv/twelvetone/rjson/rjson/resolver-status.properties deleted file mode 100644 index 4c30d8969..000000000 --- a/server/api-service/local-repo/tv/twelvetone/rjson/rjson/resolver-status.properties +++ /dev/null @@ -1,3 +0,0 @@ -#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice. -#Fri Sep 19 18:14:48 CEST 2025 -maven-metadata-vault-proxy.xml.lastUpdated=1758298488456 diff --git a/server/api-service/lowcoder-dependencies/pom.xml b/server/api-service/lowcoder-dependencies/pom.xml index a617f66a8..10c77c1fe 100644 --- a/server/api-service/lowcoder-dependencies/pom.xml +++ b/server/api-service/lowcoder-dependencies/pom.xml @@ -87,7 +87,7 @@ tv.twelvetone.rjson rjson - 1.3.1-SNAPSHOT + 1.3.1 es.moki.ratelimitj diff --git a/server/api-service/lowcoder-plugins/pom.xml b/server/api-service/lowcoder-plugins/pom.xml index 85a93b8c2..6c5bce90d 100644 --- a/server/api-service/lowcoder-plugins/pom.xml +++ b/server/api-service/lowcoder-plugins/pom.xml @@ -13,13 +13,6 @@ lowcoder-plugins pom - - - local_libs - Temporary local libraries - file://${maven.multiModuleProjectDirectory}/local-repo - - tv.twelvetone.rjson rjson diff --git a/server/api-service/lowcoder-plugins/pom.xml b/server/api-service/lowcoder-plugins/pom.xml index 6c5bce90d..3615ad968 100644 --- a/server/api-service/lowcoder-plugins/pom.xml +++ b/server/api-service/lowcoder-plugins/pom.xml @@ -59,6 +59,7 @@ test + tv.twelvetone.rjson rjson diff --git a/server/api-service/lowcoder-sdk/pom.xml b/server/api-service/lowcoder-sdk/pom.xml index 12290f886..4b09a964f 100644 --- a/server/api-service/lowcoder-sdk/pom.xml +++ b/server/api-service/lowcoder-sdk/pom.xml @@ -126,6 +126,7 @@ guava + tv.twelvetone.rjson rjson From 635f8d3bffb8bbdda6efe0eab01968ad80c3f433 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 09:25:59 +0100 Subject: [PATCH 34/40] test: mock AddSuperAdminRunner in OrganizationServiceImplCreationMongoTest 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 --- .../OrganizationServiceImplCreationMongoTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/organization/OrganizationServiceImplCreationMongoTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/organization/OrganizationServiceImplCreationMongoTest.java index 2d50e173c..bc356e93a 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/organization/OrganizationServiceImplCreationMongoTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/organization/OrganizationServiceImplCreationMongoTest.java @@ -23,6 +23,7 @@ import org.lowcoder.domain.organization.service.OrganizationService; import org.lowcoder.domain.user.model.User; import org.lowcoder.infra.birelation.BiRelation; +import org.lowcoder.runner.init.AddSuperAdminRunner; import org.lowcoder.sdk.config.CommonConfig; import org.lowcoder.sdk.constants.GlobalContext; import org.lowcoder.sdk.constants.WorkspaceMode; @@ -33,6 +34,7 @@ import org.springframework.data.mongodb.core.query.Query; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.bean.override.mockito.MockitoBean; /** * Organisation creation, default organisations, enterprise-mode lookup and domain lookup of OrganizationServiceImpl (unit @@ -49,6 +51,12 @@ class OrganizationServiceImplCreationMongoTest extends OrganizationMongoTestBase private static final String CHINESE_SUFFIX = "的工作区"; private static final String GERMAN_REQUEST_USER_NAME = "Gerda"; + /** + * Replaced by a mock: its start-up job writes the super-admin user and organisation in the background (a + * fire-and-forget subscription) and would otherwise race with the collection wipe in {@link #emptyTheCollectionsAndRememberTheConfiguration()}. + */ + @MockitoBean + private AddSuperAdminRunner addSuperAdminRunner; @Autowired private OrganizationService organizationService; @Autowired From 24b6af26cc6d59db1231387d6801e149d8e2f658 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 10:04:44 +0100 Subject: [PATCH 35/40] test: remove the duplicate org.json class and the null-definition errors 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 --- server/api-service/lowcoder-server/pom.xml | 8 ++++++++ .../datasource/DatasourceRepositoryMongoTest.java | 14 +++++++++++--- .../ResourcePermissionBatchWorkspaceMongoTest.java | 14 +++++++++++--- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/server/api-service/lowcoder-server/pom.xml b/server/api-service/lowcoder-server/pom.xml index 31763a206..16b6d5b57 100644 --- a/server/api-service/lowcoder-server/pom.xml +++ b/server/api-service/lowcoder-server/pom.xml @@ -162,6 +162,14 @@ org.springframework.boot spring-boot-starter-test test + + + + com.vaadin.external.google + android-json + + org.springframework.boot diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/DatasourceRepositoryMongoTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/DatasourceRepositoryMongoTest.java index 9ed7a8c95..2d3551006 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/DatasourceRepositoryMongoTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/datasource/DatasourceRepositoryMongoTest.java @@ -18,6 +18,7 @@ import org.lowcoder.domain.datasource.model.DatasourceStatus; import org.lowcoder.domain.datasource.repository.DatasourceRepository; import org.lowcoder.domain.plugin.client.DatasourcePluginClient; +import org.lowcoder.domain.plugin.client.dto.DatasourcePluginDefinition; import org.lowcoder.domain.plugin.service.DatasourceMetaInfoService; import org.lowcoder.sdk.models.JsDatasourceConnectionConfig; import org.lowcoder.sdk.util.IDUtils; @@ -37,7 +38,7 @@ * DatasourceRepository against the MongoDB test container (unit U14, task L3-11c). The plugin connectors are not available * in this module's surefire context, so the class has a Spring context of its own (extra property, hence its own database) * with a mocked DatasourceMetaInfoService (every type is a "JS" datasource whose config is the stored map) and a mocked - * DatasourcePluginClient (no plugin definition). Every test works under ids and organisations it generates. Not repeated: + * DatasourcePluginClient (a plugin definition without params). Every test works under ids and organisations it generates. Not repeated: * DatasourcePersistenceContractTest (the stored shape of save), the L1-3 row on DatasourceApiServiceImpl.getPluginDynamicConfig, * the L3-3 row on Datasource.mergeWith. */ @@ -60,10 +61,17 @@ class DatasourceRepositoryMongoTest { private ReactiveMongoTemplate mongo; @BeforeEach - void everyTypeIsAJsDatasourceWithoutADefinition() { + void everyTypeIsAJsDatasourceWithoutParams() { when(datasourceMetaInfoService.isJsDatasourcePlugin(anyString())).thenReturn(true); when(datasourceMetaInfoService.isJsDatasourcePlugin(BROKEN_TYPE)).thenThrow(new IllegalStateException("no connector")); - when(datasourcePluginClient.getDatasourcePluginDefinition(anyString())).thenReturn(Mono.empty()); + when(datasourcePluginClient.getDatasourcePluginDefinition(anyString())).thenReturn(Mono.just(definitionWithoutParams())); + } + + /** A plugin definition that declares no params: nothing is a password, so a stored config round-trips as it is. */ + private static DatasourcePluginDefinition definitionWithoutParams() { + DatasourcePluginDefinition definition = new DatasourcePluginDefinition(); + definition.put("dataSourceConfig", Map.of("params", List.of())); + return definition; } private static String org() { diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/permission/ResourcePermissionBatchWorkspaceMongoTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/permission/ResourcePermissionBatchWorkspaceMongoTest.java index 001b07c0a..3993afb4b 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/permission/ResourcePermissionBatchWorkspaceMongoTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/permission/ResourcePermissionBatchWorkspaceMongoTest.java @@ -36,6 +36,7 @@ import org.lowcoder.domain.permission.model.ResourceRole; import org.lowcoder.domain.permission.service.ResourcePermissionService; import org.lowcoder.domain.plugin.client.DatasourcePluginClient; +import org.lowcoder.domain.plugin.client.dto.DatasourcePluginDefinition; import org.lowcoder.domain.plugin.service.DatasourceMetaInfoService; import org.lowcoder.sdk.exception.BizError; import org.lowcoder.sdk.exception.BizException; @@ -55,7 +56,7 @@ * MongoDB test container (D-38): every id of a batch is decided in its OWN workspace instead of the first id's. Own * Spring context (extra property, hence its own database), the pattern of {@code DatasourceRepositoryMongoTest}: a * mocked {@code DatasourceMetaInfoService} (every type is a JS data source) and a mocked {@code DatasourcePluginClient} - * (no plugin definition). Every test generates its own ids; no seed data. + * (a plugin definition without params). Every test generates its own ids; no seed data. */ @SpringBootTest(classes = ServerApplication.class) @ActiveProfiles("test") @@ -149,10 +150,17 @@ private Map maxMatching(List ids, ResourceAction a return roles; } + /** A plugin definition that declares no params: nothing is a password, so a stored config round-trips as it is. */ + private static DatasourcePluginDefinition definitionWithoutParams() { + DatasourcePluginDefinition definition = new DatasourcePluginDefinition(); + definition.put("dataSourceConfig", Map.of("params", List.of())); + return definition; + } + @org.junit.jupiter.api.BeforeEach - void everyTypeIsAJsDatasourceWithoutADefinition() { + void everyTypeIsAJsDatasourceWithoutParams() { when(datasourceMetaInfoService.isJsDatasourcePlugin(anyString())).thenReturn(true); - when(datasourcePluginClient.getDatasourcePluginDefinition(anyString())).thenReturn(Mono.empty()); + when(datasourcePluginClient.getDatasourcePluginDefinition(anyString())).thenReturn(Mono.just(definitionWithoutParams())); } /** Catches a batch answer diverging from each id's own one-id answer in the same workspace. */ From 39a90392b3372e082b5471925a3188dd719c8992 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 12:45:45 +0100 Subject: [PATCH 36/40] test(e2e): cover the springdoc pages and fix three stale tests 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 --- e2e/README.md | 11 +-- e2e/src/constants.ts | 12 +++ e2e/src/pages/AppListPage.ts | 20 ++++- e2e/tests/components/npm-components.spec.ts | 15 +++- e2e/tests/smoke/api-docs.spec.ts | 86 +++++++++++++++++++++ e2e/tests/workspace/leave-removal.spec.ts | 19 +++-- 6 files changed, 148 insertions(+), 15 deletions(-) create mode 100644 e2e/tests/smoke/api-docs.spec.ts diff --git a/e2e/README.md b/e2e/README.md index aaff6acd9..6e834e11a 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -311,14 +311,14 @@ Test titles carry these ids. ## Test catalogue -Counts (re-measured 2026-11-25 with `LOWCODER_BASE_URL=http://localhost:1 ./node_modules/.bin/playwright test --list --reporter=list` from `e2e/`; this is a static listing, not a Docker run. Docker evidence: (1) the "confirmed in the combined run" notes of the security and lifecycle rows below come from an earlier run against an image built from the security-fix branch (tag `secfix-combined-e2e`, 693 of 696 default tests passed); that run predates the node-service specs (D3 to D10) and says nothing about them. (2) The full default run of the 859-test suite after the S3 sidecar scenarios (D16) landed, `e2e/scripts/run-in-docker.sh` without arguments on the default image `3.0.0-e2e` (no variable set): 44 failed, 815 passed (6.8 min). It started no Firebird, libSQL, CouchDB, DynamoDB Local or S3 container (the script's log shows only the PostgreSQL, echo and app `Starting` lines; a default `tests/smoke` run watched with a container sampler (one `docker ps` every 0.3 s) showed the PostgreSQL, echo, app and runner containers only) and ran no D12 to D16 test (they are not in the listing). The baseline from a clean `git worktree` of the previous commit (850 tests, same command and image, run before the edits): 45 failed, 805 passed (6.7 min). The failing sets are identical except one test (compared by test name, 45 against 44 lines): `components/media.spec.ts` S12 "carousel shows its two slides and the second dot fires change" failed in the baseline and passed in this run (it is not related to the node-service work and was not re-run to see whether it is intermittent). By tag the 44 failures are 25 `@security`, 17 `@lifecycle` (LC-PW02 of them also `@core`), 1 more `@core` (`apps/card-menu.spec.ts` export and import) and 1 `@npm` (`components/npm-components.spec.ts` calendar, also `@slow`), the same as the baseline's apart from the carousel test; the security and lifecycle ones depend on security fixes the unfixed image lacks (classified by tag, not analysed one by one). `SEC-R09d` failed in both runs (it is intermittent: it passed in earlier full runs); the periodic trigger test of `logic/triggers.spec.ts` failed in neither. The ten extra passes are the nine new unit tests of `foundation/node-plugins.spec.ts` and the carousel test. No node-service scenario failed. The D12, D13 and D14 evidence is a separate gate each, `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1 e2e/scripts/run-in-docker.sh --repeat-each=10 --workers=4 `: for `tests/datasource/plugin-firebird.spec.ts` 110 passed on `3.0.0-e2e` and 110 passed on `3.0.1-e2e` (measured when D12 landed), for `tests/datasource/plugin-turso-libsql.spec.ts` 110 passed on `3.0.0-e2e` and 110 passed on `3.0.1-e2e` (measured when D13 landed), for `tests/datasource/plugin-couchdb.spec.ts` 100 passed on `3.0.0-e2e` and 100 passed on `3.0.1-e2e`, and after the readiness probes got their time limits 110 passed for the Firebird spec and 110 for the libSQL spec on `3.0.0-e2e` (all three sidecars start; the app was ready 15 s after the first container started with the flag against 14 s without it). For `tests/datasource/plugin-dynamodb-local.spec.ts` (D15) 120 passed on `3.0.0-e2e` and 120 passed on `3.0.1-e2e`, run after the last change of the spec (all four sidecars start; `docker events` showed the PostgreSQL, echo, Firebird, libSQL, CouchDB and DynamoDB Local containers created within one second, and the script logged every readiness wait as `ready after 0s`, the last one three seconds after the first container was created; the readiness waits run after the app container is started, so they do not delay it). Dangling volumes, measured by hand on one machine (no artifact is committed): before the PostgreSQL and Firebird sidecars got a tmpfs over their declared data volumes (`/var/lib/postgresql/data`, `/var/lib/firebird/data`), a default run left one anonymous volume (PostgreSQL's) and a flagged run two (PostgreSQL's and Firebird's); the libSQL and CouchDB sidecars already mounted a tmpfs over theirs, and the images of DynamoDB Local, the echo and the app declare none. Method: `docker volume ls -q -f dangling=true` sorted and diffed before and after each run, and `docker events --since --until --filter type=volume --filter event=create` over the run. Results (count before to after, volume-create events, 0 in every row but the control): the default `tests/smoke` run 222 to 222; the flagged single-spec runs of Firebird, libSQL, CouchDB and DynamoDB Local 222 to 222 each; a deliberately failing flagged run (one assertion of the Firebird spec inverted, then restored; the run exited 1) 222 to 222; the five gates (`--repeat-each=10 --workers=4` of the four sidecar specs with the flag, and of `tests/smoke` without it) 223 to 223 each, and the Firebird gate on `lowcoderorg/lowcoder-ce:3.0.1-e2e` 223 to 223; in none of them did the list gain a name. A control, the pinned PostgreSQL image started without the tmpfs and then removed, logged exactly one create event and took the count from 222 to 223 (the new name was in the diff), so the method does see a leak. The count of the machine drifted between sessions (222, then 223) because of unrelated Docker activity, so only before/after pairs taken close together are evidence, not the absolute numbers. The 130 or more dangling volumes of earlier runs were not touched; `docker volume ls -q -f dangling=true` lists them, and it may list other projects' volumes, so delete them only knowing whose they are. With the flag, `--grep @node-service-sidecar` ran all the sidecar tests (D12, D13, D14) in one run when D14 landed: 32 passed; D15 was run through its own gate above, not in that combined run. After the four readiness loops got their elapsed-time deadline, `tests/datasource/plugin-firebird.spec.ts` (11), `plugin-turso-libsql.spec.ts` (11) and `plugin-couchdb.spec.ts` (10) each ran once on `3.0.0-e2e` with the flag and passed, and the D15 gate above was repeated (120 passed on both images). For `tests/datasource/plugin-s3-server.spec.ts` (D16) `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1 e2e/scripts/run-in-docker.sh --repeat-each=10 --workers=4 tests/datasource/plugin-s3-server.spec.ts`: 150 passed on `3.0.0-e2e` (34.8 s) and 150 passed on `lowcoderorg/lowcoder-ce:3.0.1-e2e` (36.0 s) (all five sidecars start; the script logged every readiness wait as `ready after 0s` or `1s`). With the flag, `--grep @node-service-sidecar --workers=4` ran all five sidecar specs in one run: 59 passed (D12 11, D13 11, D14 10, D15 12, D16 15; 16.9 s). Ten inverted assertions of the D16 spec (the wrong-secret message, a bucket listed after its create, the stored content type, the limited listing, the truncated answer, the deleted key's status, the tampered-signature code, the missing-key message, the empty-bucket message and the large body's size) failed in one run and the restored file passed again; six deliberate changes of the run script (the S3 loop back to the sleep-only counter, its accepted status widened, its abort limit removed, one tmpfs removed, the trap's container removed, a network alias added) made five structural tests fail, and three changes of `src/datasource/s3.ts` (the string to sign, the IPv4 check, the key encoding) made three unit tests fail; each was restored and checked by checksum. A deliberately failing flagged run (one D16h assertion inverted, restored afterwards) ended with the run exiting 1, no container and no network left (`docker ps -a` and `docker network ls` filtered on the run's name prefix: 0 and 0). A default `tests/smoke` run, the flagged hold run that made the hand measurements above, and that failing flagged run each took the dangling-volume count from 223 to 223 with no volume-create event (`docker events`), and the new names diff was empty. These Docker results were measured by hand on one machine; no result files are committed, so re-run the commands named here to reproduce them.): -default **859 tests in 114 files**; with `E2E_INCLUDE_QUARANTINE=1` **873 in 115**; with `E2E_INCLUDE_SUPERADMIN=1` **864 in 114**; with both of those **878 in 115**; -with `E2E_INCLUDE_INSERT_ALL=1` **971 in 115**; with all three opt-in variables **990 in 116** (the takeover variable changes nothing on the default stack); with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1` **918 in 119** (the 11 D12 tests of the Firebird sidecar, the 11 D13 tests of the libSQL sidecar, the 10 D14 tests of the CouchDB sidecar, the 12 D15 tests of the DynamoDB Local sidecar and the 15 D16 tests of the S3 sidecar, which no other variable lists), and **1049 in 121** with the other three variables as well. With `E2E_STACK_PROFILE=enterprise`: +Counts (re-measured 2026-11-26 with `LOWCODER_BASE_URL=http://localhost:1 ./node_modules/.bin/playwright test --list --reporter=list` from `e2e/`; this is a static listing, not a Docker run. Docker evidence: (1) the "confirmed in the combined run" notes of the security and lifecycle rows below come from an earlier run against an image built from the security-fix branch (tag `secfix-combined-e2e`, 693 of 696 default tests passed); that run predates the node-service specs (D3 to D10) and says nothing about them. (2) The full default run of the 859-test suite after the S3 sidecar scenarios (D16) landed, `e2e/scripts/run-in-docker.sh` without arguments on the default image `3.0.0-e2e` (no variable set): 44 failed, 815 passed (6.8 min). It started no Firebird, libSQL, CouchDB, DynamoDB Local or S3 container (the script's log shows only the PostgreSQL, echo and app `Starting` lines; a default `tests/smoke` run watched with a container sampler (one `docker ps` every 0.3 s) showed the PostgreSQL, echo, app and runner containers only) and ran no D12 to D16 test (they are not in the listing). The baseline from a clean `git worktree` of the previous commit (850 tests, same command and image, run before the edits): 45 failed, 805 passed (6.7 min). The failing sets are identical except one test (compared by test name, 45 against 44 lines): `components/media.spec.ts` S12 "carousel shows its two slides and the second dot fires change" failed in the baseline and passed in this run (it is not related to the node-service work and was not re-run to see whether it is intermittent). By tag the 44 failures are 25 `@security`, 17 `@lifecycle` (LC-PW02 of them also `@core`), 1 more `@core` (`apps/card-menu.spec.ts` export and import) and 1 `@npm` (`components/npm-components.spec.ts` calendar, also `@slow`), the same as the baseline's apart from the carousel test; the security and lifecycle ones depend on security fixes the unfixed image lacks (classified by tag, not analysed one by one). `SEC-R09d` failed in both runs (it is intermittent: it passed in earlier full runs); the periodic trigger test of `logic/triggers.spec.ts` failed in neither. The ten extra passes are the nine new unit tests of `foundation/node-plugins.spec.ts` and the carousel test. No node-service scenario failed. The D12, D13 and D14 evidence is a separate gate each, `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1 e2e/scripts/run-in-docker.sh --repeat-each=10 --workers=4 `: for `tests/datasource/plugin-firebird.spec.ts` 110 passed on `3.0.0-e2e` and 110 passed on `3.0.1-e2e` (measured when D12 landed), for `tests/datasource/plugin-turso-libsql.spec.ts` 110 passed on `3.0.0-e2e` and 110 passed on `3.0.1-e2e` (measured when D13 landed), for `tests/datasource/plugin-couchdb.spec.ts` 100 passed on `3.0.0-e2e` and 100 passed on `3.0.1-e2e`, and after the readiness probes got their time limits 110 passed for the Firebird spec and 110 for the libSQL spec on `3.0.0-e2e` (all three sidecars start; the app was ready 15 s after the first container started with the flag against 14 s without it). For `tests/datasource/plugin-dynamodb-local.spec.ts` (D15) 120 passed on `3.0.0-e2e` and 120 passed on `3.0.1-e2e`, run after the last change of the spec (all four sidecars start; `docker events` showed the PostgreSQL, echo, Firebird, libSQL, CouchDB and DynamoDB Local containers created within one second, and the script logged every readiness wait as `ready after 0s`, the last one three seconds after the first container was created; the readiness waits run after the app container is started, so they do not delay it). Dangling volumes, measured by hand on one machine (no artifact is committed): before the PostgreSQL and Firebird sidecars got a tmpfs over their declared data volumes (`/var/lib/postgresql/data`, `/var/lib/firebird/data`), a default run left one anonymous volume (PostgreSQL's) and a flagged run two (PostgreSQL's and Firebird's); the libSQL and CouchDB sidecars already mounted a tmpfs over theirs, and the images of DynamoDB Local, the echo and the app declare none. Method: `docker volume ls -q -f dangling=true` sorted and diffed before and after each run, and `docker events --since --until --filter type=volume --filter event=create` over the run. Results (count before to after, volume-create events, 0 in every row but the control): the default `tests/smoke` run 222 to 222; the flagged single-spec runs of Firebird, libSQL, CouchDB and DynamoDB Local 222 to 222 each; a deliberately failing flagged run (one assertion of the Firebird spec inverted, then restored; the run exited 1) 222 to 222; the five gates (`--repeat-each=10 --workers=4` of the four sidecar specs with the flag, and of `tests/smoke` without it) 223 to 223 each, and the Firebird gate on `lowcoderorg/lowcoder-ce:3.0.1-e2e` 223 to 223; in none of them did the list gain a name. A control, the pinned PostgreSQL image started without the tmpfs and then removed, logged exactly one create event and took the count from 222 to 223 (the new name was in the diff), so the method does see a leak. The count of the machine drifted between sessions (222, then 223) because of unrelated Docker activity, so only before/after pairs taken close together are evidence, not the absolute numbers. The 130 or more dangling volumes of earlier runs were not touched; `docker volume ls -q -f dangling=true` lists them, and it may list other projects' volumes, so delete them only knowing whose they are. With the flag, `--grep @node-service-sidecar` ran all the sidecar tests (D12, D13, D14) in one run when D14 landed: 32 passed; D15 was run through its own gate above, not in that combined run. After the four readiness loops got their elapsed-time deadline, `tests/datasource/plugin-firebird.spec.ts` (11), `plugin-turso-libsql.spec.ts` (11) and `plugin-couchdb.spec.ts` (10) each ran once on `3.0.0-e2e` with the flag and passed, and the D15 gate above was repeated (120 passed on both images). For `tests/datasource/plugin-s3-server.spec.ts` (D16) `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1 e2e/scripts/run-in-docker.sh --repeat-each=10 --workers=4 tests/datasource/plugin-s3-server.spec.ts`: 150 passed on `3.0.0-e2e` (34.8 s) and 150 passed on `lowcoderorg/lowcoder-ce:3.0.1-e2e` (36.0 s) (all five sidecars start; the script logged every readiness wait as `ready after 0s` or `1s`). With the flag, `--grep @node-service-sidecar --workers=4` ran all five sidecar specs in one run: 59 passed (D12 11, D13 11, D14 10, D15 12, D16 15; 16.9 s). Ten inverted assertions of the D16 spec (the wrong-secret message, a bucket listed after its create, the stored content type, the limited listing, the truncated answer, the deleted key's status, the tampered-signature code, the missing-key message, the empty-bucket message and the large body's size) failed in one run and the restored file passed again; six deliberate changes of the run script (the S3 loop back to the sleep-only counter, its accepted status widened, its abort limit removed, one tmpfs removed, the trap's container removed, a network alias added) made five structural tests fail, and three changes of `src/datasource/s3.ts` (the string to sign, the IPv4 check, the key encoding) made three unit tests fail; each was restored and checked by checksum. A deliberately failing flagged run (one D16h assertion inverted, restored afterwards) ended with the run exiting 1, no container and no network left (`docker ps -a` and `docker network ls` filtered on the run's name prefix: 0 and 0). A default `tests/smoke` run, the flagged hold run that made the hand measurements above, and that failing flagged run each took the dangling-volume count from 223 to 223 with no volume-create event (`docker events`), and the new names diff was empty. These Docker results were measured by hand on one machine; no result files are committed, so re-run the commands named here to reproduce them.): +default **861 tests in 115 files**; with `E2E_INCLUDE_QUARANTINE=1` **875 in 116**; with `E2E_INCLUDE_SUPERADMIN=1` **866 in 115**; with both of those **880 in 116**; +with `E2E_INCLUDE_INSERT_ALL=1` **973 in 116**; with all three opt-in variables **992 in 117** (the takeover variable changes nothing on the default stack); with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1` **920 in 120** (the 11 D12 tests of the Firebird sidecar, the 11 D13 tests of the libSQL sidecar, the 10 D14 tests of the CouchDB sidecar, the 12 D15 tests of the DynamoDB Local sidecar and the 15 D16 tests of the S3 sidecar, which no other variable lists), and **1051 in 122** with the other three variables as well. With `E2E_STACK_PROFILE=enterprise`: **8 in 1** (SEC-E01 to E04, E06a, E06b, E07a, E07b as of D-34; also with `E2E_INCLUDE_QUARANTINE=1` alone, which opens nothing extra), **1 in 1** with `E2E_INCLUDE_ENTERPRISE_TAKEOVER=1` alone (SEC-E05 alone, no quarantine flag needed any more); `E2E_INCLUDE_INSERT_ALL` and `E2E_INCLUDE_SUPERADMIN` add nothing there. `@enterprise` is 9 tests, none in a default-stack listing. With `E2E_STACK_PROFILE=signup-disabled`: **5 in 1** (LC-AU20 to AU24). -Default-run tag counts (`--list --reporter=list --grep `): `@smoke` 5, `@core` 57, `@slow` 39, `@npm` 32, `@security` 157, `@lifecycle` 111, `@node-service` 154 in 10 files (the 63 unit tests of `foundation/node-plugins.spec.ts` plus the 91 scenario tests of the plugin specs: D3a to D3c, D4a to D4e, D5a to D5f, D6a to D6e, D7a to D7f, D8a to D8i (11 tests), D9a to D9k with the four D9m tests (15 tests) and D10a to D10q (19 tests: D10m and D10n have two each) and D11a to D11q (21 tests: D11b and D11g have two each, D11n three); a selection tag, they stay in the default run; **213 in 15 files** with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1`, which adds the 11 D12 tests, the 11 D13 tests, the 10 D14 tests, the 12 D15 tests and the 15 D16 tests); `@node-service-sidecar` 0 (**59 in 5 files** with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1`: D12a to D12k, the Firebird sidecar tests, D13a to D13k, the libSQL sidecar tests, D14a to D14j, the CouchDB sidecar tests, D15a to D15l, the DynamoDB Local sidecar tests, and D16a to D16o, the S3 sidecar tests). On request: `@quarantine` 14 (with `E2E_INCLUDE_QUARANTINE=1`; no `@quarantine` test also carries `@superadmin` any more, so the same 14 with both variables), `@superadmin` 5 (the four SEC-R16 tests and the `superAdmin` fixture helper test), `@insert-all` 112. The 14 `@quarantine` tests: the lifecycle ones are LC-AK04 (D-45, intermittent UI test), LC-AU15 (D-30) and the three new creator-shortcut candidates LC-DL13 to LC-DL15 (`workspace/leave-removal.spec.ts`, D-26/D-60 residual, an open scope question for the owner); the rest are the open security findings SEC-C17c (D-30, two variants), SEC-R17f (D-46), SEC-A10b (D-13), the two quarantined tests of `foundation/security-helpers.spec.ts` (D-45, D-46 candidates), `editor/drop-size.spec.ts` (D-5), the icon switch of `components/displays.spec.ts` (CD-9 candidate) and D9l of `datasource/plugin-openapi-wrappers-apps.spec.ts` (the UiPath query that should reach the server URL with its Bearer token; D-71 candidate; it fails on `3.0.0-e2e` and `3.0.1-e2e`). For all of these except D9l, whether each PASSES as expected (quarantined ones failing, default-run ones passing) on a built image is confirmed in the combined run (2026-11-24, image `secfix-combined-e2e`). That run predates the node-service specs, so it says nothing about D9l: D9l was checked separately with `E2E_INCLUDE_QUARANTINE=1` on the default image `3.0.0-e2e` and on `lowcoderorg/lowcoder-ce:3.0.1-e2e`, where it fails with "the query succeeded" as intended. +Default-run tag counts (`--list --reporter=list --grep `): `@smoke` 7, `@core` 57, `@slow` 39, `@npm` 32, `@security` 157, `@lifecycle` 111, `@node-service` 154 in 10 files (the 63 unit tests of `foundation/node-plugins.spec.ts` plus the 91 scenario tests of the plugin specs: D3a to D3c, D4a to D4e, D5a to D5f, D6a to D6e, D7a to D7f, D8a to D8i (11 tests), D9a to D9k with the four D9m tests (15 tests) and D10a to D10q (19 tests: D10m and D10n have two each) and D11a to D11q (21 tests: D11b and D11g have two each, D11n three); a selection tag, they stay in the default run; **213 in 15 files** with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1`, which adds the 11 D12 tests, the 11 D13 tests, the 10 D14 tests, the 12 D15 tests and the 15 D16 tests); `@node-service-sidecar` 0 (**59 in 5 files** with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1`: D12a to D12k, the Firebird sidecar tests, D13a to D13k, the libSQL sidecar tests, D14a to D14j, the CouchDB sidecar tests, D15a to D15l, the DynamoDB Local sidecar tests, and D16a to D16o, the S3 sidecar tests). On request: `@quarantine` 14 (with `E2E_INCLUDE_QUARANTINE=1`; no `@quarantine` test also carries `@superadmin` any more, so the same 14 with both variables), `@superadmin` 5 (the four SEC-R16 tests and the `superAdmin` fixture helper test), `@insert-all` 112. The 14 `@quarantine` tests: the lifecycle ones are LC-AK04 (D-45, intermittent UI test), LC-AU15 (D-30) and the three new creator-shortcut candidates LC-DL13 to LC-DL15 (`workspace/leave-removal.spec.ts`, D-26/D-60 residual, an open scope question for the owner); the rest are the open security findings SEC-C17c (D-30, two variants), SEC-R17f (D-46), SEC-A10b (D-13), the two quarantined tests of `foundation/security-helpers.spec.ts` (D-45, D-46 candidates), `editor/drop-size.spec.ts` (D-5), the icon switch of `components/displays.spec.ts` (CD-9 candidate) and D9l of `datasource/plugin-openapi-wrappers-apps.spec.ts` (the UiPath query that should reach the server URL with its Bearer token; D-71 candidate; it fails on `3.0.0-e2e` and `3.0.1-e2e`). For all of these except D9l, whether each PASSES as expected (quarantined ones failing, default-run ones passing) on a built image is confirmed in the combined run (2026-11-24, image `secfix-combined-e2e`). That run predates the node-service specs, so it says nothing about D9l: D9l was checked separately with `E2E_INCLUDE_QUARANTINE=1` on the default image `3.0.0-e2e` and on `lowcoderorg/lowcoder-ce:3.0.1-e2e`, where it fails with "the query succeeded" as intended. Since the reassessment of 2026-11-22 on `lowcoderorg/lowcoder-ce:3.0.1-e2e` the quarantine holds only what still fails there (plus LC-AK04, an intermittent UI test): 25 tests whose test passed on 3.0.1 left it and are in the default run (SEC-R16c and SEC-R16d are in the `@superadmin` run), and LC-GR03, LC-PR06 and LC-IP07 left the open list. -### smoke (4) +### smoke (6) | File | Proves | Tags | Tests | |---|---|---|---| @@ -326,6 +326,7 @@ Since the reassessment of 2026-11-22 on `lowcoderorg/lowcoder-ce:3.0.1-e2e` the | smoke/published-view.spec.ts | an API-seeded app renders in the published view | @smoke | 1 | | smoke/editor-drag.spec.ts | a component dragged from the insert panel is on the canvas and saved (D-3 prone) | @smoke | 1 | | smoke/network-guard.spec.ts | requests to lowcoder.cloud are blocked, the app is let through | @smoke | 1 | +| smoke/api-docs.spec.ts | the springdoc OpenAPI document is served anonymously, and the Swagger UI page renders one operation block per operation of it | @smoke | 2 | ### auth, workspace, apps (88 default, 95 with the quarantined), account (25 default, 27 with the quarantined) diff --git a/e2e/src/constants.ts b/e2e/src/constants.ts index 6d83ce07d..bb3ad1f7f 100644 --- a/e2e/src/constants.ts +++ b/e2e/src/constants.ts @@ -154,6 +154,18 @@ export const UI_PATHS = { ADMIN_LOGIN: "/admin/login", } as const; +/** + * The springdoc routes of api-service, open to anonymous callers (`GET /api/docs/**` in `SecurityConfig.java`); the paths are + * `springdoc.api-docs.path` and `springdoc.swagger-ui.path` in `application.yaml`. + */ +export const API_DOCS_PATHS = { + OPENAPI_JSON: "/api/docs/openapi.json", + SWAGGER_UI: "/api/docs/swagger-ui", +} as const; + +/** `info.title` of the OpenAPI document (`OpenAPIDocsConfiguration.customizeOpenAPI`), the heading Swagger UI shows. */ +export const API_DOCS_TITLE = "Lowcoder Open Rest API"; + /** Meets the password rules of the sign-up form. */ export const TEST_PASSWORD = "Passw0rd-e2e"; diff --git a/e2e/src/pages/AppListPage.ts b/e2e/src/pages/AppListPage.ts index 37b2f1473..d1b88a518 100644 --- a/e2e/src/pages/AppListPage.ts +++ b/e2e/src/pages/AppListPage.ts @@ -50,14 +50,22 @@ export class AppListPage { * Imports an app from a JSON file through "New" > "Import". The app takes the name stored in the file; returns it. */ async importFile(path: string): Promise { - await this.page.getByRole("button", { name: "New" }).click(); + const newButton = this.newButton; + // The visible "Import" text of the menu item is covered by the Upload of `AppImport` (CreateDropdown.tsx), which takes + // the click: Playwright refuses a click on the text ("intercepts pointer events") and a click on the menu item's centre + // does not reach the Upload, so click the Upload wrapper itself. The item holds two `.ant-upload` elements (this div and + // a span inside it); no role or test id names the Upload. + const importTrigger = this.page.getByRole("menuitem", { name: "Import" }).locator(".ant-upload-select"); // The menu animates open, and a click that lands while it moves does not start the upload; try again until the // file chooser opens. let chooser: FileChooser | undefined; await expect(async () => { + if (!(await importTrigger.isVisible())) { + await newButton.click({ timeout: IMPORT_ATTEMPT_TIMEOUT_MS }); + } [chooser] = await Promise.all([ this.page.waitForEvent("filechooser", { timeout: IMPORT_ATTEMPT_TIMEOUT_MS }), - this.page.getByText("Import", { exact: true }).filter({ visible: true }).click({ timeout: IMPORT_ATTEMPT_TIMEOUT_MS }), + importTrigger.click({ timeout: IMPORT_ATTEMPT_TIMEOUT_MS }), ]); }).toPass({ timeout: IMPORT_TIMEOUT_MS }); await chooser!.setFiles(path); @@ -75,9 +83,13 @@ export class AppListPage { await this.page.goto(`/invite/${inviteCode}`); } - /** The "New" button of the app list (the page has two "New" buttons: the first one): the client shows it to developers and admins only (`orgDev` gate). */ + /** + * The "New" button of the app list, by its exact name (the sidebar's "News" button would match a substring); the page can + * hold two "New" buttons (measured on a developer's list, SEC-R07c), so the first one. The client shows it to developers and + * admins only (`orgDev` gate). + */ get newButton(): Locator { - return this.page.getByRole("button", { name: "New" }).first(); + return this.page.getByRole("button", { name: "New", exact: true }).first(); } get emptyState(): Locator { diff --git a/e2e/tests/components/npm-components.spec.ts b/e2e/tests/components/npm-components.spec.ts index d15ea0f23..3e181ff9a 100644 --- a/e2e/tests/components/npm-components.spec.ts +++ b/e2e/tests/components/npm-components.spec.ts @@ -30,8 +30,18 @@ interface NpmComponent { exactlyOnceText?: string; /** Number of canvases the component draws, where it is known (the image editor has two). */ canvasCount?: number; + /** The page clock, for a component whose default content depends on today's date. */ + pinnedNow?: Date; } +/** + * Inside the recorded default events of `fixtures/dsl/calendar.json` (2026-11-20 to 2026-11-22). The calendar opens on the + * week of today, and its only SVG is the delete icon each event carries (`CalendarDeleteIcon`, + * client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx), so without a pinned clock the SVG is there only + * in the week the fixture was recorded. + */ +const CALENDAR_FIXTURE_NOW = new Date("2026-11-20T12:00:00Z"); + /** The 17 ECharts charts (S15) draw on a canvas; `barChart`, `lineChart` and `pieChart` were the first three built. */ const CHART_TYPES = [ "chart", @@ -56,7 +66,7 @@ const CHART_TYPES = [ const COMPONENTS: NpmComponent[] = [ ...CHART_TYPES.map((type): NpmComponent => ({ type, draws: "canvas" })), { type: "mermaid", draws: "svg", text: "Is it working?" }, - { type: "calendar", draws: "svg" }, + { type: "calendar", draws: "svg", pinnedNow: CALENDAR_FIXTURE_NOW }, { type: "ganttChart", draws: "svg" }, { type: "bpmnEditor", draws: "svg" }, { type: "pivotTable", draws: "text" }, @@ -82,6 +92,9 @@ test.describe("components loaded from npm", () => { const dsl = JSON.parse(readFileSync(join(FIXTURE_DIR, `${component.type}.json`), "utf8")); const { appId } = await createApp(page.request, { orgId: apiUser.orgId, name: `e2e-npm-${component.type}`, dsl }); await publishApp(page.request, appId); + if (component.pinnedNow) { + await page.clock.install({ time: component.pinnedNow }); + } await new AppViewPage(page).open(appId); diff --git a/e2e/tests/smoke/api-docs.spec.ts b/e2e/tests/smoke/api-docs.spec.ts new file mode 100644 index 000000000..4949fa057 --- /dev/null +++ b/e2e/tests/smoke/api-docs.spec.ts @@ -0,0 +1,86 @@ +import { API_DOCS_PATHS, API_DOCS_TITLE, TAGS } from "../../src/constants"; +import { expect, test } from "../../src/fixtures"; + +/** The HTTP methods of an OpenAPI path item that Swagger UI renders as one operation block each. */ +const OPERATION_METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace"]; + +/** Major version of the OpenAPI specification the document declares (its `openapi` field). */ +const OPENAPI_VERSION_PREFIX = "3."; + +/** The page springdoc redirects the Swagger UI path to. */ +const DOCS_INDEX_URL = /\/api\/docs\/.*index\.html/; + +interface OpenApiDocument { + openapi: string; + info: { title: string; version: string }; + tags?: { name: string }[]; + paths: Record>; +} + +function operationCountOf(document: OpenApiDocument): number { + return Object.values(document.paths).reduce( + (count, pathItem) => count + OPERATION_METHODS.filter((method) => method in pathItem).length, + 0, + ); +} + +/** Every tag name the document declares or its operations carry. */ +function tagNamesOf(document: OpenApiDocument): Set { + const names = new Set((document.tags ?? []).map((tag) => tag.name)); + for (const pathItem of Object.values(document.paths)) { + for (const operation of Object.values(pathItem)) { + for (const tag of (operation as { tags?: string[] }).tags ?? []) { + names.add(tag); + } + } + } + return names; +} + +test.describe("springdoc API documentation", () => { + test("the OpenAPI document is served to an anonymous caller", { tag: TAGS.SMOKE }, async ({ page }) => { + const response = await page.request.get(API_DOCS_PATHS.OPENAPI_JSON); + expect(response.status(), "status of the OpenAPI document").toBe(200); + + const document = (await response.json()) as OpenApiDocument; + expect(document.openapi.startsWith(OPENAPI_VERSION_PREFIX), `openapi version ${document.openapi}`).toBe(true); + expect(document.info.title, "info.title").toBe(API_DOCS_TITLE); + expect(operationCountOf(document), "operations in the document").toBeGreaterThan(0); + }); + + test("the Swagger UI page renders the operations of the document", { tag: TAGS.SMOKE }, async ({ + page, + networkGuard, + }) => { + const document = (await (await page.request.get(API_DOCS_PATHS.OPENAPI_JSON)).json()) as OpenApiDocument; + expect(operationCountOf(document), "operations in the document").toBeGreaterThan(0); + + await page.goto(API_DOCS_PATHS.SWAGGER_UI); + + // springdoc redirects the configured path to the index.html it bundles; where that lives depends on its version + // (3.0.0 image: /api/docs/webjars/swagger-ui/index.html), so only the page name is asserted + await expect(page, "Swagger UI page").toHaveURL(DOCS_INDEX_URL); + await expect(page.getByRole("heading", { name: API_DOCS_TITLE }), "title of the API").toBeVisible(); + // Swagger UI exposes no role or test id for its operation blocks, so these use its own CSS classes and data attributes. + // The newer Swagger UI renders only the blocks near the viewport (6 of 176 measured), the 3.0.0 one renders all of + // them, so the rendered blocks are checked against the document instead of counted. + const operations = page.locator(".swagger-ui .opblock"); + await expect(operations.first(), "an operation block").toBeVisible(); + const renderedPaths = await page.locator(".swagger-ui .opblock-summary-path").evaluateAll((elements) => + elements.map((element) => element.getAttribute("data-path")), + ); + const renderedTags = await page.locator(".swagger-ui .opblock-tag").evaluateAll((elements) => + elements.map((element) => element.getAttribute("data-tag")), + ); + expect(renderedPaths.length, "rendered operation paths").toBeGreaterThan(0); + expect(renderedTags.length, "rendered tag headers").toBeGreaterThan(0); + for (const renderedPath of renderedPaths) { + expect(Object.keys(document.paths), `path ${renderedPath} of a rendered block`).toContain(renderedPath); + } + for (const renderedTag of renderedTags) { + expect([...tagNamesOf(document)], `tag ${renderedTag} of a rendered header`).toContain(renderedTag); + } + await expect(page.locator(".swagger-ui .errors-wrapper"), "Swagger UI load errors").toHaveCount(0); + expect(networkGuard.blockedUrls, "requests the page made to a blocked host").toEqual([]); + }); +}); diff --git a/e2e/tests/workspace/leave-removal.spec.ts b/e2e/tests/workspace/leave-removal.spec.ts index 062b30983..fdccbddfd 100644 --- a/e2e/tests/workspace/leave-removal.spec.ts +++ b/e2e/tests/workspace/leave-removal.spec.ts @@ -258,16 +258,25 @@ test.describe("lifecycle: leaving, removal and deletion", () => { expectAnswer(await deleteOrganizationRaw(admin.request, doomed), OK, "the deletion"); await expect.poll(async () => (await currentUser(member.request)).orgAndRoles.some((entry) => entry.org.id === doomed), { message: "the clean-up ran", ...POLL }).toBe(false); - const adminView = await viewAppRaw(admin.request, appId); + // The org-deleted listener marks the workspace's apps DELETED after its members and groups + // (OrgAndGroupEventListener.onOrgDeleted); the creator keeps READ (createdBy), so its view reaches the status check. + await expect + .poll( + async () => { + const answer = await viewAppRaw(admin.request, appId); + return { status: answer.status, code: answer.code }; + }, + { message: "the admin's view: the app is marked deleted", ...POLL }, + ) + .toEqual(API_ERRORS.UNSUPPORTED_OPERATION); const adminEdit = await editAppRaw(admin.request, appId); const memberView = await viewAppRaw(member.request, appId); const memberEdit = await editAppRaw(member.request, appId); - expect({ status: adminView.status, code: adminView.code }, "the admin's view").toEqual(API_ERRORS.UNABLE_TO_FIND_VALID_ORG); - expect({ status: adminEdit.status, code: adminEdit.code }, "the admin's editing view").toEqual(API_ERRORS.UNABLE_TO_FIND_VALID_ORG); - expect({ status: memberView.status, code: memberView.code }, "the former member's view").toEqual(API_ERRORS.UNABLE_TO_FIND_VALID_ORG); + expect({ status: adminEdit.status, code: adminEdit.code }, "the admin's editing view").toEqual(API_ERRORS.NO_PERMISSION_TO_REQUEST_APP); + expect({ status: memberView.status, code: memberView.code }, "the former member's view").toEqual(API_ERRORS.NO_PERMISSION_TO_REQUEST_APP); expect({ status: memberEdit.status, code: memberEdit.code }, "the former member's editing view").toEqual(API_ERRORS.NO_PERMISSION_TO_REQUEST_APP); - testInfo.annotations.push({ type: "observation", description: "the apps of a deleted workspace are not deleted (nothing removes them) but no call opens them" }); + testInfo.annotations.push({ type: "observation", description: "the apps of a deleted workspace are marked DELETED (still stored) and no call opens them; the creator's view answers 400 / 5003 'Bad request.'" }); }); test("LC-DL11 an invitation of a deleted workspace admits nobody", lifecycleTestDetails("LC-DL11"), async ({ actor }) => { From bedac69a78081719ecc3d8a6d4c6a34b870362f7 Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 13:40:22 +0100 Subject: [PATCH 37/40] test(e2e): wait out the carousel's post-mount resize before the dot click 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 --- e2e/README.md | 1 + e2e/tests/components/media.spec.ts | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/e2e/README.md b/e2e/README.md index 6e834e11a..f0f067be2 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -576,6 +576,7 @@ SEC-R09d (D-38) left the quarantine: the check took the workspace of the first i | CD-7 | `setIn` with a bad path or on a scalar fails silently (query ends as success) | `logic/temporary-state.spec.ts` asserts today's behaviour, annotation `{type:"defect", description:"CD-7"}`, default run | | CD-8 | `transfer` list titles are in the wrong order: confirmed by code (`titles={[targetTitle, sourceTitle]}`, 2026-11-22 reading) | conditional `defect` annotation in `components/choices.spec.ts` (the annotation still says candidate) | | CD-9 | an icon switched from a name to an image URL keeps the old icon: confirmed (failed 3 of 3 on 3.0.1-e2e; code: the old icon is cached under the new URL and `undefined === undefined` keeps it) | `components/displays.spec.ts`, `@quarantine`, `defect` annotation (still named candidate there) | +| CD-11 candidate | a carousel's `change` event is lost when its slider list resizes while a slide is running: react-slick (`@ant-design/react-slick` 1.1.2) answers a resize 50 ms later with `resizeWindow`, which cancels the pending `afterChange` without calling it; the slide still moves. The carousel resizes its list once after every mount (it sets the slides' height from `useResizeDetector`), so a dot click in the first moments after the carousel shows can lose the event too. Measured on lowcoder-ce:asu-full-e2e: a viewport 40 px narrower right after a dot click lost `change` in 40 of 40 runs (0 of 40 with the same resize 1 s before the click); a click right after the first slide showed lost it in 17 of 80. The id is provisional until the owner assigns one | `components/media.spec.ts` (S12 carousel) waits for the slides' height and `CAROUSEL_RESIZE_SETTLE_MS` before the dot click (workaround), annotation `{type:"defect", description:"CD-11 candidate"}`; no test asserts the desired behaviour yet | | D-66 candidate | the Turso plugin prints a pipeline `error` result as `${result.error}`, an object: a failed statement reaches the app as `Cannot parse result, received error: [object Object]` and the server's own message is lost; measured on 3.0.0-e2e and 3.0.1-e2e. The id is provisional until the owner assigns one | `datasource/plugin-turso-slack.spec.ts` D5d asserts today's message (characterisation, default run), annotation `{type:"defect", description:"D-66 candidate"}`; it changes when the plugin prints the message. Against the real libSQL sidecar the same text is printed for a syntax error, an unknown column, a constraint violation and a two-statement string, each of which the server answers with its own message and code (`datasource/plugin-turso-libsql.spec.ts` D13f, same annotation) | | D-68 candidate | the DuckDB plugin answers rows keyed by the column position, not the column name (`SELECT 42 AS answer` arrives as `{"0": 42}`): `getRows()` answers arrays and `serializeBigInts` copies `Object.entries(row)`; measured on 3.0.0-e2e and 3.0.1-e2e. An app cannot read `row.answer`. The id is provisional until the owner assigns one | `datasource/plugin-duckdb.spec.ts` D4a to D4c assert today's keys (characterisation, default run), annotation `{type:"defect", description:"D-68 candidate"}`; they change when the plugin keys rows by name | | D-67 candidate | the Shopify plugin reads the query's headers and passes `{}` on, and its data source has only `endpoint`: it cannot send Shopify's access token (`X-Shopify-Access-Token`); measured on 3.0.0-e2e and 3.0.1-e2e. The id is provisional until the owner assigns one | `datasource/plugin-graphql.spec.ts` D6d asserts today's behaviour after a control that the request did reach the echo (characterisation, default run), annotation `{type:"defect", description:"D-67 candidate"}`; it changes when the query's headers are forwarded | diff --git a/e2e/tests/components/media.spec.ts b/e2e/tests/components/media.spec.ts index a4b3ccd0c..9ae92e5e9 100644 --- a/e2e/tests/components/media.spec.ts +++ b/e2e/tests/components/media.spec.ts @@ -35,6 +35,19 @@ const PDF_DATA_URI_PREFIX = "data:application/pdf;base64,"; const FILE_VIEWER_ERROR = "Please Enter a Valid URL or Base64 String"; const FIRST_COMMENT = "Has anyone tried using Lowcode for our new internal tool yet?"; const STATE_TEXT_ITEM: DslItem = text({ id: "t0", name: "tState", testId: STATE_TEXT_ID, text: STATE_TEXT }); +/** + * How long to wait, after the carousel's slides got their height, before a dot click. The carousel sets the + * slides' height after it mounts (`useResizeDetector` in client/packages/lowcoder/src/comps/comps/carouselComp.tsx), + * so its slider list resizes once on every load; react-slick (`@ant-design/react-slick` 1.1.2, + * `lib/inner-slider.js`, `onWindowResized`/`resizeWindow`) answers that 50 ms later, and `resizeWindow` cancels the + * pending end of a slide already running, whose `afterChange` is the `change` event (CD-11 candidate). No page + * signal shows the debounced call. Measured on lowcoder-ce:asu-full-e2e, 4 workers, 40 runs per variant: the call + * ran 50 to 56 ms after the list's resize; a click as soon as the first slide was current lost `change` in 8 of 40 + * runs, a click as soon as the slides had their height in 1 of 40, a click this long after the height in 0 of 40. + */ +const CAROUSEL_RESIZE_SETTLE_MS = 250; +/** The image box of the current slide (react-slick wraps each child in two divs; it has no role or test id). */ +const CAROUSEL_CURRENT_IMAGE = ".slick-slide.slick-current > div > div > div"; /** Waits until the browser has decoded the image: its natural width is the 8 px of the PNG fixtures. */ async function expectDecodedPng(image: Locator, message: string): Promise { @@ -70,7 +83,9 @@ test.describe("S12 media components", () => { await expect(view.byTestId(STATE_TEXT_ID), "the click event set the state").toHaveText("s=image-clicked"); }); - test("carousel shows its two slides and the second dot fires change", async ({ page, apiUser }) => { + test("carousel shows its two slides and the second dot fires change", { + annotation: { type: "defect", description: "CD-11 candidate" }, + }, async ({ page, apiUser }) => { const dsl = mediaApp([ component("carousel", { id: "c1", @@ -83,6 +98,13 @@ test.describe("S12 media components", () => { const carousel = view.byTestId(COMPONENT_ID); await expect(carousel.locator(".slick-slide:not(.slick-cloned)"), "one slide per image").toHaveCount(2); await expect(carousel.locator(".slick-slide.slick-current"), "the first slide is current").toHaveAttribute("data-index", "0"); + await expect + .poll(() => carousel.locator(CAROUSEL_CURRENT_IMAGE).evaluate((element) => element.getBoundingClientRect().height), { + message: "the slides got their height", + }) + .toBeGreaterThan(0); + // CD-11 candidate: a click before the slider's debounced resize has run loses the change event. + await page.waitForTimeout(CAROUSEL_RESIZE_SETTLE_MS); await carousel.locator(".slick-dots li").nth(1).locator("button").click(); From 7700fb932b590121f097ca9fc6c4ab7c19cd1b3e Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 15:03:52 +0100 Subject: [PATCH 38/40] test(e2e): wait for the API key delete before reloading the page 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 --- e2e/tests/account/api-keys.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e2e/tests/account/api-keys.spec.ts b/e2e/tests/account/api-keys.spec.ts index 6b76e97f1..0f1612007 100644 --- a/e2e/tests/account/api-keys.spec.ts +++ b/e2e/tests/account/api-keys.spec.ts @@ -120,6 +120,10 @@ test.describe("lifecycle: API keys", () => { expectAnswer(await answerWithKey(anonymous, token), ALLOWED, "before: the key works"); await keys.deleteKey(KEY_NAME); + // The confirm click returns while the DELETE is still in flight, and a reload at that moment aborts it: the server then + // keeps the key. The card fetches the list again only after the DELETE succeeded (`UserApiKeysCard.tsx`, + // `handleDeleteApiKey`), so the row leaving the list means the server has answered; the reload then shows what it stored. + await expect(keys.rowOf(KEY_NAME), "the deleted key leaves the list").toHaveCount(0); await user.session.page.reload(); await expect(keys.title, "the card is back after the reload").toBeVisible(); From 2ac70ec19ee37f2f348aa7d2d06b161c61a5d7fb Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 15:06:35 +0100 Subject: [PATCH 39/40] test(e2e): take LC-AK04 out of the quarantine 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 --- e2e/README.md | 16 ++++++++-------- e2e/src/security/quarantine.ts | 12 ++++-------- e2e/tests/foundation/security-quarantine.spec.ts | 15 ++++++--------- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/e2e/README.md b/e2e/README.md index f0f067be2..fcf7d1556 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -312,11 +312,11 @@ Test titles carry these ids. ## Test catalogue Counts (re-measured 2026-11-26 with `LOWCODER_BASE_URL=http://localhost:1 ./node_modules/.bin/playwright test --list --reporter=list` from `e2e/`; this is a static listing, not a Docker run. Docker evidence: (1) the "confirmed in the combined run" notes of the security and lifecycle rows below come from an earlier run against an image built from the security-fix branch (tag `secfix-combined-e2e`, 693 of 696 default tests passed); that run predates the node-service specs (D3 to D10) and says nothing about them. (2) The full default run of the 859-test suite after the S3 sidecar scenarios (D16) landed, `e2e/scripts/run-in-docker.sh` without arguments on the default image `3.0.0-e2e` (no variable set): 44 failed, 815 passed (6.8 min). It started no Firebird, libSQL, CouchDB, DynamoDB Local or S3 container (the script's log shows only the PostgreSQL, echo and app `Starting` lines; a default `tests/smoke` run watched with a container sampler (one `docker ps` every 0.3 s) showed the PostgreSQL, echo, app and runner containers only) and ran no D12 to D16 test (they are not in the listing). The baseline from a clean `git worktree` of the previous commit (850 tests, same command and image, run before the edits): 45 failed, 805 passed (6.7 min). The failing sets are identical except one test (compared by test name, 45 against 44 lines): `components/media.spec.ts` S12 "carousel shows its two slides and the second dot fires change" failed in the baseline and passed in this run (it is not related to the node-service work and was not re-run to see whether it is intermittent). By tag the 44 failures are 25 `@security`, 17 `@lifecycle` (LC-PW02 of them also `@core`), 1 more `@core` (`apps/card-menu.spec.ts` export and import) and 1 `@npm` (`components/npm-components.spec.ts` calendar, also `@slow`), the same as the baseline's apart from the carousel test; the security and lifecycle ones depend on security fixes the unfixed image lacks (classified by tag, not analysed one by one). `SEC-R09d` failed in both runs (it is intermittent: it passed in earlier full runs); the periodic trigger test of `logic/triggers.spec.ts` failed in neither. The ten extra passes are the nine new unit tests of `foundation/node-plugins.spec.ts` and the carousel test. No node-service scenario failed. The D12, D13 and D14 evidence is a separate gate each, `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1 e2e/scripts/run-in-docker.sh --repeat-each=10 --workers=4 `: for `tests/datasource/plugin-firebird.spec.ts` 110 passed on `3.0.0-e2e` and 110 passed on `3.0.1-e2e` (measured when D12 landed), for `tests/datasource/plugin-turso-libsql.spec.ts` 110 passed on `3.0.0-e2e` and 110 passed on `3.0.1-e2e` (measured when D13 landed), for `tests/datasource/plugin-couchdb.spec.ts` 100 passed on `3.0.0-e2e` and 100 passed on `3.0.1-e2e`, and after the readiness probes got their time limits 110 passed for the Firebird spec and 110 for the libSQL spec on `3.0.0-e2e` (all three sidecars start; the app was ready 15 s after the first container started with the flag against 14 s without it). For `tests/datasource/plugin-dynamodb-local.spec.ts` (D15) 120 passed on `3.0.0-e2e` and 120 passed on `3.0.1-e2e`, run after the last change of the spec (all four sidecars start; `docker events` showed the PostgreSQL, echo, Firebird, libSQL, CouchDB and DynamoDB Local containers created within one second, and the script logged every readiness wait as `ready after 0s`, the last one three seconds after the first container was created; the readiness waits run after the app container is started, so they do not delay it). Dangling volumes, measured by hand on one machine (no artifact is committed): before the PostgreSQL and Firebird sidecars got a tmpfs over their declared data volumes (`/var/lib/postgresql/data`, `/var/lib/firebird/data`), a default run left one anonymous volume (PostgreSQL's) and a flagged run two (PostgreSQL's and Firebird's); the libSQL and CouchDB sidecars already mounted a tmpfs over theirs, and the images of DynamoDB Local, the echo and the app declare none. Method: `docker volume ls -q -f dangling=true` sorted and diffed before and after each run, and `docker events --since --until --filter type=volume --filter event=create` over the run. Results (count before to after, volume-create events, 0 in every row but the control): the default `tests/smoke` run 222 to 222; the flagged single-spec runs of Firebird, libSQL, CouchDB and DynamoDB Local 222 to 222 each; a deliberately failing flagged run (one assertion of the Firebird spec inverted, then restored; the run exited 1) 222 to 222; the five gates (`--repeat-each=10 --workers=4` of the four sidecar specs with the flag, and of `tests/smoke` without it) 223 to 223 each, and the Firebird gate on `lowcoderorg/lowcoder-ce:3.0.1-e2e` 223 to 223; in none of them did the list gain a name. A control, the pinned PostgreSQL image started without the tmpfs and then removed, logged exactly one create event and took the count from 222 to 223 (the new name was in the diff), so the method does see a leak. The count of the machine drifted between sessions (222, then 223) because of unrelated Docker activity, so only before/after pairs taken close together are evidence, not the absolute numbers. The 130 or more dangling volumes of earlier runs were not touched; `docker volume ls -q -f dangling=true` lists them, and it may list other projects' volumes, so delete them only knowing whose they are. With the flag, `--grep @node-service-sidecar` ran all the sidecar tests (D12, D13, D14) in one run when D14 landed: 32 passed; D15 was run through its own gate above, not in that combined run. After the four readiness loops got their elapsed-time deadline, `tests/datasource/plugin-firebird.spec.ts` (11), `plugin-turso-libsql.spec.ts` (11) and `plugin-couchdb.spec.ts` (10) each ran once on `3.0.0-e2e` with the flag and passed, and the D15 gate above was repeated (120 passed on both images). For `tests/datasource/plugin-s3-server.spec.ts` (D16) `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1 e2e/scripts/run-in-docker.sh --repeat-each=10 --workers=4 tests/datasource/plugin-s3-server.spec.ts`: 150 passed on `3.0.0-e2e` (34.8 s) and 150 passed on `lowcoderorg/lowcoder-ce:3.0.1-e2e` (36.0 s) (all five sidecars start; the script logged every readiness wait as `ready after 0s` or `1s`). With the flag, `--grep @node-service-sidecar --workers=4` ran all five sidecar specs in one run: 59 passed (D12 11, D13 11, D14 10, D15 12, D16 15; 16.9 s). Ten inverted assertions of the D16 spec (the wrong-secret message, a bucket listed after its create, the stored content type, the limited listing, the truncated answer, the deleted key's status, the tampered-signature code, the missing-key message, the empty-bucket message and the large body's size) failed in one run and the restored file passed again; six deliberate changes of the run script (the S3 loop back to the sleep-only counter, its accepted status widened, its abort limit removed, one tmpfs removed, the trap's container removed, a network alias added) made five structural tests fail, and three changes of `src/datasource/s3.ts` (the string to sign, the IPv4 check, the key encoding) made three unit tests fail; each was restored and checked by checksum. A deliberately failing flagged run (one D16h assertion inverted, restored afterwards) ended with the run exiting 1, no container and no network left (`docker ps -a` and `docker network ls` filtered on the run's name prefix: 0 and 0). A default `tests/smoke` run, the flagged hold run that made the hand measurements above, and that failing flagged run each took the dangling-volume count from 223 to 223 with no volume-create event (`docker events`), and the new names diff was empty. These Docker results were measured by hand on one machine; no result files are committed, so re-run the commands named here to reproduce them.): -default **861 tests in 115 files**; with `E2E_INCLUDE_QUARANTINE=1` **875 in 116**; with `E2E_INCLUDE_SUPERADMIN=1` **866 in 115**; with both of those **880 in 116**; -with `E2E_INCLUDE_INSERT_ALL=1` **973 in 116**; with all three opt-in variables **992 in 117** (the takeover variable changes nothing on the default stack); with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1` **920 in 120** (the 11 D12 tests of the Firebird sidecar, the 11 D13 tests of the libSQL sidecar, the 10 D14 tests of the CouchDB sidecar, the 12 D15 tests of the DynamoDB Local sidecar and the 15 D16 tests of the S3 sidecar, which no other variable lists), and **1051 in 122** with the other three variables as well. With `E2E_STACK_PROFILE=enterprise`: +default **862 tests in 115 files**; with `E2E_INCLUDE_QUARANTINE=1` **875 in 116**; with `E2E_INCLUDE_SUPERADMIN=1` **867 in 115**; with both of those **880 in 116**; +with `E2E_INCLUDE_INSERT_ALL=1` **974 in 116**; with all three opt-in variables **992 in 117** (the takeover variable changes nothing on the default stack); with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1` **921 in 120** (the 11 D12 tests of the Firebird sidecar, the 11 D13 tests of the libSQL sidecar, the 10 D14 tests of the CouchDB sidecar, the 12 D15 tests of the DynamoDB Local sidecar and the 15 D16 tests of the S3 sidecar, which no other variable lists), and **1051 in 122** with the other three variables as well. With `E2E_STACK_PROFILE=enterprise`: **8 in 1** (SEC-E01 to E04, E06a, E06b, E07a, E07b as of D-34; also with `E2E_INCLUDE_QUARANTINE=1` alone, which opens nothing extra), **1 in 1** with `E2E_INCLUDE_ENTERPRISE_TAKEOVER=1` alone (SEC-E05 alone, no quarantine flag needed any more); `E2E_INCLUDE_INSERT_ALL` and `E2E_INCLUDE_SUPERADMIN` add nothing there. `@enterprise` is 9 tests, none in a default-stack listing. With `E2E_STACK_PROFILE=signup-disabled`: **5 in 1** (LC-AU20 to AU24). -Default-run tag counts (`--list --reporter=list --grep `): `@smoke` 7, `@core` 57, `@slow` 39, `@npm` 32, `@security` 157, `@lifecycle` 111, `@node-service` 154 in 10 files (the 63 unit tests of `foundation/node-plugins.spec.ts` plus the 91 scenario tests of the plugin specs: D3a to D3c, D4a to D4e, D5a to D5f, D6a to D6e, D7a to D7f, D8a to D8i (11 tests), D9a to D9k with the four D9m tests (15 tests) and D10a to D10q (19 tests: D10m and D10n have two each) and D11a to D11q (21 tests: D11b and D11g have two each, D11n three); a selection tag, they stay in the default run; **213 in 15 files** with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1`, which adds the 11 D12 tests, the 11 D13 tests, the 10 D14 tests, the 12 D15 tests and the 15 D16 tests); `@node-service-sidecar` 0 (**59 in 5 files** with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1`: D12a to D12k, the Firebird sidecar tests, D13a to D13k, the libSQL sidecar tests, D14a to D14j, the CouchDB sidecar tests, D15a to D15l, the DynamoDB Local sidecar tests, and D16a to D16o, the S3 sidecar tests). On request: `@quarantine` 14 (with `E2E_INCLUDE_QUARANTINE=1`; no `@quarantine` test also carries `@superadmin` any more, so the same 14 with both variables), `@superadmin` 5 (the four SEC-R16 tests and the `superAdmin` fixture helper test), `@insert-all` 112. The 14 `@quarantine` tests: the lifecycle ones are LC-AK04 (D-45, intermittent UI test), LC-AU15 (D-30) and the three new creator-shortcut candidates LC-DL13 to LC-DL15 (`workspace/leave-removal.spec.ts`, D-26/D-60 residual, an open scope question for the owner); the rest are the open security findings SEC-C17c (D-30, two variants), SEC-R17f (D-46), SEC-A10b (D-13), the two quarantined tests of `foundation/security-helpers.spec.ts` (D-45, D-46 candidates), `editor/drop-size.spec.ts` (D-5), the icon switch of `components/displays.spec.ts` (CD-9 candidate) and D9l of `datasource/plugin-openapi-wrappers-apps.spec.ts` (the UiPath query that should reach the server URL with its Bearer token; D-71 candidate; it fails on `3.0.0-e2e` and `3.0.1-e2e`). For all of these except D9l, whether each PASSES as expected (quarantined ones failing, default-run ones passing) on a built image is confirmed in the combined run (2026-11-24, image `secfix-combined-e2e`). That run predates the node-service specs, so it says nothing about D9l: D9l was checked separately with `E2E_INCLUDE_QUARANTINE=1` on the default image `3.0.0-e2e` and on `lowcoderorg/lowcoder-ce:3.0.1-e2e`, where it fails with "the query succeeded" as intended. -Since the reassessment of 2026-11-22 on `lowcoderorg/lowcoder-ce:3.0.1-e2e` the quarantine holds only what still fails there (plus LC-AK04, an intermittent UI test): 25 tests whose test passed on 3.0.1 left it and are in the default run (SEC-R16c and SEC-R16d are in the `@superadmin` run), and LC-GR03, LC-PR06 and LC-IP07 left the open list. +Default-run tag counts (`--list --reporter=list --grep `): `@smoke` 7, `@core` 57, `@slow` 39, `@npm` 32, `@security` 157, `@lifecycle` 112, `@node-service` 154 in 10 files (the 63 unit tests of `foundation/node-plugins.spec.ts` plus the 91 scenario tests of the plugin specs: D3a to D3c, D4a to D4e, D5a to D5f, D6a to D6e, D7a to D7f, D8a to D8i (11 tests), D9a to D9k with the four D9m tests (15 tests) and D10a to D10q (19 tests: D10m and D10n have two each) and D11a to D11q (21 tests: D11b and D11g have two each, D11n three); a selection tag, they stay in the default run; **213 in 15 files** with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1`, which adds the 11 D12 tests, the 11 D13 tests, the 10 D14 tests, the 12 D15 tests and the 15 D16 tests); `@node-service-sidecar` 0 (**59 in 5 files** with `E2E_INCLUDE_NODE_SERVICE_SIDECARS=1`: D12a to D12k, the Firebird sidecar tests, D13a to D13k, the libSQL sidecar tests, D14a to D14j, the CouchDB sidecar tests, D15a to D15l, the DynamoDB Local sidecar tests, and D16a to D16o, the S3 sidecar tests). On request: `@quarantine` 13 (with `E2E_INCLUDE_QUARANTINE=1`; no `@quarantine` test also carries `@superadmin` any more, so the same 13 with both variables), `@superadmin` 5 (the four SEC-R16 tests and the `superAdmin` fixture helper test), `@insert-all` 112. The 13 `@quarantine` tests: the lifecycle ones are LC-AU15 (D-30) and the three new creator-shortcut candidates LC-DL13 to LC-DL15 (`workspace/leave-removal.spec.ts`, D-26/D-60 residual, an open scope question for the owner); the rest are the open security findings SEC-C17c (D-30, two variants), SEC-R17f (D-46), SEC-A10b (D-13), the two quarantined tests of `foundation/security-helpers.spec.ts` (D-45, D-46 candidates), `editor/drop-size.spec.ts` (D-5), the icon switch of `components/displays.spec.ts` (CD-9 candidate) and D9l of `datasource/plugin-openapi-wrappers-apps.spec.ts` (the UiPath query that should reach the server URL with its Bearer token; D-71 candidate; it fails on `3.0.0-e2e` and `3.0.1-e2e`). For all of these except D9l, whether each PASSES as expected (quarantined ones failing, default-run ones passing) on a built image is confirmed in the combined run (2026-11-24, image `secfix-combined-e2e`). That run predates the node-service specs, so it says nothing about D9l: D9l was checked separately with `E2E_INCLUDE_QUARANTINE=1` on the default image `3.0.0-e2e` and on `lowcoderorg/lowcoder-ce:3.0.1-e2e`, where it fails with "the query succeeded" as intended. +Since the reassessment of 2026-11-22 on `lowcoderorg/lowcoder-ce:3.0.1-e2e` the quarantine holds only what still fails there: 25 tests whose test passed on 3.0.1 left it and are in the default run (SEC-R16c and SEC-R16d are in the `@superadmin` run), and LC-GR03, LC-PR06 and LC-IP07 left the open list. ### smoke (6) @@ -342,7 +342,7 @@ Since the reassessment of 2026-11-22 on `lowcoderorg/lowcoder-ce:3.0.1-e2e` the | account/profile.spec.ts | LC-PR01 to PR08, PR15: display name on the profile page and in the My Profile modal, an empty name refused, avatar upload, SVG refused, an oversized avatar (LC-PR06 passes on 3.0.1-e2e: D-50 fixed), delete, UI language, status flags | @lifecycle | 9 | | account/password.spec.ts | LC-PR09 to PR14: password change in the modal, a wrong old password, the rule, a blank old password, replacing a password without the old one (LC-PR13 fixed on this branch: D-49, Docker/e2e confirmed in the combined run (2026-11-24, image `secfix-combined-e2e`)), a weak new password (LC-PR14 fixed on this branch: D-48) | @lifecycle, @core for PR09 | 6 | | account/other.spec.ts | LC-OT02 to OT05: the profile's "Info" count of created apps (LC-OT02, fixed on this branch: D-63), a plain member's "Homepage (Org)" tab and missing settings against a developer's, an admin's member "Detail" popup, the admin sign-in page signs in any user | @lifecycle | 4 (4 default) | -| account/api-keys.spec.ts | LC-AK01 to AK08: a key created in the UI authenticates, the token is shown once and listed masked, a key deleted in the UI stops working, no key card for a plain member, a name is required, a key follows the user's current workspace, two keys of one second never share a token (LC-AK04 quarantined: D-45 is fixed but this UI test is intermittent on 3.0.1-e2e, 2 of 3 passed; LC-AK08 passes: D-51 fixed) | @lifecycle, @quarantine for 1 | 8 (7 default) | +| account/api-keys.spec.ts | LC-AK01 to AK08: a key created in the UI authenticates, the token is shown once and listed masked, a key deleted in the UI stops working, no key card for a plain member, a name is required, a key follows the user's current workspace, two keys of one second never share a token (LC-AK08 passes: D-51 fixed) | @lifecycle | 8 default | | workspace/members-gui.spec.ts | LC-WM01, WM03, WM04, WM06, WM12: the All Users group page (group roles, Remove from Group leaves the membership: O-16), the invite dialog's link lets a user in, a plain member has no settings and the API leave works, an unknown invitation code | @lifecycle, @core for WM04 | 5 | | workspace/workspaces-gui.spec.ts | LC-WM08 to WM11: Create Workspace in the avatar menu, switching, renaming, deleting with the exact name | @lifecycle | 4 | | workspace/leave-removal.spec.ts | LC-DL01 to DL15: a removed member leaves the groups and loses its app grants (and does not get them back on rejoin), a leave cleans the same, an app of a removed developer stays with the workspace, a removed user keeps its account and own workspace, a user in no workspace is told 'User not found', deleting a workspace removes it for its members and its groups can no longer be read, its apps can no longer be opened, its invitation admits nobody; a removed member's bundle grant does not survive a rejoin (LC-DL12); the creator-shortcut candidates (LC-DL13 to LC-DL15, quarantined) assert the denial the member-leave clean-up does not give a removed/rejoined creator of an app, a folder and a bundle (D-26, D-60 residuals, an open scope question for the owner) | @lifecycle, @quarantine for 3 | 15 (12 default) | @@ -439,7 +439,7 @@ Access-control tests, API level plus UI checks in SEC-R01a, R01e, R02a, R04a+, R Titles are `SEC- `, tags `@security` (the P0 set also `@core`); each denial asserts HTTP status and `code` (`API_ERRORS`; exceptions: SEC-A10b, whose desired answer is only "no workspace id in the body", SEC-R15c, which accepts the two refusals of the folder grant but asserts one exact answer for the decisive step, and the rows that are not a denial, SEC-A11 to A13); the scenarios that try to change something also read the resource back with the owner's session (read-only scenarios assert a before control and the denial). A scenario that asserts the desired behaviour and fails on the image under test (latest assessed: 3.0.1-e2e) is `@quarantine` with the `defect` annotation -of `src/security/quarantine.ts` (`OPEN_DEFECTS`; `FIXED_ON_BRANCH` holds only LC-AK04, an intermittent UI test of a fixed defect); a failure nobody expected is first a "candidate" (`securityCandidateDetails`, annotation ` candidate: ...`) until it gets a D id in the table "Security findings" below; none is open now. +of `src/security/quarantine.ts` (`OPEN_DEFECTS`; `FIXED_ON_BRANCH` is empty); a failure nobody expected is first a "candidate" (`securityCandidateDetails`, annotation ` candidate: ...`) until it gets a D id in the table "Security findings" below; none is open now. The P0 set is 22 of them, selected by id (repository root; the trailing space in the pattern keeps `SEC-C03` from matching `SEC-C03x`): `e2e/scripts/run-in-docker.sh --grep "SEC-(C01a|C02a|C03|C06|C12a|C12b|C14a|C16d|R01b|R02a|R02b|R02c|R03d|R03e|R06a|R07a|R10b|R10c|A01a|A03a|A06a|A07b) "`. The set tests the server and the client of the image under test (3.0.0-e2e or 3.0.1-e2e), not a pull request's client. @@ -609,7 +609,7 @@ SEC-R09d (D-38) left the quarantine: the check took the workspace of the first i | O-15 | intended behaviour (code reading 2026-11-22: the status is the socket transport state): the bound `connectionStatus` of the chat controller reads `Online` at its first read | `components/chat.spec.ts` uses a received frame as the signal of the connection | | O-16 | observation: the 3.0.0 client has no working page for a workspace's own members (`orgUsersPermission.tsx` is not routed): `/setting/permission/users` is the All Users group page with group roles, and its Remove from Group takes the user off that page but leaves the workspace membership; changing a workspace role or removing a member is API-only | `workspace/members-gui.spec.ts` LC-WM01, LC-WM03 (annotation `observation`) | | O-17 | observation: switching a workspace's e-mail sign-in off (`DELETE /api/auth/config/EMAIL` with a second provider present) answers 200 and ends the caller's session AND the instance super admin's (both answer 401 afterwards; the super admin is a member of every workspace and every worker shares its session), while an e-mail sign-in with and without the workspace id still answered 200 (measured on the image; whether the configuration was stored as disabled was not read back). A test of it would break the run, so LC-IP06 is not built; no test of the suite calls this route against the stack (LC-IP05 only reads the notice in the UI; the helper `removeAuthConfigRaw` is tested against a local server) | measured, not built | -| D-45 | on the 3.0.0 image `DELETE /api/auth/api-key/{id}` of the user's last key answered 200 but the key stayed listed and kept authenticating; fixed on 3.0.1 (run 2026-11-22: SEC-A02a passes on lowcoder-ce:3.0.1-e2e and is in the default run) | `security/credentials.spec.ts` SEC-A02a (default run); the helper test in `foundation/security-helpers.spec.ts` is still `@quarantine`, annotation `D-45` (not part of the reassessment); LC-AK04 (the UI delete of the last key) is `@quarantine` because it is intermittent (2 of 3 passed; product or test not investigated) | +| D-45 | on the 3.0.0 image `DELETE /api/auth/api-key/{id}` of the user's last key answered 200 but the key stayed listed and kept authenticating; fixed on 3.0.1 (run 2026-11-22: SEC-A02a passes on lowcoder-ce:3.0.1-e2e and is in the default run) | `security/credentials.spec.ts` SEC-A02a (default run); the helper test in `foundation/security-helpers.spec.ts` is still `@quarantine`, annotation `D-45` (not part of the reassessment); LC-AK04 (the UI delete of the last key) is in the default run: it reloaded the page while its DELETE was still in flight, which aborted the request (a test defect, 15 of 100 runs failed on asu-full-e2e); it now waits for the row to leave the list first (0 of 40 failed) | | D-46 | present, functional bug, cause: `BusinessEventPublisher` overload (after a successful recycle `BundleController` publishes an event through an overload that looks the bundle id up as an application and fails `NO_RESOURCE_FOUND`, answer 500 / 5005; still failing on 3.0.1-e2e, run 2026-11-22) | `security/bundles.spec.ts` SEC-R17f and the helper test, `@quarantine`, annotation `D-46`; `recycleBundle` tolerates exactly this answer | ## Security findings @@ -661,7 +661,7 @@ and passes. | D-42 | a bundle's element list carries the editing DSL of every app in it, with no check on the apps; adding an app to a bundle copies its editing DSL into the bundle's DSL, and publishing copies it into the published DSL | partly fixed on this branch (Java unit tests green 2026-11-24; Docker/e2e confirmed in the combined run (2026-11-24, image `secfix-combined-e2e`): SEC-R17c and SEC-R17g confirmed passing in the default run). The element list carries an app's editing DSL only to a reader who may edit that app, and an app added to or moved into a bundle is stored without its editing DSL. Residual: bundle DSLs written before the fix keep each app's editing DSL as it was when the app was added; the bundle's views answer those copies to every reader of the bundle and, once the bundle is public to all, to any signed-in user of any workspace; re-adding the app or republishing the bundle does not remove them. By code an anonymous caller is refused (401) before any bundle code runs (`/api/**` requires authentication); confirmed by the combined run (2026-11-24, image `secfix-combined-e2e`) | SEC-R17c, SEC-R17g | | D-43 | any signed-in user lists any bundle's elements, each app's editing DSL included | fixed on 3.0.1 (run 2026-11-22: the test passes on lowcoder-ce:3.0.1-e2e; the test is in the default run) | SEC-C23a | | D-44 | an app's owner adds or moves it into any bundle of any workspace | fixed on 3.0.1 (run 2026-11-22: the test passes on lowcoder-ce:3.0.1-e2e; the test is in the default run) | SEC-C23c | -| D-45 | deleting a user's last API key answered 200 but the key stayed listed and kept authenticating (measured on the 3.0.0 image) | fixed on 3.0.1 (run 2026-11-22: the test passes on lowcoder-ce:3.0.1-e2e; the test is in the default run); LC-AK04 (UI delete) is intermittent and stays `@quarantine` | SEC-A02a, LC-AK04 and the helper test in `foundation/security-helpers.spec.ts` | +| D-45 | deleting a user's last API key answered 200 but the key stayed listed and kept authenticating (measured on the 3.0.0 image) | fixed on 3.0.1 (run 2026-11-22: the test passes on lowcoder-ce:3.0.1-e2e; the test is in the default run); LC-AK04 (UI delete) is in the default run (its intermittent failure was the test reloading during the delete) | SEC-A02a, LC-AK04 and the helper test in `foundation/security-helpers.spec.ts` | | D-46 | recycling a bundle sets the status and then answers 500 / 5005 (measured on the image) | present, functional bug, cause: `BusinessEventPublisher` overload (500 / 5005 after a successful recycle, still failing on 3.0.1-e2e; restore should fail the same way, not run); not a security finding | SEC-R17f and the helper test; `recycleBundle` tolerates exactly this answer | | D-47 | the instance super admin's requests hang (HTTP 504) once the stack holds more than about 420 workspaces (measured on the 3.0.0 image: 400 ok in about 100 ms, 450 and more 504 after about 120 s; cause not found) | fixed in code, not re-measured (cause found: `getCurrentOrgMember` filtered a cached membership list whose condition collected the same list; reactor-core stalls above 448 memberships, a Java probe reproduces it; HEAD collects first; a 450-workspace run against the image was not done; the same pattern remains in the workspace data source list and the library query list); SEC-R16a to R16d pass | SEC-R16a to R16d, tagged `@superadmin` | | D-48 | the server enforces no password rule on sign-up (the rule, at least 8 characters with a letter and a digit, is checked in the client only): a sign-up with the password `a` answers 200 and opens a session, and so does `PUT /api/users/password` with the new password `a` (measured on the image; the same code at HEAD, not run) | fixed on this branch (Java unit tests green: `PasswordRuleTest`, `FormAuthRequestTest`, `UserEndpointsContractTest`, `UserCreateInOrgPasswordRuleTest` against real MongoDB; a password a user chooses on sign-up, an admin's create-user route, a password change, a lost-password reset or a first password that breaks the client's rule is refused with `INVALID_PASSWORD` 403 / 5608 before anything is stored or a session opened; Docker/e2e confirmed in the combined run (2026-11-24, image `secfix-combined-e2e`)); residual: existing weak passwords keep working (no forced rotation); the super admin password from the environment and server-generated passwords are exempt | LC-AU07, LC-PR14, LC-AU17, LC-PW16, LC-IP17 | diff --git a/e2e/src/security/quarantine.ts b/e2e/src/security/quarantine.ts index 040bb405c..60cfa6557 100644 --- a/e2e/src/security/quarantine.ts +++ b/e2e/src/security/quarantine.ts @@ -23,18 +23,14 @@ export const DEFECT_ANNOTATION_TYPE = "defect"; /** * Scenarios whose defect is fixed in the code of this branch but whose test is not (yet) in the default run, scenario id to - * defect id. Since the reassessment of 2026-11-22 on `lowcoderorg/lowcoder-ce:3.0.1-e2e` every other entry that used to be - * here has left the map (its test passed on 3.0.1 and runs by default); what is left needs a decision before it can leave: - * - LC-AK04 (D-45): the API defect is fixed (SEC-A02a passes), but the UI test that deletes the last API key is intermittent - * on 3.0.1 (passed 2 of 3 runs, failed 1 of 3; the cause, product or test, is not investigated). It stays quarantined until - * it passes repeatedly (`E2E_INCLUDE_QUARANTINE=1 ... --grep @quarantine`), then its id is deleted and this map is empty. + * defect id. Empty: since the reassessment of 2026-11-22 on `lowcoderorg/lowcoder-ce:3.0.1-e2e` every entry has left the map + * (its test passes and runs by default). LC-AK04 (D-45) was the last one: its UI test reloaded the page while the DELETE was + * still in flight; it now waits for the row to leave the list first. * * Limit: the maps are the single source of the quarantine; a scenario missing from both that fails on the image is NOT * quarantined and fails the default run, and a stale entry hides a test that passes. */ -export const FIXED_ON_BRANCH: Readonly> = { - "LC-AK04": "D-45", -}; +export const FIXED_ON_BRANCH: Readonly> = {}; /** * Scenarios that still fail on this branch's server (open defects, listed in the table "Security findings" of diff --git a/e2e/tests/foundation/security-quarantine.spec.ts b/e2e/tests/foundation/security-quarantine.spec.ts index f109baa08..22d76f0e9 100644 --- a/e2e/tests/foundation/security-quarantine.spec.ts +++ b/e2e/tests/foundation/security-quarantine.spec.ts @@ -16,7 +16,7 @@ import { securityTestDetails, } from "../../src/security/quarantine"; -/** Sizes of the two maps: 1 fixed-on-branch scenario (the lifecycle id LC-AK04, an intermittent UI test), and 4 open ones +/** Sizes of the two maps: no fixed-on-branch scenario (LC-AK04 left it: its UI test no longer reloads during the delete), and 4 open ones * (3 security ids plus the lifecycle id LC-AU15). D-6, D-7, D-33 (CORS-credentials half), D-34, D-36, D-40, D-48, D-49, D-58 and D-62 left the map: their server fixes * closed SEC-C09, SEC-C11, SEC-C19a, SEC-C19b, SEC-C22e, SEC-R15c, SEC-A04, SEC-A11, SEC-A12, SEC-E05, LC-PW08, LC-PW11, * LC-IP14, LC-PR13, LC-AU07 and LC-PR14. D-12 and D-39 also left the map: the fix closed SEC-A10a and SEC-A10c. D-35 also left the map: @@ -38,7 +38,7 @@ import { * quarantined. D-55 also left the map: the invite dialog's success notice now uses the right translation key, so * LC-PW15 is no longer quarantined. D-63 also left the map: the profile now fetches the app list it counts, so * LC-OT02 is no longer quarantined. */ -const FIXED_ON_BRANCH_COUNT = 1; +const FIXED_ON_BRANCH_COUNT = 0; const OPEN_DEFECTS_COUNT = 4; /** Lifecycle ids: LC-AU15 is in a map so far; the listed-id branches are also tested through an injected lookup. */ const LC_UNLISTED_ID = "LC-AU01"; @@ -48,8 +48,8 @@ const LC_AREAS = ["AU", "PR", "AK", "WM", "GR", "SH", "PW", "DL", "IP", "OT"]; const injected = lifecycleDetailsFor((id) => INJECTED_DEFECTS[id]); /** A scenario id that is in neither map (a scenario that passes on the image). */ const PASSING_ID = "SEC-C01a"; -/** The one id of `FIXED_ON_BRANCH` is a lifecycle id, so the security functions are exercised with open-defect ids. */ -const FIXED_LC_ID = "LC-AK04"; +/** The last id that left `FIXED_ON_BRANCH` (its test passes, so it is in neither map). */ +const LEFT_FIXED_LC_ID = "LC-AK04"; /** A scenario that left the quarantine on 3.0.1 (its test passes, so it is in neither map). */ const LEFT_QUARANTINE_ID = "SEC-C13"; const OPEN_ID = "SEC-C17c"; @@ -62,10 +62,6 @@ function titleWithTags(id: string, tags: string[]): string { test.describe("security quarantine list", () => { test("a listed id gets the security and quarantine tags and the defect annotation", () => { - expect(lifecycleTestDetails(FIXED_LC_ID), "a fixed-on-branch id").toEqual({ - tag: [TAGS.LIFECYCLE, TAGS.QUARANTINE], - annotation: { type: DEFECT_ANNOTATION_TYPE, description: FIXED_ON_BRANCH[FIXED_LC_ID] }, - }); expect(securityTestDetails(OPEN_ID), "an open-defect id").toEqual({ tag: [TAGS.SECURITY, TAGS.QUARANTINE], annotation: { type: DEFECT_ANNOTATION_TYPE, description: OPEN_DEFECTS[OPEN_ID] }, @@ -109,7 +105,7 @@ test.describe("security quarantine list", () => { }); test("quarantinedDefect names the defect of a listed id and nothing for an unlisted one", () => { - expect(quarantinedDefect(FIXED_LC_ID)).toBe(FIXED_ON_BRANCH[FIXED_LC_ID]); + expect(quarantinedDefect(LEFT_FIXED_LC_ID), "an id that left FIXED_ON_BRANCH").toBeUndefined(); expect(quarantinedDefect(OPEN_ID)).toBe(OPEN_DEFECTS[OPEN_ID]); expect(quarantinedDefect(PASSING_ID)).toBeUndefined(); }); @@ -142,6 +138,7 @@ test.describe("security quarantine list", () => { expect(details.tag).toEqual([TAGS.LIFECYCLE]); expect(details, "no annotation key at all").not.toHaveProperty("annotation"); + expect(lifecycleTestDetails(LEFT_FIXED_LC_ID), "the lifecycle id that left FIXED_ON_BRANCH").toEqual({ tag: [TAGS.LIFECYCLE] }); }); test("a lifecycle id the lookup lists gets the lifecycle and quarantine tags and the defect annotation", () => { From 35ab76e5bdba2d29d3760cc2f13eefc4d2e6779c Mon Sep 17 00:00:00 2001 From: Ludo Mikula Date: Thu, 26 Nov 2026 16:09:18 +0100 Subject: [PATCH 40/40] test: port the tests that arrived from dev to the Spring Boot 4 APIs Claude-Session: https://claude.ai/code/session_015KPtHMWb4EyLtt5JPr1vtb --- .../model/OrganizationJsonTest.java | 4 +- .../BundleApiServiceImplPermissionsTest.java | 4 +- ...urcePermissionBatchWorkspaceMongoTest.java | 6 +-- .../json-contract/contract-registry.tsv | 52 +++++++++---------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/server/api-service/lowcoder-domain/src/test/java/org/lowcoder/domain/organization/model/OrganizationJsonTest.java b/server/api-service/lowcoder-domain/src/test/java/org/lowcoder/domain/organization/model/OrganizationJsonTest.java index fae27a9cf..ae4a7837f 100644 --- a/server/api-service/lowcoder-domain/src/test/java/org/lowcoder/domain/organization/model/OrganizationJsonTest.java +++ b/server/api-service/lowcoder-domain/src/test/java/org/lowcoder/domain/organization/model/OrganizationJsonTest.java @@ -16,8 +16,8 @@ import org.lowcoder.sdk.config.JsonViews; import org.lowcoder.sdk.util.JsonUtils; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; /** * {@link Organization#getAuthConfigs()} must never reach JSON (D-14): the configs hold OAuth client secrets, and diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/bundle/BundleApiServiceImplPermissionsTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/bundle/BundleApiServiceImplPermissionsTest.java index d45bb6bc5..1a521999e 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/bundle/BundleApiServiceImplPermissionsTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/api/bundle/BundleApiServiceImplPermissionsTest.java @@ -1384,8 +1384,8 @@ void getElements_keepsTheEditingDslForAnEditor_andAnswersADetachedCopyOtherwise( var originalTree = JsonUtils.getObjectMapper().valueToTree(locked); var copyTree = JsonUtils.getObjectMapper().valueToTree(lockedElement); - assertThat(copyTree.fieldNames()).toIterable().containsExactlyInAnyOrderElementsOf(() -> originalTree.fieldNames()); - originalTree.fieldNames().forEachRemaining(field -> { + assertThat(copyTree.propertyNames()).containsExactlyInAnyOrderElementsOf(originalTree.propertyNames()); + originalTree.propertyNames().forEach(field -> { if (DSL_DERIVED.contains(field)) { return; } diff --git a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/permission/ResourcePermissionBatchWorkspaceMongoTest.java b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/permission/ResourcePermissionBatchWorkspaceMongoTest.java index 3993afb4b..1ad5a5a35 100644 --- a/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/permission/ResourcePermissionBatchWorkspaceMongoTest.java +++ b/server/api-service/lowcoder-server/src/test/java/org/lowcoder/domain/permission/ResourcePermissionBatchWorkspaceMongoTest.java @@ -44,7 +44,7 @@ import org.lowcoder.sdk.util.IDUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.data.mongodb.core.ReactiveMongoTemplate; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.TestPropertySource; @@ -66,9 +66,9 @@ class ResourcePermissionBatchWorkspaceMongoTest { private static final Duration TIMEOUT = Duration.ofSeconds(30); private static final String LOG_PREFIX = "[ResourcePermissionBatchWorkspaceMongoTest] "; - @MockBean + @MockitoBean private DatasourceMetaInfoService datasourceMetaInfoService; - @MockBean + @MockitoBean private DatasourcePluginClient datasourcePluginClient; @Autowired private ReactiveMongoTemplate mongo; diff --git a/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv b/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv index 323e222fe..e78596e7d 100644 --- a/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv +++ b/server/api-service/lowcoder-server/src/test/resources/json-contract/contract-registry.tsv @@ -28,9 +28,9 @@ ApplicationEndpoints#update(String, Application, Boolean) codec WP2 org.lowcoder ApplicationEndpoints#updateEditState(String, UpdateEditStateRequest) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationEndpointsContractTest pass-through 174 return=updateEditState ApplicationEndpoints#updatePermission(String, String, UpdatePermissionRequest) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationEndpointsContractTest pass-through 231 return=updatePermissionWithUnknownRole; 233 return=updatePermission ApplicationEndpoints#updateSlug(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationEndpointsContractTest pass-through 181 return=updateSlug -ApplicationHistorySnapshotEndpoints#create(ApplicationHistorySnapshotRequest) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest pass-through 47 return=create -ApplicationHistorySnapshotEndpoints#getHistorySnapshotDsl(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling 136 return=getHistorySnapshotDsl; 145 return=getHistorySnapshotDsl -ApplicationHistorySnapshotEndpoints#getHistorySnapshotDslArchived(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling 161 return=getHistorySnapshotDslArchived; 170 return=getHistorySnapshotDslArchived +ApplicationHistorySnapshotEndpoints#create(ApplicationHistorySnapshotRequest) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest pass-through 49 return=create +ApplicationHistorySnapshotEndpoints#getHistorySnapshotDsl(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling 136 return=getHistorySnapshotDsl; 142 switchIfEmpty=getHistorySnapshotDslOfAnotherApplication; 148 return=getHistorySnapshotDsl +ApplicationHistorySnapshotEndpoints#getHistorySnapshotDslArchived(String, String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling 164 return=getHistorySnapshotDslArchived; 170 switchIfEmpty=getHistorySnapshotDslArchivedOfAnotherApplication; 176 return=getHistorySnapshotDslArchived ApplicationHistorySnapshotEndpoints#listAllHistorySnapshotBriefInfo(String, int, int, String, String, Instant, Instant) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling org.lowcoder.api.application.ApplicationHistorySnapshotEndpoints$ApplicationHistorySnapshotBriefInfo 70 return=listAllHistorySnapshotBriefInfo; 90 return=listAllHistorySnapshotBriefInfo ApplicationHistorySnapshotEndpoints#listAllHistorySnapshotBriefInfoArchived(String, int, int, String, String, Instant, Instant) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationHistorySnapshotEndpointsContractTest assembling org.lowcoder.api.application.ApplicationHistorySnapshotEndpoints$ApplicationHistorySnapshotBriefInfo 107 return=listAllHistorySnapshotBriefInfoArchived; 127 return=listAllHistorySnapshotBriefInfoArchived ApplicationRecordEndpoints#delete(String) codec WP2 org.lowcoder.api.contract.endpoint.ApplicationRecordEndpointsContractTest pass-through 24 return=delete @@ -111,8 +111,8 @@ MetaEndpoints#getMetaData(GetMetaDataRequest) codec WP7 org.lowcoder.api.contrac ApiFlowEndpoints#flow(FlowRequest) decode-only WP7 org.lowcoder.api.contract.endpoint.ApiFlowEndpointsContractTest pass-through 65 return=flowSeatSyncWithAnotherMethod; 65 Mono.error=flowSeatSyncWithAnotherMethod; 69 return=flowSeatSyncWithRetriesOutOfRange; 72 return=flowSeatSync; 75 return=flowWithoutMethod; 79 return=flowWithRetriesOrTimeoutOutOfRange; 85 return=flow; 95 onErrorResume=flowUpstreamFailed; 99 return=flowFailingBeforeTheRequest; 99 Mono.error=flowFailingBeforeTheRequest §1.3: the outbound HTTPS client is built inline (ApiFlowController.java:84-93; the seat-sync path (:62-72) delegates to WorkspaceSeatSyncService) and the answer is the upstream's text, not JSON; FlowRequest is decoded at codec level, the outbound request is run against a local server through a test subclass that redirects the client, and the outbound body is pinned by api-flow JsLibraryEndpoints#getMeta(Collection) codec WP7 org.lowcoder.api.contract.endpoint.JsLibraryEndpointsContractTest pass-through 114 return=getMetaWithoutNames; 116 return=getMeta; 119 return=getMetaRecommended; 120 defaultIfEmpty=getMetaRecommendedNotLoadedYet; 122 return=getMeta; 123 onErrorReturn=getMetaFetchFailed JsLibraryEndpoints#getRecommendationMetas() codec WP7 org.lowcoder.api.contract.endpoint.JsLibraryEndpointsContractTest pass-through 108 return=getRecommendationMetas -PrivateNpmRegistryEndpoint#getNpmPackageAsset(String, String) codec WP7 org.lowcoder.api.contract.endpoint.PrivateNpmRegistryEndpointContractTest pass-through 46 return=getNpmPackageAsset -PrivateNpmRegistryEndpoint#getNpmPackageMeta(String, String) codec WP7 org.lowcoder.api.contract.endpoint.PrivateNpmRegistryEndpointContractTest pass-through 41 return=getNpmPackageMeta +PrivateNpmRegistryEndpoint#getNpmPackageAsset(String, String) codec WP7 org.lowcoder.api.contract.endpoint.PrivateNpmRegistryEndpointContractTest pass-through 49 return=getNpmPackageAsset +PrivateNpmRegistryEndpoint#getNpmPackageMeta(String, String) codec WP7 org.lowcoder.api.contract.endpoint.PrivateNpmRegistryEndpointContractTest pass-through 44 return=getNpmPackageMeta LibraryQueryEndpoints#create(LibraryQuery) codec WP6 org.lowcoder.api.contract.endpoint.LibraryQueryEndpointsContractTest pass-through 72 return=create LibraryQueryEndpoints#delete(String) codec WP6 org.lowcoder.api.contract.endpoint.LibraryQueryEndpointsContractTest pass-through 93 return=delete LibraryQueryEndpoints#dropDownList(String) codec WP6 org.lowcoder.api.contract.endpoint.LibraryQueryEndpointsContractTest pass-through 51 return=dropDownList @@ -158,24 +158,24 @@ OrganizationEndpoints#updateOrgCommonSettings(String, UpdateOrgCommonSettingsReq OrganizationEndpoints#updateRoleForMember(UpdateRoleRequest, String) codec WP4 org.lowcoder.api.contract.endpoint.OrganizationEndpointsContractTest pass-through 122 return=updateRoleForMember OrganizationEndpoints#updateSlug(String, String) codec WP4 org.lowcoder.api.contract.endpoint.OrganizationEndpointsContractTest pass-through 190 return=updateSlug OrganizationEndpoints#uploadLogo(String, Mono) codec WP4 org.lowcoder.api.contract.endpoint.OrganizationEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 98 return=uploadLogo -UserEndpoints#createSCIMUserAndAddToOrg(String, CreateUserRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.User 92 return=createSCIMUserAndAddToOrg; 95 return=createSCIMUserAndAddToOrgWithInvalidEmail; 102 return=createSCIMUserAndAddToOrg; 105 return=createSCIMUserAndAddToOrg; 108 switchIfEmpty=createSCIMUserAndAddToOrgForNewUser; 119 return=createSCIMUserAndAddToOrgForNewUser -UserEndpoints#createUserAndAddToOrg(String, CreateUserRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.User 68 return=createUserAndAddToOrg -UserEndpoints#deleteProfilePhoto() codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 237 return=deleteProfilePhoto -UserEndpoints#deleteProfilePhotoById(String, String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 244 return=deleteProfilePhotoById -UserEndpoints#getCurrentUser(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 316 return=getCurrentUser -UserEndpoints#getProfilePhoto(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 251 return=getProfilePhoto; 257 return=getProfilePhoto; 258 switchIfEmpty=getProfilePhotoNotFound -UserEndpoints#getProfilePhoto(ServerWebExchange, String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 257 return=getProfilePhotoOfUser; 258 switchIfEmpty=getProfilePhotoOfUserNotFound -UserEndpoints#getUserDetail(String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.UserDetail 323 return=getUserDetail -UserEndpoints#getUserOrgs(ServerWebExchange, String, Integer, Integer) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest assembling org.lowcoder.api.usermanagement.view.OrgView 142 return=getUserOrgs; 148 return=getUserOrgs; 164 return=getUserOrgs; 169 return=getUserOrgs -UserEndpoints#getUserProfile(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.api.usermanagement.view.UserProfileView,org.lowcoder.api.authentication.dto.RedirectView 130 return=getUserProfileRedirect; 134 switchIfEmpty=getUserProfile -UserEndpoints#lostPassword(LostPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 287 return=lostPasswordWithoutEmail; 289 return=lostPassword -UserEndpoints#markStatus(MarkUserStatusRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 186 return=markStatusWithUnknownType; 189 return=markStatus -UserEndpoints#newUserGuidanceShown() codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 177 return=newUserGuidanceShown -UserEndpoints#resetLostPassword(ResetLostPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 297 return=resetLostPasswordWithMissingField; 300 return=resetLostPassword -UserEndpoints#resetPassword(ResetPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 274 return=resetPasswordOutsideEnterpriseMode; 277 return=resetPasswordWithoutUserId; 279 return=resetPassword -UserEndpoints#setPassword(String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 307 return=setPasswordEmpty; 309 return=setPassword -UserEndpoints#update(String, String, UpdateUserRequest, ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 202 return=updateById -UserEndpoints#update(UpdateUserRequest, ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 196 return=update; 202 return=update -UserEndpoints#updatePassword(UpdatePasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 264 return=updatePasswordWithEmptyPassword; 266 return=updatePassword -UserEndpoints#uploadProfilePhoto(Mono) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 222 return=uploadProfilePhoto -UserEndpoints#uploadProfilePhotoById(String, String, Mono) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 229 return=uploadProfilePhotoById +UserEndpoints#createSCIMUserAndAddToOrg(String, CreateUserRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.User 93 return=createSCIMUserAndAddToOrg; 96 return=createSCIMUserAndAddToOrgWithInvalidEmail; 103 return=createSCIMUserAndAddToOrg; 106 return=createSCIMUserAndAddToOrg; 109 switchIfEmpty=createSCIMUserAndAddToOrgForNewUser; 120 return=createSCIMUserAndAddToOrgForNewUser +UserEndpoints#createUserAndAddToOrg(String, CreateUserRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.User 69 return=createUserAndAddToOrg +UserEndpoints#deleteProfilePhoto() codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 238 return=deleteProfilePhoto +UserEndpoints#deleteProfilePhotoById(String, String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 245 return=deleteProfilePhotoById +UserEndpoints#getCurrentUser(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 326 return=getCurrentUser +UserEndpoints#getProfilePhoto(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 252 return=getProfilePhoto; 258 return=getProfilePhoto; 259 switchIfEmpty=getProfilePhotoNotFound +UserEndpoints#getProfilePhoto(ServerWebExchange, String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 258 return=getProfilePhotoOfUser; 259 switchIfEmpty=getProfilePhotoOfUserNotFound +UserEndpoints#getUserDetail(String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.domain.user.model.UserDetail 333 return=getUserDetail +UserEndpoints#getUserOrgs(ServerWebExchange, String, Integer, Integer) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest assembling org.lowcoder.api.usermanagement.view.OrgView 143 return=getUserOrgs; 149 return=getUserOrgs; 165 return=getUserOrgs; 170 return=getUserOrgs +UserEndpoints#getUserProfile(ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.lowcoder.api.usermanagement.view.UserProfileView,org.lowcoder.api.authentication.dto.RedirectView 131 return=getUserProfileRedirect; 135 switchIfEmpty=getUserProfile +UserEndpoints#lostPassword(LostPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 291 return=lostPasswordWithoutEmail; 293 return=lostPassword +UserEndpoints#markStatus(MarkUserStatusRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 187 return=markStatusWithUnknownType; 190 return=markStatus +UserEndpoints#newUserGuidanceShown() codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 178 return=newUserGuidanceShown +UserEndpoints#resetLostPassword(ResetLostPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 301 return=resetLostPasswordWithMissingField; 304 return=resetLostPasswordTooWeak; 307 return=resetLostPassword +UserEndpoints#resetPassword(ResetPasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 278 return=resetPasswordOutsideEnterpriseMode; 281 return=resetPasswordWithoutUserId; 283 return=resetPassword +UserEndpoints#setPassword(String) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 314 return=setPasswordEmpty; 317 return=setPasswordTooWeak; 319 return=setPassword +UserEndpoints#update(String, String, UpdateUserRequest, ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 203 return=updateById +UserEndpoints#update(UpdateUserRequest, ServerWebExchange) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 197 return=update; 203 return=update +UserEndpoints#updatePassword(UpdatePasswordRequest) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through 265 return=updatePasswordWithEmptyPassword; 268 return=updatePasswordTooWeak; 270 return=updatePassword +UserEndpoints#uploadProfilePhoto(Mono) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 223 return=uploadProfilePhoto +UserEndpoints#uploadProfilePhotoById(String, String, Mono) codec WP4 org.lowcoder.api.contract.endpoint.UserEndpointsContractTest pass-through org.springframework.http.codec.multipart.FilePart 230 return=uploadProfilePhotoById