Hardening: typed transient failures + required Deployer.exists() - #242
Merged
Conversation
jogrogan
force-pushed
the
jogrogan/decouple-pr3-hardening
branch
from
July 27, 2026 22:24
1494941 to
fc725c2
Compare
ryannedolan
approved these changes
Jul 27, 2026
Propagate typed transient SQLExceptions from the SPI, classify K8s failures by retryability (and normalize K8sYamlApi connectivity failures), and make Deployer.exists() an abstract SPI method (backfilling the three implementors that relied on the assume-absent default) so a direct-path re-create against a different schema is rejected rather than silently masked. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jogrogan
force-pushed
the
jogrogan/decouple-pr3-hardening
branch
from
July 27, 2026 22:42
fc725c2 to
5ef0847
Compare
Code Coverage
|
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.
Decouple Proteus DDL
Hoptimator's validation and deployment logic is currently reachable only by issuing SQL DDL through a Calcite/JDBC connection. That couples every caller to Calcite and forces schema definitions through a lossy Avro → RelDataType → Avro round-trip. Hoptimator via a CLI or over REST/gRPC may want to create/validate tables by handing us a table name + a schema directly — not by constructing DDL.
This stacked series decouples the validators and deployers from Calcite so the same validation and deployment engine can be driven either by SQL or by a direct, connection-free call — while keeping validators/deployers as a clean SPI. The payoff: an API call to "create table from a schema" path with identical guarantees to DDL (including dry-run), lossless Avro fidelity, and no Calcite dependency for callers that don't want one. It also keeps the door open for follow-ups (e.g. materializations, source→sink field mappings) without re-plumbing.
Stacked series (review/merge in order):
(This is PR 3 of 3.)
PR 3/3 — Hardening: typed transient failures + required
Deployer.exists()Base:
jogrogan/decouple-pr2-api· Branch:jogrogan/decouple-pr3-hardeningStacked series: 3 of 3 (PR1 SPI foundation → PR2 direct table API → this)
Why
PR1 and PR2 deliver the SPI decoupling and the SQL-free
TableService. This final PRhardens that surface so it behaves correctly under real-world failure modes and so the
direct-path contract is enforced rather than assumed.
What changes
1. Typed transient failures across the SPI
transient.
K8sApi/K8sYamlApinormalize connectivity failures to a typedSQLTransientException, and genuinely non-retryable failures surface asSQLNonTransientException.(
ValidationService,DeploymentService,ConnectionService) so callers candistinguish "retry me" from "this will never succeed."
Database-list failures are surfaced instead of being swallowed into an empty"no databases" result.
2.
Deployer.exists()is now an abstract SPI methodexists()is now abstract, andthe three real implementors (K8s, Venice, and the logical/materialized-view deployers)
are backfilled with genuine existence checks.
createagainst an incompatible existing table (e.g. adifferent schema,
updateIfExists=false) is rejected with a clearSQLNonTransientException("... already exists")rather than silently masked.Testing
K8sApiTest,K8sYamlApiTest,K8sUtilsTest,K8sPipelineBundleTest,K8sMaterializedViewDeployerTest,ValidationServiceTest,DeploymentServiceTest,ConnectionServiceTest, and the per-deployerexists()backfills (
Venice,MySQL,Logical, provider tests).createWithoutUpdateIfExistsFailsWhenStoreExistsnow expectsSQLNonTransientException).Review notes
exists()); bothare additive/behavioral hardening on top of PR2's API.
TableService/DirectDeploymentContextcore or the Venicetest's
resolveVenicehelper — the only change toVeniceTableServiceIntegrationTesthere is the exception-type assertion, a different hunk than PR2's resolution change.