Skip to content

fix(ci): vendor Speakeasy executor + checkout fix for tag-based SDK generation#788

Merged
leggetter merged 3 commits intomainfrom
fix/sdk-generate-release-pr-target-main
Mar 25, 2026
Merged

fix(ci): vendor Speakeasy executor + checkout fix for tag-based SDK generation#788
leggetter merged 3 commits intomainfrom
fix/sdk-generate-release-pr-target-main

Conversation

@leggetter
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #784 (merged). The previous approach dispatched with ref: main, which meant SDK generation ran against main's tip rather than the tagged release commit.

This PR:

  • Dispatches with ref: <tag> so the workflow checks out the exact release commit.
  • Vendors speakeasy-workflow-executor-v15.yml (copy of Speakeasy's workflow-executor.yaml @ v15) with two marked patches:
    • pr_base_is_main input + job-level env override so Speakeasy's Go code sees GITHUB_REF=refs/heads/main for PR creation.
    • Explicit ref: ${{ github.ref }} on the checkout step so the env override doesn't redirect checkout away from the tag.
  • Guard job (ensure-release-ref-is-tag) fails fast if the workflow ref doesn't match the release_tag input.
  • Docs updated in contributing/release.md and contributing/sdks.md.

Files changed

File Change
sdk-generate-on-release-dispatch.yml Dispatch with ref: tag (was ref: main)
sdk-generate-on-release.yml release_tag required; guard job; pr_base_is_main: true
sdk-generate-one.yml New pr_base_is_main input; uses vendored executor
speakeasy-workflow-executor-v15.yml Vendored Speakeasy executor with 3 marked patches
contributing/release.md Updated for two-step dispatch + tag ref
contributing/sdks.md Updated to reference vendored executor

Note on existing tags

For releases already tagged (e.g. v0.15.0), the tag's commit doesn't contain these workflow files, so automatic dispatch won't work. Use the individual per-language workflows (Generate OUTPOST-GO, etc.) from main instead.

Test plan

  • Push a test tag (e.g. v0.0.0-sdk-gen-test) from main after merge
  • Verify dispatch workflow triggers and passes tag to sdk-generate-on-release.yml
  • Verify checkout is at the tag commit (not main)
  • Verify SDK regen PRs target main
  • Verify manual per-language workflows still work (no pr_base_is_main = unchanged behavior)

Made with Cursor

Tag pushes set GITHUB_REF to refs/tags/..., which makes sdk-generation-action
derive an invalid GitHub PR base. Add a tag-triggered dispatch workflow that
starts sdk-generate-on-release.yml via workflow_dispatch with ref main, and
pass the tag as release_tag for v1.0.0 SDK version overrides.

Update contributing/release.md and contributing/sdks.md for the two-step flow.

Made-with: Cursor
Copilot AI review requested due to automatic review settings March 24, 2026 16:40
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
outpost-docs Ready Ready Preview, Comment Mar 25, 2026 8:57pm
outpost-website Ready Ready Preview, Comment Mar 25, 2026 8:57pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the tag-based SDK generation pipeline so SDK regen runs against the tagged release commit (rather than main tip) while still creating SDK PRs targeting main.

Changes:

  • Dispatches sdk-generate-on-release.yml using ref: <tag> to ensure checkout matches the release commit.
  • Vendors Speakeasy’s v15 workflow executor and adds a pr_base_is_main switch to force PR base to main without changing checkout ref.
  • Updates release/SDK docs to reflect the two-step dispatch flow and tag-ref requirement.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/sdk-generate-on-release-dispatch.yml New tag-push dispatcher that triggers SDK generation at the tag ref.
.github/workflows/sdk-generate-on-release.yml Moves to workflow_dispatch only; adds guard job ensuring ref matches release_tag; passes pr_base_is_main: true.
.github/workflows/sdk-generate-one.yml Adds pr_base_is_main input and switches to using the vendored executor workflow.
.github/workflows/speakeasy-workflow-executor-v15.yml Adds vendored Speakeasy executor with patches for PR base override + checkout ref pinning.
contributing/release.md Documents updated release workflow behavior (dispatch + tag-ref execution).
contributing/sdks.md Documents tag-based SDK generation as a two-step dispatch using the vendored executor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

openapi_doc_auth_token: ${{ secrets.openapi_doc_auth_token }}
target: ${{ inputs.target }}
registry_tags: ${{ inputs.registry_tags }}
push_code_samples_only: ${{ inputs.push_code_samples }}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

push_code_samples_only is wired to ${{ inputs.push_code_samples }}, but the declared input is push_code_samples_only. This prevents callers from setting the flag (it will always be empty). Update the expression to use inputs.push_code_samples_only (or rename the input consistently if upstream expects a different name).

Suggested change
push_code_samples_only: ${{ inputs.push_code_samples }}
push_code_samples_only: ${{ inputs.push_code_samples_only }}

Copilot uses AI. Check for mistakes.
Comment on lines +268 to +272
speakeasy_api_key: ${{ secrets.speakeasy_api_key }}
pr_creation_pat: ${{ secrets.pr_creation_pat }}
output_tests: ${{ inputs.output_tests }}
speakeasy_server_url: ${{ inputs.speakeasy_server_url }}
working_directory: ${{ inputs.working_directory }}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_tests is passed to the Speakeasy action via ${{ inputs.output_tests }}, but this reusable workflow does not declare an output_tests input. This makes the parameter always null/empty and is confusing/fragile. Either add output_tests to on.workflow_call.inputs (with the intended type/default) or remove this with: entry if it’s not supported/needed here.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# Vendored from speakeasy-api/sdk-generation-action (.github/workflows/workflow-executor.yaml, tag v15).
# Outpost patch: workflow_call input `pr_base_is_main` and job `env` on `run-workflow` so Speakeasy’s
# Go code sees GITHUB_REF=refs/heads/main for PR base while actions/checkout still uses the workflow ref (tag).
# When upgrading Speakeasy, re-copy this file from upstream and re-apply the two marked patches.
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File header says there are "two marked patches", but this vendored workflow currently contains three Outpost patches (workflow_call input, job env override, and explicit checkout ref). Update the header to match so future re-vendoring doesn’t miss a required patch.

Suggested change
# When upgrading Speakeasy, re-copy this file from upstream and re-apply the two marked patches.
# When upgrading Speakeasy, re-copy this file from upstream and re-apply the three marked patches.

Copilot uses AI. Check for mistakes.
type: string
signed_commits:
required: false
description: "This will set commits to be signed and and verified"
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the signed_commits input description: "signed and and verified" has a duplicated "and".

Suggested change
description: "This will set commits to be signed and and verified"
description: "This will set commits to be signed and verified"

Copilot uses AI. Check for mistakes.
@leggetter leggetter merged commit 6a74f9f into main Mar 25, 2026
4 checks passed
@leggetter leggetter deleted the fix/sdk-generate-release-pr-target-main branch March 25, 2026 21:26
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