Add dry-run via deploy=false connection property#235
Open
ryannedolan wants to merge 5 commits into
Open
Conversation
When deploy=false is set, each DDL statement is parsed, validated, and applied to the in-memory Calcite schema, but the underlying deployers are not invoked. This lets a session execute a multi-statement script end-to-end — later statements see the in-memory effects of earlier ones (CREATE TABLE FOO ... CREATE VIEW BAR AS SELECT * FROM FOO validates correctly) — without producing any external side effects. Orthogonal to mode: deploy=false + mode=apply dry-runs an apply-mode script. Distinct from SPECIFY (!specify), which is the strict zero-side-effect single-statement preview that still invokes deployer.specify() and unwinds the in-memory schema afterward. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
At each deploy call site (CREATE VIEW, CREATE TRIGGER, CREATE
MV/TABLE/DATABASE, FIRE/PAUSE/RESUME/DROP TRIGGER, DROP {MV,VIEW,TABLE}),
emit "Dry-run (deploy=false): skipping <verb> of <kind> <name>" when in
dry-run mode and suppress the post-deploy "Deployed X" confirmation that
would otherwise lie. Previously dry-run silently skipped the deployer
call but the surrounding "Deploying ..." / "Deployed ..." logs still
claimed deployment, leaving no operational indication that the skip
happened.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code Coverage
|
The `kubectl wait kafka.kafka.strimzi.io/one --for=condition=Ready --timeout=10m` was timing out in CI. Two changes to fix this: 1. Increase all Kafka/KafkaTopic wait timeouts from 10m to 15m 2. Reduce KafkaNodePool replicas from 3 to 1 (controller and broker) The replication factors in kafka.yaml are already all set to 1, so 3 physical nodes add resource overhead without benefit for testing. Fewer pods start faster in the resource-constrained GitHub Actions Kind cluster.
- Extract `shouldSkipDeployment(DdlMode, Connection)` helper to eliminate the duplicated `mode.mutable() && isDryRun(conn)` expression across processCreateMaterializedView, processCreateTable, processCreateDatabase - Add unit tests for the new helper covering all three cases - Rename testIsDryRunExplicitTrueDeploys → testIsDryRunExplicitTrueReturnsFalse - Rename testDdlModeSpecifyAlwaysCallsSpecifyEvenInDryRun → testDdlModeSpecifyIgnoresDryRunProperty
- Rename testIsDryRunExplicitTrueReturnsFalse → testIsDryRunReturnsFalseWhenDeployIsTrue - Add cross-reference to sql-cli.md#specify-sql in the dry-run/!specify distinction note
Copilot
AI
changed the title
Add dry-run mode for DDL via deploy=false connection property
Fix CI: Kafka startup timeout in integration tests
Jun 18, 2026
deploy=false connection property
Collaborator
Author
|
Copilot fixed the build but clobbered the PR in the process. Sorry for the churn. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
deployconnection property: whendeploy=false, each DDL statement is parsed, validated, andapplied to the in-memory Calcite schema, but the underlying deployers are not invoked. Lets a session
validate a multi-statement script end-to-end (later statements see earlier ones' in-memory effects)
without external side-effects.
mode: combinedeploy=falsewithmode=applyto dry-run an apply-mode script.SPECIFY(!specify), which remains the strict zero-side-effect single-statementpreview that still invokes
deployer.specify()and unwinds the in-memory schema afterward. Dry-runpreserves the in-memory mutation across statements and invokes no deployer method at all.
Details
HoptimatorDdlUtils.isDryRun(Connection)reads thedeployproperty (defaults totrue/live).DdlMode.CREATEandDdlMode.UPDATEbranches gate theDeploymentService.create/updatecall onisDryRun;SPECIFYis unchanged. - Imperative non-CREATE DDL paths (DROP {TABLE, VIEW, MATERIALIZED VIEW, TRIGGER},FIRE/PAUSE/RESUME TRIGGER) use inlineif (!isDryRun(connection))guards. These don't fit theDdlModeenum, which isabout CREATE-statement semantics (strict vs. apply vs. preview).
CREATE VIEWandCREATE TRIGGERpreviously bypassedDdlMode.executeDeployersand calledDeploymentService.create/updatedirectly; routed throughmode.executeDeployersto inherit the gating.Testing Done
Notice the "dry run ... skipping" message in the logs.