Skip to main content

version_gate

Version gate: refuse a v9 flow spec this SDK is too old to run.

A task template's declared version: is the floor its contents need — the step versions it names and the step config fields it sets. Checking it before the DAG is parsed is what turns "this SDK predates the template" into a message saying so, rather than a StepNotFoundError naming whichever step happened to be looked up first.

The comparison is a ceiling, not list membership: a spec at or below the highest version this SDK knows is runnable, because every step and config field such a spec can name already exists. That keeps an older stored spec (replayed from flow_specs_store weeks after it was linked) and an unregistered patch version running, while a spec above the ceiling is refused.

Module

Functions

check_flow_spec_version

def check_flow_spec_version(flow_spec: FlowSpec)> None:

Check flow_spec's declared version against this SDK's ceiling.

Arguments

  • flow_spec: The deserialised v9 flow spec about to be built.

Raises

  • FlowSpecVersionError: If the spec's version is newer than the highest version this SDK knows, or cannot be parsed as a semantic version.

Classes

FlowSpecVersionError

class FlowSpecVersionError(*args, **kwargs):

Raised when a flow spec's declared version cannot be run by this SDK.

Covers three cases: the version is newer than this SDK's ceiling, the version cannot be read as a semantic version, or this SDK has no readable known versions to check against.