Skip to content

Commit fdedb3a

Browse files
authored
Move the Conductor client out to dev.dbos:transact-enterprise (#632)
The Conductor client moves out of this module into the closed-source `dev.dbos:transact-enterprise` artifact (dbos-inc/dbos-enterprise-java). Core already finds its client through the `ConductorProvider` service (#626). The enterprise artifact now registers the only implementation. ## What moves - `conductor/Conductor.java` and the `conductor/protocol` package are removed, along with `BundledConductorProvider` and its `META-INF/services` registration. - `ConductorTest`, `TestWebSocketServer` and the Java-WebSocket test dependency go with the client. - The deprecated admin server used two protocol classes, `WorkflowsOutput` and `StringOrListDeserializer`. It now has package-private copies in `dev.dbos.transact.admin`. No public symbol, config key or on-disk write changes outside the `conductor` packages. `ConductorProvider`, `ConductorConnection`, `ConductorOptions` and `ConductorProviders` stay. ## When a provider is required Launch requires exactly one provider only when the application will connect, and otherwise fails naming the artifact and version to add. The application connects when: - a Conductor key is configured; or - on DBOS Cloud (`DBOS__CLOUD=true`), when `DBOS__CONDUCTOR_APP_NAME`, `DBOS__CONDUCTOR_KEY` and `DBOS__CONDUCTOR_URL` are all set. Before this change, any `DBOS__CLOUD=true` launch required a provider, even one that would never connect. The executor now works out its Conductor options in the constructor and loads a provider only when there are options. The `conductorKey` javadoc in `DBOSConfig` and the Spring starter's `dbos.conductor.key` say the enterprise artifact is needed. ## Tests - Tests that launch with Conductor use `TestConductorProvider`, a test-only provider that connects to nothing and records the options of each connection. - `cloudAutoStartsConductor` checks that the `DBOS__CONDUCTOR_*` variables reach the provider. - `cloudWithoutConductorSettingsDoesNotConnect` checks that a Cloud launch without them needs no provider. - `database/ImportExportRoundTripTest` keeps the export/import round-trip tests in core and passes the exported records straight to import: - a debounced workflow comes back debounced; - payloads in the old `workflow_status` columns import into the payload tables; - inputs, outputs and errors keep their Java types. ## Merging The paired enterprise PR adds the client. Merge this first, then the enterprise PR once this repo's `Publish` run has finished: enterprise's publish compiles against the newest core build on GitHub Packages. Between this publish and the enterprise one, an application that resolves both artifacts with `+` has no Conductor client. Applications that connect to Conductor, including DBOS Cloud apps with Conductor settings, must add `dev.dbos:transact-enterprise` when they upgrade. This belongs in the 1.3 release notes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 200117b commit fdedb3a

82 files changed

Lines changed: 144 additions & 8058 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎gradle/libs.versions.toml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ cron-utils = "9.2.1"
55
hibernate = "7.4.10.Final"
66
hikaricp = "7.1.0"
77
jackson = "3.2.3"
8-
java-websocket = "1.6.0"
98
jaxb-api = "4.0.5"
109
jdbi = "3.54.0"
1110
# jOOQ pinned to 3.19.x for JDK 17 compat https://www.jooq.org/download/support-matrix-jdk
@@ -42,7 +41,6 @@ assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj" }
4241
cron-utils = { module = "com.cronutils:cron-utils", version.ref = "cron-utils" }
4342
hikaricp = { module = "com.zaxxer:HikariCP", version.ref = "hikaricp" }
4443
jackson-databind = { module = "tools.jackson.core:jackson-databind", version.ref = "jackson" }
45-
java-websocket = { module = "org.java-websocket:Java-WebSocket", version.ref = "java-websocket" }
4644
jaxb-api = { module = "jakarta.xml.bind:jakarta.xml.bind-api", version.ref = "jaxb-api" }
4745
jdbi-core = { module = "org.jdbi:jdbi3-core", version.ref = "jdbi" }
4846
jdbi-spring = { module = "org.jdbi:jdbi3-spring", version.ref = "jdbi" }

‎transact-spring-boot-starter/src/main/java/dev/dbos/transact/spring/DBOSProperties.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ public void setVersion(String version) {
9292
/** DBOS Cloud conductor connection properties. */
9393
public static class Conductor {
9494

95-
/** Conductor API key. */
95+
/**
96+
* Conductor API key. Connecting to Conductor requires {@code dev.dbos:transact-enterprise} on
97+
* the class path.
98+
*/
9699
private String key;
97100

98101
/** Conductor domain. */

‎transact/build.gradle.kts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ dependencies {
2525
testImplementation(libs.system.stubs.jupiter)
2626
testRuntimeOnly(libs.junit.platform.launcher)
2727

28-
testImplementation(libs.java.websocket)
2928
testImplementation(libs.kryo)
3029
testImplementation(libs.logback.classic)
3130
testImplementation(libs.maven.artifact)

‎transact/src/main/java/dev/dbos/transact/admin/AdminServer.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package dev.dbos.transact.admin;
22

3-
import dev.dbos.transact.conductor.protocol.WorkflowsOutput;
43
import dev.dbos.transact.database.SystemDatabase;
54
import dev.dbos.transact.execution.DBOSExecutor;
65
import dev.dbos.transact.json.JsonUtility;

‎transact/src/main/java/dev/dbos/transact/admin/ListQueuedWorkflowsRequest.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package dev.dbos.transact.admin;
22

3-
import dev.dbos.transact.conductor.protocol.StringOrListDeserializer;
43
import dev.dbos.transact.workflow.ListWorkflowsInput;
54
import dev.dbos.transact.workflow.WorkflowState;
65

‎transact/src/main/java/dev/dbos/transact/admin/ListWorkflowsRequest.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package dev.dbos.transact.admin;
22

3-
import dev.dbos.transact.conductor.protocol.StringOrListDeserializer;
43
import dev.dbos.transact.workflow.ListWorkflowsInput;
54
import dev.dbos.transact.workflow.WorkflowState;
65

transact/src/main/java/dev/dbos/transact/conductor/protocol/StringOrListDeserializer.java renamed to transact/src/main/java/dev/dbos/transact/admin/StringOrListDeserializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dev.dbos.transact.conductor.protocol;
1+
package dev.dbos.transact.admin;
22

33
import java.util.ArrayList;
44
import java.util.List;
@@ -8,7 +8,7 @@
88
import tools.jackson.databind.DeserializationContext;
99
import tools.jackson.databind.ValueDeserializer;
1010

11-
public class StringOrListDeserializer extends ValueDeserializer<List<String>> {
11+
class StringOrListDeserializer extends ValueDeserializer<List<String>> {
1212
@Override
1313
public List<String> deserialize(JsonParser p, DeserializationContext ctxt) {
1414
if (p.currentToken() == JsonToken.START_ARRAY) {

transact/src/main/java/dev/dbos/transact/conductor/protocol/WorkflowsOutput.java renamed to transact/src/main/java/dev/dbos/transact/admin/WorkflowsOutput.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package dev.dbos.transact.conductor.protocol;
1+
package dev.dbos.transact.admin;
22

33
import dev.dbos.transact.json.JsonUtility;
44
import dev.dbos.transact.workflow.WorkflowStatus;
55

66
import java.util.Objects;
77

8-
public class WorkflowsOutput {
8+
class WorkflowsOutput {
99
public String WorkflowUUID;
1010

1111
// Note, remaining fields are optional

‎transact/src/main/java/dev/dbos/transact/conductor/BundledConductorProvider.java‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)