SDK generation on release tag fails: can't open PR with base=tag
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by reading speakeasy-workflow-executor-v15.yml around lines 185–187 and compare its behavior with the release-tag workflow and PRs #788 and #784. Check how the Speakeasy action receives the source ref and chooses the PR base; the issue describes several possible approaches but leaves the design open. Done means SDK generation uses the exact tag tree and opens a PR against a configurable branch, including for backport releases.
索引モデルが issue の本文から書いたものです。
説明
Summary
The "SDK generate on release tag" workflow fails on every real release because Speakeasy tries to open a PR with base=<tag>, which GitHub rejects — tags are not valid PR bases. The current workaround in PR #788 (env.GITHUB_REF = refs/heads/main) is silently ignored by the GitHub Actions runner, because GITHUB_* default env vars cannot be overridden via env:.
Evidence
Error from generate-go / Generate Target:
Error: failed to create PR: POST https://api.github.com/repos/hookdeck/outpost/pulls:
422 Validation Failed [{Resource:PullRequest Field:base Code:invalid Message:}]
Proof the env override didn't apply — Speakeasy's generated branch name:
Creating branch speakeasy-sdk-regen-refs-tags-v0.16.0-1775848605
If GITHUB_REF had been overridden to refs/heads/main, the branch would be speakeasy-sdk-regen-refs-heads-main-…. It isn't.
Root cause
speakeasy-workflow-executor-v15.yml:185-187 sets:
env:
GITHUB_REF: ${{ inputs.pr_base_is_main == true && 'refs/heads/main' || github.ref }}
GITHUB_REF_NAME: ${{ inputs.pr_base_is_main == true && 'main' || github.ref_name }}
Per GitHub docs: "If you try to override the value of a default environment variable named CI or GITHUB_*, the value will be ignored." The runner re-sets GITHUB_REF for every step, so Speakeasy's Docker action still receives refs/tags/<tag> from the container env, passes that as the PR base, and GitHub rejects.
PR #788 merged 2026-03-25 but was never end-to-end tested against a real release tag push.
Why we can't "just dispatch from main"
The earlier approach (#784) dispatched the workflow with ref: main, which naturally gives Speakeasy a valid PR base. #788 reverted that because it broke tag fidelity — SDK was generated from main's tree, not the tag's.
More importantly, running from main precludes releasing non-latest versions:
- Patch / hotfix releases off an older minor line (e.g.
v0.15.3cut fromrelease/v0.15.x) need the SDK generated from that line, not frommain. - If
mainhas moved past the release being cut, SDK content would reflect unreleased changes. - A backport release would need to target a release branch, not
main, as the PR base.
So the fix needs to:
- Generate the SDK from the exact tag tree (whatever branch it was cut from).
- Allow the PR base to be a parameterizable branch (default
main, but e.g.release/v0.15.xfor backports).
Options to explore
- Script Speakeasy via CLI instead of the packaged action. Checkout tag →
speakeasy run→ checkout target branch → copy SDK dir → commit →gh pr create --base <target>. Full control over ref and PR base; loses some action niceties (changelog upload, code samples push, PR templating) — some can be reconstructed via CLI equivalents. - Invoke Speakeasy's Docker image directly via
docker run -e GITHUB_REF=…. Shell-exported env does reach child docker processes, bypassing GitHub'sGITHUB_*protection. Medium complexity; brittle across Speakeasy action upgrades since we'd be replicating the action's docker invocation. - Fork / upstream a
base_branchinput into Speakeasy'ssdk-generation-action. Clean long-term fix; highest upfront cost (fork maintenance or upstream lead time). - Create a transient release branch at the tag SHA (e.g.
release/<tag>), dispatch with that ref, and have Speakeasy PR into it — then a follow-up step opens a PR from the release branch into the configured target branch. Avoids modifying Speakeasy but adds branch/PR churn.
Target branch should be a workflow input (e.g. main or release/v0.15.x) so the flow supports backport releases.
References
- PR #788 — introduced the broken workaround (vendored executor +
pr_base_is_mainenv override) - PR #784 — previous approach (dispatched from
main); reverted by #788 because it didn't generate from the tag tree - GitHub Actions default env vars docs
- 主要言語
- Go
- スター
- 1.1k
- フォーク
- 70
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 56
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hookdeck/outpost のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
hookdeck/outpost#1117 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
hookdeck/outpost の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
documentation hacktoberfest priority: low skill: good first issue status: ready for dev
難易度 2/5 半日 初心者へのやさしさ 85/100
hyperledger-labs/fabric-smart-client#2142 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
numberly/vault-db-injector#107 ·
メンテナーはふだん 1 日以内に返信
-
area/import kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
[DOC] Wrong sg_egress_ports range in the Terraform Databricks Guide for AWS Hub & Spoke with Network Firewall対応中かも @akhil9tiet が今日担当しました。 オープンdocs
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
databricks/terraform-provider-databricks#6080 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信