versionSelector.
Use version dependencies to pin compatibility against a specific upstream cut
(e.g. frontend v3.4.0 requires api ≥ v2.1.0) — without baking that rule
into a workspace-wide policy.
How It Works
- Resolution is per-resource. For each resource the version targets, Ctrlplane looks up the upstream deployment’s current release on that same resource.
- Current = last successful release. If the upstream has no successful release on the resource, the dependency is unsatisfied and the version is blocked on that target.
- CEL evaluation. The
versionSelectoris evaluated against the upstream’s currentversion.*. All declared edges must pass. - Reconciliation. When an upstream deployment successfully deploys a new version on a resource, every downstream version with an edge to it is re-evaluated for that resource — so a previously-blocked version can automatically unblock.
Version Dependencies vs. Deployment-Dependency Policy
Both gate a deployment on another, but they’re different tools:
Rule of thumb: if the requirement comes from the build itself
(“this build of frontend needs api ≥ v2”), use a version dependency. If it
comes from an operational rule (“api always waits for db migrations”),
use a deployment-dependency policy.
Creating Version Dependencies
Inline at version creation
ThePOST .../deployments/{deploymentId}/versions endpoint accepts a
dependencies map keyed by upstream deployment ID. The dependency edges
are inserted in the same transaction as the version itself, so reconciliation
never sees a version with a missing edge.
Upsert a single dependency
To add or change one edge after the version exists:202 Accepted; downstream release targets are re-queued for
re-evaluation.
List dependencies for a version
Delete a dependency
versionSelector Reference
The selector is a CEL expression evaluated against the upstream deployment’s
current version on the resource:
deployment.* and environment.* are not in scope — this selector only
filters on the upstream version. Use a deployment-dependency policy if you
need to gate on deployment.* or environment.*.
Common Selectors
Constraints
- A version cannot depend on its own deployment (
400). - Both the version and every dependency deployment must live in the same
workspace (
404otherwise). - The
(deploymentVersionId, dependencyDeploymentId)pair is unique —PUTupserts theversionSelectorfor that pair. - Edges cascade-delete with the version or the dependency deployment.
Reconciliation Behavior
Version dependencies hook into the release-policy evaluator and the job-dispatch downstream trigger:- At evaluation time, every declared edge must pass; the first failing edge denies the release.
- On upstream success, each downstream deployment that has any version declaring an edge to the upstream is re-queued so previously-blocked versions can flip to allowed without manual intervention.
api v2.x
before the API has actually rolled out — it will sit blocked, and unblock
itself the moment the API reaches v2.x on each resource.
Next Steps
- Deployment Dependency Policy — the policy-based, deployment-wide variant
- Deployment Overview — how versions become releases
- CEL Reference — the expression language