MLE-27214 Merging release/6.2.0 into master#836
Conversation
Includes some Copilot-generated tests of marginal usefulness. Have manually tested this, working well, will try out in the Node Client repo next.
Same as before, but using ManageClient instead of DatabaseClient. Bumped a few example dependencies to try to talk sense into Black Duck too. Added a Jenkins option for fast publishing too.
Did some renaming based on the terminology used by the PDC API. Added some logging to assist with debugging when a MarkLogic endpoint does not exist.
"null" was being logged for security API calls when doing cloud auth. No longer.
This is just scratching the surface - next step will be to modify GenericFileLoader to accept a DatabaseClientSupplier instead of a DatabaseClient. That will allow the commands for loading modules, data, and schemas to only construct a client when necessary instead of eagerly.
Still relying on manual testing for this.
This will replace tokens
This is solely the domain of DataHub now and should have been deprecated / removed a long time ago.
Have to hardcode the 3 PDC endpoint names so that we don't include them when determining if any endpoints are new / modified.
Also adding mavenLocal back in to resolve pdc-java-client when not on the VPN.
Upgrade Spring to version 7 (7.0.5) Upgrade gradle to 9.10 Upgrade junit and jupiter to supported version 6 (6.0.3) Make mods to a few classes to support new version of Spring 7. Update notice file with new Spring 7 dependency.
Plan to add new pipelines to test JDK 17, 21 and 25.
Resolves a bunch of Black Duck issues. Also switched over to the standard Docker image we're using elsewhere.
Avoids the need for publishing pdc-java-client. May be removed in a future minor version. Also performed a few minor/patch bumps.
Cleaned up some warnings in the one class that uses jsonpatch too
Updated NOTICE and added sbom.spdx.json
|
Copyright Validation Results ❌ Failed Files
⏭️ Skipped (Excluded) Files
✅ Valid Files
🛠️ GuidanceFollow these steps to fix the failed files:
|
There was a problem hiding this comment.
Pull request overview
Merges the 6.2.0 release branch into master, including new PDC (Progress Data Cloud) support for deploying MarkLogic endpoints, connection/readiness helpers, and a broad set of dependency/build updates.
Changes:
- Added PDC client utilities and a new command to deploy MarkLogic endpoint definitions from project config into PDC.
- Refactored several commands/interceptors for updated Spring HTTP APIs, improved logging, and safer client lifecycle handling.
- Upgraded build tooling and dependencies (Gradle wrapper, Spring/Jackson, test libs) and updated NOTICE/metadata.
Reviewed changes
Copilot reviewed 42 out of 351 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| ml-app-deployer/src/main/java/com/progress/pdc/client/Util.java | Adds shared logger holder for PDC client code. |
| ml-app-deployer/src/main/java/com/progress/pdc/client/RetryOn404Interceptor.java | Introduces OkHttp interceptor to retry transient 404s after endpoint creation. |
| ml-app-deployer/src/main/java/com/progress/pdc/client/PdcClientException.java | Adds runtime exception wrapper to keep ApiException context. |
| ml-app-deployer/src/main/java/com/progress/pdc/client/PdcClient.java | Adds small client wrapper around generated PDC API client + MarkLogic cloud auth. |
| ml-app-deployer/src/main/java/com/marklogic/rest/util/PreviewInterceptor.java | Updates for Spring HTTP API changes and minor preview/report improvements. |
| ml-app-deployer/src/main/java/com/marklogic/rest/util/MgmtResponseErrorHandler.java | Updates DefaultResponseErrorHandler override to new signature (Spring). |
| ml-app-deployer/src/main/java/com/marklogic/mgmt/ManageClient.java | Adjusts username resolution behavior for security user requests. |
| ml-app-deployer/src/main/java/com/marklogic/mgmt/ConnectionChecker.java | Adds utility to wait until Manage API is consistently reachable. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/util/LogUtil.java | Adds shared app-deployer logger holder. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/security/InsertCertificateHostsTemplateCommand.java | Improves logging style and adds rationale comment. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/schemas/LoadSchemasCommand.java | Refactors schema loading lifecycle and error handling/logging. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/plugins/InstallPluginsCommand.java | Refactors to use DatabaseClientSupplier for client lifecycle control. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/pdc/DeployMarkLogicEndpointsCommand.java | Adds new command to deploy MarkLogic endpoint mappings to PDC based on config files. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/modules/LoadModulesCommand.java | Uses try-with-resources for DatabaseClient and improves logging style. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/es/GenerateModelArtifactsCommand.java | Marks command deprecated since 6.2.0. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/data/LoadDataCommand.java | Refactors to use DatabaseClientSupplier and improves logging style. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/SortOrderConstants.java | Adds sort order constant for new PDC endpoints deployment command. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/CommandMapBuilder.java | Registers new PDC command group and DeployMarkLogicEndpointsCommand. |
| ml-app-deployer/src/main/java/com/marklogic/appdeployer/AppConfig.java | Adds PDC config path support and logs base-path warnings for PDC connections. |
| ml-app-deployer/build.gradle | Updates dependencies (JAXB API, commons-lang3, zjsonpatch) and adds PDC client deps. |
| gradlew.bat | Removes CLASSPATH usage consistent with wrapper updates. |
| gradlew | Removes CLASSPATH usage consistent with wrapper updates. |
| gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper distribution URL. |
| gradle.properties | Bumps project version and updates core dependency versions (Jackson/Spring/JUnit). |
| examples/sample-project/build.gradle | Updates Spring and marklogic-junit5 versions in sample. |
| examples/redaction-ruleset-project/build.gradle | Updates MLCP version. |
| examples/qbv-example/build.gradle | Updates MLCP version. |
| examples/mlcp-project/build.gradle | Updates MLCP and logback versions. |
| examples/local-testing-project/gradle.properties | Updates sample mlGradleVersion property. |
| examples/local-testing-project/build.gradle | Reorders repositories (mavenCentral before mavenLocal). |
| examples/jdbc-project/build.gradle | Updates Spring JDBC version. |
| examples/gradlew.bat | Removes CLASSPATH usage consistent with wrapper updates. |
| examples/gradlew | Removes CLASSPATH usage consistent with wrapper updates. |
| examples/gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper distribution URL in examples. |
| examples/data-services/build.gradle | Updates MarkLogic Java Client and logback versions. |
| examples/cpf-project/build.gradle | Updates marklogic-junit5 version. |
| examples/alert-project/build.gradle | Updates marklogic-junit5 version. |
| NOTICE.txt | Updates third-party notices and versions for 6.2.0. |
| Jenkinsfile | Adds parameters for publish-only and Java version selection; adjusts JAVA_HOME selection. |
| CODEOWNERS | Removes one default code owner entry. |
| .env | Updates MarkLogic Docker image reference. |
| .copyrightconfig | Excludes CODEOWNERS from copyright tool processing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public UUID getEnvironmentId() { | ||
| try { | ||
| ServiceGroupViewModel viewModel = new ServiceGroupApi(apiClient).apiServicegroupGet(null).get(0); | ||
| return viewModel.getId(); | ||
| } catch (ApiException ex) { | ||
| throw new PdcClientException("Unable to get environment ID, could not get service groups from PDC", ex); | ||
| } | ||
| } |
| } catch (FailedRequestException fre) { | ||
| if (fre.getMessage().contains("NOSUCHDB")) { | ||
| logger.warn("Unable to load schemas because no schemas database exists; cause: " + fre.getMessage()); | ||
| String message = "Unable to load schemas, as schemas database %s does not exist".formatted(schemasDatabaseName); | ||
| throw new RuntimeException(message, fre); | ||
| } else { | ||
| throw fre; | ||
| } | ||
| } finally { |
| DatabaseClient contentClient = buildContentClient(context, schemasDatabaseName); | ||
| try { | ||
| SchemasLoader schemasLoader = buildSchemasLoader(context, schemasClient, contentClient); | ||
| private void loadSchemas(String schemasPath, String schemasDatabaseName, CommandContext context) { |
| * @return | ||
| */ | ||
| protected String findContentDatabaseAssociatedWithSchemasDatabase(CommandContext context, String schemasDatabaseName) { | ||
| private String findContentDatabaseAssociatedWithSchemasDatabase(CommandContext context, String schemasDatabaseName) { |
| } | ||
|
|
||
| Map<String, MarkLogicHttpEndpoint> existingEndpointsByName = customExistingEndpoints.stream() | ||
| .collect(Collectors.toMap(MarkLogicHttpEndpoint::getName, Function.identity())); |
| public interface LogUtil { | ||
|
|
||
| Logger APP_DEPLOYER_LOGGER = LoggerFactory.getLogger("com.marklogic.appdeployer"); |
| for (int attempt = 1; attempt <= maxAttempts; attempt++) { | ||
| try { | ||
| manageClientSupplier.get().getJson("/manage/v2"); | ||
| consecutiveSuccesses++; | ||
| logger.info("Connection successful (attempt {}, consecutive successes: {})", attempt, consecutiveSuccesses); | ||
|
|
||
| if (consecutiveSuccesses >= minSuccessfulAttempts) { | ||
| logger.info("MarkLogic is ready ({} consecutive successful connections)", consecutiveSuccesses); | ||
| return; | ||
| } | ||
|
|
||
| if (attempt < maxAttempts) { | ||
| logger.info("Waiting {}ms before next verification...", waitInterval); | ||
| sleep(); | ||
| } | ||
| } catch (Exception e) { | ||
| consecutiveSuccesses = 0; | ||
| handleConnectionFailure(attempt, e); | ||
| } | ||
| } |
| } | ||
| } | ||
| return username; | ||
| return username == null ? "" : username; |
| def getJavaHomePath() { | ||
| if (env.JAVA_VERSION == "JAVA25") { | ||
| return "/home/builder/java/jdk-25.0.1" | ||
| } else if (env.JAVA_VERSION == "JAVA21") { | ||
| return "/home/builder/java/jdk-21.0.1" | ||
| } else { | ||
| return "/home/builder/java/jdk-17.0.2" | ||
| } | ||
| } |
| GRADLE_DIR =".gradle" | ||
| DMC_USER = credentials('MLBUILD_USER') | ||
| DMC_PASSWORD = credentials('MLBUILD_PASSWORD') | ||
| JAVA_HOME_DIR = getJavaHomePath() |
No description provided.