Skip to content

ci: cancel superseded pull request runs and let the supabase cli fall back from a throttled registry - #1857

Merged
spydon merged 2 commits into
mainfrom
ci/cancel-superseded-runs
Oct 27, 2026
Merged

spydon merged 2 commits into
mainfrom
ci/cancel-superseded-runs

Conversation

@spydon

@spydon spydon commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

A new push to a pull request now cancels that pull request's CI run if it is still in progress.

Pushing the v3 sync stack started two CI/CD runs for each pull request, about 14 runs and 400 jobs at once. The auth, storage and realtime jobs each pull around ten Supabase images from ghcr.io, so supabase start failed with error from registry: retry-after: …, allowed: 44000/minute before any test ran (for example run 40544530874 on #1793).

  • Pull request runs share a group per pull request number, and the newest run cancels the older one.
  • Pushes to main and manual runs get a group per run id, so release and publish runs are never cancelled or dropped from the queue.

A matching pull request against v3 follows, since the stack's pull requests run the workflow file from v3.

A new push to a pull request now cancels its CI run that is still in progress. Pushing a stack of branches started two runs per pull request, and the hundreds of parallel jobs pulling Supabase images from ghcr.io hit the registry rate limit. Pushes to main keep a group per run, so release runs are never cancelled or dropped.
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Capability matrix drift detected

The following capabilities are marked implemented in the matrix but could not be found in python:

  • database.configuration.auto_retry → expected symbol: AsyncSelectRequestBuilder.retry
  • database.configuration.auto_retry → expected symbol: SyncSelectRequestBuilder.retry
  • realtime.client.connect → expected symbol: SyncRealtimeClient.connect
  • realtime.client.disconnect → expected symbol: AsyncRealtimeClient.disconnect
  • realtime.client.disconnect → expected symbol: SyncRealtimeClient.disconnect
  • realtime.channel.subscribe → expected symbol: SyncRealtimeChannel.subscribe
  • realtime.channel.unsubscribe → expected symbol: SyncRealtimeChannel.unsubscribe
  • realtime.channel.broadcast → expected symbol: SyncRealtimeChannel.send_broadcast
  • realtime.subscriptions.broadcast → expected symbol: SyncRealtimeChannel.on_broadcast
  • realtime.subscriptions.postgres_changes → expected symbol: SyncRealtimeChannel.on_postgres_changes
  • realtime.subscriptions.subscribe_presence → expected symbol: AsyncRealtimeChannel.on_presence_change
  • realtime.subscriptions.subscribe_presence → expected symbol: SyncRealtimeChannel.on_presence_change
  • realtime.presence.track → expected symbol: SyncRealtimeChannel.track
  • realtime.presence.untrack → expected symbol: SyncRealtimeChannel.untrack
  • realtime.presence.presence_state → expected symbol: AsyncRealtimeChannel.presences
  • realtime.presence.presence_state → expected symbol: SyncRealtimeChannel.presences

The following capabilities are marked implemented in python but have no registered symbols to verify:

  • auth.session.auto_refresh (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.cross_client_token_sync (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.oauth_flow_type (no symbols list — cannot confirm implementation exists)
  • client.session_management.custom_storage (no symbols list — cannot confirm implementation exists)
  • client.session_management.persist_session (no symbols list — cannot confirm implementation exists)
  • client.request_configuration.custom_http_client (no symbols list — cannot confirm implementation exists)
  • client.request_configuration.global_headers (no symbols list — cannot confirm implementation exists)
  • database.mutate.select_after_mutation (no symbols list — cannot confirm implementation exists)
  • database.mutate.bulk_rows_with_differing_fields (no symbols list — cannot confirm implementation exists)
  • database.mutate.count (no symbols list — cannot confirm implementation exists)
  • database.mutate.missing_defaults (no symbols list — cannot confirm implementation exists)
  • database.using_filters.eq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.neq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.like (no symbols list — cannot confirm implementation exists)
  • database.using_filters.ilike (no symbols list — cannot confirm implementation exists)
  • database.using_filters.is (no symbols list — cannot confirm implementation exists)
  • database.using_filters.in (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contains (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contained_by (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_adjacent (no symbols list — cannot confirm implementation exists)
  • database.using_filters.overlaps (no symbols list — cannot confirm implementation exists)
  • database.using_filters.text_search (no symbols list — cannot confirm implementation exists)
  • database.using_filters.match (no symbols list — cannot confirm implementation exists)
  • database.using_filters.not (no symbols list — cannot confirm implementation exists)
  • database.using_filters.or (no symbols list — cannot confirm implementation exists)
  • database.using_filters.raw (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex_icase (no symbols list — cannot confirm implementation exists)
  • database.using_filters.not_in (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.order (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.limit (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.range (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.request_cancellation (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.relationship_embed (no symbols list — cannot confirm implementation exists)
  • database.configuration.request_timeout (no symbols list — cannot confirm implementation exists)
  • functions.invocation.method_override (no symbols list — cannot confirm implementation exists)
  • functions.invocation.region_selection (no symbols list — cannot confirm implementation exists)
  • functions.invocation.request_cancellation (no symbols list — cannot confirm implementation exists)
  • functions.invocation.timeout (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.postgres_changes_filter (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.private_channel (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_self (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_replay (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.postgres_changes_multiple_filters (no symbols list — cannot confirm implementation exists)
  • realtime.presence.presence_key (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.heartbeat_interval (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.access_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.request_cancellation (no symbols list — cannot confirm implementation exists)

These may have been renamed, removed, or never registered. Please update the capability matrix.
See: https://github.com/supabase/sdk/blob/main/packages/capability-matrix/docs/capability-matrix.md

@spydon spydon changed the title ci: cancel superseded pull request runs ci: cancel superseded pull request runs and retry rate-limited infra starts Oct 27, 2026
… throttled registry

v3.0.0 pins every recent CLI to ghcr.io, which disables the CLI's own registry fallback, so image pulls failed as soon as ghcr.io throttled. v3.0.1 leaves the registry to the CLI for versions from v2.108.0 on (supabase/setup-cli#453).
@spydon
spydon force-pushed the ci/cancel-superseded-runs branch from ef1f319 to 95f1fae Compare October 27, 2026 17:05
@spydon spydon changed the title ci: cancel superseded pull request runs and retry rate-limited infra starts ci: cancel superseded pull request runs and let the supabase cli fall back from a throttled registry Oct 27, 2026
@spydon
spydon merged commit 3656889 into main Oct 27, 2026
42 of 43 checks passed
@spydon
spydon deleted the ci/cancel-superseded-runs branch October 27, 2026 17:06
spydon added a commit that referenced this pull request Nov 13, 2026
…executor (#2043)

Step 3 of [SDK-2765](https://linear.app/supabase/issue/SDK-2765)
([SDK-2986](https://linear.app/supabase/issue/SDK-2986)): the table
definition, the request value the typed builders of step 4 will collect,
and the executors that run it. A port of the `PostgrestTableRequest` and
`PostgrestTableExecutor` of supabase-flutter #1857, on the column
expressions, filters and orderings of #2041 and #2042. SDK-2711, the
interceptor seam, builds on it.

## What

- `Table[Row, Insert, Update](name, row_type, primary_key=,
computed_fields=, schema=)`: a frozen dataclass with the metadata of a
table, declared once per table as the last attribute of its namespace
class. `Insert` and `Update` are phantom here; the typed builder of step
4 uses them to accept only the table's write types, and `Never` makes
the write methods uncallable. `relations=` waits for step 6, which adds
the relation types it would hold.
- `TableRequest`: a frozen `kw_only` dataclass with the fields of Dart's
value: `table`, `operation`, `schema`, `columns`, `filter`, `orderings`,
`limit`, `offset`, `shape`, `count`, `payload`, `read_only`,
`on_conflict`, `ignore_duplicates`, `returning`, `max_affected`,
`strip_nulls`, `dry_run`, `explain` and `options`. No URL and no
headers, collections are tuples, and a changed copy is
`dataclasses.replace`. `schema=None` means the schema the table carries
and otherwise the client's; `filter=None` means every row, as in Dart,
with the typed builder of step 4 requiring `where()` or `all()` before
it builds such an update or delete. `embedded_scopes` waits for step 6
with the scope type. `TableResult(data, count)` carries `data` as plain
decoded JSON by shape. `TableOperation`, `ResultShape`, `ExplainOptions`
and `RequestOptions(headers, retry, timeout)` come with it.
- `TableExecutor` and `AsyncTableExecutor` protocols with
`execute(request)`. The async one returns `Awaitable[TableResult]`, so
both an `async def` and a method that forwards to another executor
satisfy it.
- `HttpTableExecutor(client)` and `AsyncHttpTableExecutor(client)` share
two Sans-IO functions. One renders a request through `pre_select`,
`pre_insert`, `pre_upsert`, `pre_update`, `pre_delete`, the new
`pre_rpc`, the `select` of a returning write and the `max_affected` of
the string builders into the `PostgrestRequest` they would have sent;
the other decodes the response by shape with their parsers. The
`RetryPolicy` and the request timeout of the client apply through
`communicate()`, and the headers of the client are read when a request
is sent, so `apikey` and the access token of that moment go on a request
built earlier. `X-Client-Info` lists `features=typed-api`, merged into
whatever header the client carries (the supabase client sets its own) by
the new `Headers.with_client_info_features()`;
`Headers.supabase_client_headers()` takes `features=` for the same
segment.
- `ValueError` before anything is sent: a filter on an insert or upsert,
anything but the filter, count method and options on a count, a filter
of an update, delete or count that names no rows of the table, a write
without a payload, a shape other than rows, none or explain on a write
that is not `returning` (a `HEAD` among them), and `strip_nulls` with
csv, geojson or explain. "Names no rows" is the string builder's
`_filters_embedded_resource` rule, every key an embedded resource key
such as `author.name`, since the relation `is_null()` filters arrive in
step 6.
- `RequestOptions.headers` replace the header of the same name, apart
from `Accept`, which the shape decides, and `Prefer`, whose `name=value`
preferences are merged into the rendered ones, each replacing the
preference of the same name.
- `pre_rpc` is extracted from `PostgrestClient.rpc`, `_select_returned`
from `QueryRequestBuilder.select`, and `_max_affected` and `_explain`
from their builder methods, so the executor renders through the same
code. No behavior change for the string builder.

Two defaults differ from the string builder, as in Dart: a write sends
`Prefer: return=minimal` unless `returning` is set, and a list payload
sends `missing=default` so that a key left out of some rows gets the
database default. One thing differs from Dart: the `columns` of a
function call make its `select` list whatever `returning` says, since a
function call returns its rows regardless and `returning` is a write
option.

Three things have no string builder counterpart. Several orderings go
into one `order=title.desc,id` parameter, since PostgREST keeps the
first `order` parameter only; the string builder sends one parameter per
`order()` call, which is worth its own look. `dry_run` sends `Prefer:
tx=rollback` as the Dart and JS builders do, and since PostgREST accepts
that preference whatever its `db-tx-end` setting and commits when the
setting does not allow the override, the executors check
`Preference-Applied` of the response and raise `APIError` when the
rollback was not applied, so that a committed dry run is loud rather
than silent. `handling=strict` would not help: PostgREST 13 accepts
`tx=rollback` under strict handling and still ignores it.
`ResultShape.GEOJSON` adds `ResponseShape.GEOJSON` to
`PostgrestRequest`, rendered as `Accept: application/geo+json` and
rejected with `strip_nulls` like csv.

## Tests

- `test_table_executor.py`: `TestRendersWhatTheStringBuilderSends`
finalizes the rendered request and the string builder's for 48 queries
over every operation and shape and compares method, path, query,
headers, content, timeout and retry, plus the schema of the table and of
the request, the preference merge and the `Accept` of the shape. Then
the pre-send `ValueError`s and the filters that do name rows, decoding
by shape (rows, single, `maybe_single` with its 406, none, head, csv,
geojson, explain as text and as json, value, count, a counted select,
silent and returning writes, an error status, a body in another shape),
the send path (`X-Client-Info` with and without a client-set header,
`apikey` and a token set after the executor was created, request
timeout, retries with the policy of the client and per request, schema),
the async executor, and a soft-delete executor wrapped around both
executors.
- `test_table_request.py`: value semantics, defaults and option
validation.
- `tests/typecheck/tables.py` under mypy, pyright and pyrefly: a row
type, primary key or computed field of another table and a nullable
primary key are errors on exactly the marked lines; `HttpTableExecutor`
satisfies `TableExecutor` and `AsyncHttpTableExecutor` satisfies
`AsyncTableExecutor`, each is rejected as the other, an async client is
rejected by the sync executor, and wrapping executors satisfy both.
- `test_headers.py`: the features segment and the merge.

## Compliance

The new symbols are listed under the top-level `supporting_symbols` of
`sdk-compliance.yaml`, as in steps 1 and 2; the feature status changes
in step 8.

## Found on the way

`PostgrestClient.schema()` builds the new client from
`dict(self.default_headers)`, which already holds `Accept-Profile:
public`, and the constructor appends to it with `set()`, so the request
carries `Accept-Profile: public, library`. Not fixed here; the parity
test for a schema uses a client created with `schema="library"` instead.

Linear: SDK-2986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant