Skip to main content

MD_LIST_FLIGHT_VERSIONS

Preview
This feature is in preview and is subject to change.

Returns every FlightVersion for a single Flight, newest first. Use this to browse the history of config, token, secrets, and timeout changes.

Rows carry version metadata only. The source columns (source_code, requirements_txt) are not returned, so listing a long history doesn't pull a Python file per row — read those for one version with MD_GET_FLIGHT_VERSION.

Syntax

SELECT * FROM MD_LIST_FLIGHT_VERSIONS(
flight_id := '<flight_id>',
"LIMIT" := <n>,
"OFFSET" := <n>
);

Parameters

ParameterTypeRequiredDefaultDescription
flight_idUUIDYesIdentifier of the Flight.
LIMITUINTEGERNo50Maximum number of versions to return.
OFFSETUINTEGERNo0Skip this many versions before returning.

LIMIT and OFFSET are SQL keywords and must be quoted when used as named arguments.

Return columns

ColumnTypeDescription
version_idUUIDIdentifier of this version.
flight_idUUIDFlight identifier.
flight_versionUINTEGERVersion number, newest first.
created_atTIMESTAMP WITH TIME ZONEWhen this version was created.
access_token_nameVARCHARAccess token label for this version.
flight_secret_namesVARCHAR[]Secret names list for this version.
configMAP(VARCHAR, VARCHAR)Config map for this version.
max_runtime_secUINTEGERPer-run timeout in seconds. 0 means no timeout.

Examples

Get the full version history:

SELECT flight_version, created_at, access_token_name
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>');

Just the latest version:

SELECT flight_version, created_at
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>', "LIMIT" := 1);

Skip the latest, get the rest:

SELECT flight_version, created_at
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>', "OFFSET" := 1);

Find which versions changed the per-run timeout:

SELECT flight_version, created_at, max_runtime_sec
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>');