Skip to content

fix(ci): resolve compliance tooling and spec from the called workflow SHA - #107

Merged
spydon merged 1 commit into
mainfrom
fix/pin-compliance-tooling-to-workflow-sha
Aug 28, 2026
Merged

fix(ci): resolve compliance tooling and spec from the called workflow SHA#107
spydon merged 1 commit into
mainfrom
fix/pin-compliance-tooling-to-workflow-sha

Conversation

@spydon

@spydon spydon commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

Restructures the five reusable validate-sdk-compliance-* workflows so that the composite actions and the capability spec are resolved from the single supabase/sdk commit the caller pinned the workflow at (job.workflow_sha), instead of being referenced remotely by a hardcoded SHA or @main.

Each job now checks out supabase/sdk once into _sdk-spec at inputs.sdk-ref || job.workflow_sha and references the actions locally (./_sdk-spec/.github/actions/...). The actions' own spec checkouts become transitional no-ops when sdk-ref is empty.

Why

The supabase-go compliance job broke on every PR (example run):

An error occurred trying to start process '/usr/bin/bash' with working directory
'.../_sdk-spec/scripts/capability-matrix'. No such file or directory

Root cause: validate-sdk-compliance-go.yml pins its composite actions to the v1.2.0 SHA (29e402da), whose steps still use the pre-monorepo scripts/capability-matrix paths, while the actions check out the spec at sdk-ref defaulting to main. #93 restructured the repo into packages/ with compatibility symlinks, and #102 removed the symlinks, so the frozen action code and the floating spec checkout diverged.

uses: cannot carry an expression, so a reusable workflow cannot remotely reference its sibling actions at its own SHA. The Go workflow worked around that with a hardcoded previous-release SHA that #93 forgot to bump; the other language workflows used @main, which hides the same skew and defeats the callers' SHA pins. Checking the repo out at job.workflow_sha (the pattern sync-sdk-compliance.yml already uses) and referencing the actions locally removes the entire failure class: workflow, action code, and spec always come from one immutable commit.

Compatibility

  • Consumers pinned to v1.3.0 and earlier keep working: those workflow versions reference the actions remotely and always pass a non-empty sdk-ref, which now triggers the actions' transitional self-checkout path (against main, whose layout matches). The transitional steps and the actions' sdk-ref inputs can be deleted once every consumer is on the new release.
  • sdk-ref on the workflows remains as an explicit override for pre-merge testing; its default changes from main to the called workflow's SHA.
  • supabase-go stays broken until it bumps: its pinned v1.3.0 Go workflow references the actions at the v1.2.0 SHA, which no ref can fix from the caller side alone. Pinning sdk-ref: v1.3.0 there is the only stopgap.

Follow-up after merge

  1. Cut a release (v1.4.0) including this change.
  2. Bump the reusable-workflow pins in supabase-go (dropping its sdk-ref: main override), then supabase-flutter, supabase-js, supabase-py, supabase-swift.
  3. Once all consumers are bumped, remove the transitional sdk-ref handling from the two composite actions.

@spydon
spydon requested review from a team as code owners August 28, 2026 10:21
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bb496b54-6b6f-4ea3-a012-a82b0b1449a1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@spydon
spydon merged commit c187e60 into main Aug 28, 2026
2 checks passed
@spydon
spydon deleted the fix/pin-compliance-tooling-to-workflow-sha branch August 28, 2026 10:27
spydon pushed a commit that referenced this pull request Aug 28, 2026
🤖 I have created a release *beep* *boop*
---


## [1.4.0](v1.3.0...v1.4.0)
(2026-08-28)


### Features

* Add spec for single row database modifiers
([#99](#99))
([b39cce3](b39cce3))


### Bug Fixes

* **ci:** resolve compliance tooling and spec from the called workflow
SHA ([#107](#107))
([c187e60](c187e60))
* Specs ([#100](#100))
([de17547](de17547))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
spydon added a commit that referenced this pull request Aug 28, 2026
…#109)

## What

Rewords the transitional `sdk-ref` input descriptions in
`sdk-compliance-validate` and `sdk-compliance-check-setup` from
`Transitional: only ...` to `Transitional, only ...`.

## Why

The unquoted `Transitional: only ...` scalar introduced in #107 contains
a colon-space, which YAML parses as a nested mapping, making both action
manifests invalid:

```
##[error].../_sdk-spec/.github/actions/sdk-compliance-validate/action.yml:
(Line: 9, Col: 30): Mapping values are not allowed in this context.
```

This currently fails every consumer compliance run: v1.4.0 callers load
the actions from the pinned checkout, and pre-v1.4.0 callers load them
remotely at `@main`, so both paths hit the broken manifests. Example:
https://github.com/supabase/supabase-flutter/actions/runs/33163722404/job/98824054540

actionlint did not catch it because it lints workflow files only, not
composite action manifests; both files now pass a YAML parse check.

## Follow-up

Cut v1.4.1 so the pinned consumers can bump; `@main` consumers recover
on merge.
spydon added a commit to supabase/supabase-flutter that referenced this pull request Aug 28, 2026
Bumps the pinned supabase/sdk reusable workflows from v1.3.0 to v1.5.0
(`75cf587c486f80c2d2afe57ec909ee2520c098b9`).

v1.4.0 (supabase/sdk#107) resolves the compliance tooling, composite
actions, and capability spec from the single supabase/sdk commit this
pin points at (`job.workflow_sha`), instead of referencing the actions
remotely at `@main` while the workflow itself is SHA-pinned. This
removes the tooling/spec version skew that broke supabase-go CI after
the `packages/` restructure in supabase/sdk, and makes the SHA pin here
fully effective: the action code executed can no longer drift from the
pinned workflow.

v1.5.0 additionally includes supabase/sdk#109, which fixes an unquoted
colon that made the compliance composite action manifests invalid YAML,
so this is the first release where the workflow-SHA resolution from #107
actually runs.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
  * Updated SDK compliance checks to the latest workflow version.
* Applied the update across compliance synchronization and capability
validation workflows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

2 participants