Skip to content

Commit 925844e

Browse files
committed
Revert "Finalize SDK canary: remove temporary branch-validation bypasses"
This reverts commit b289233.
1 parent 20b7003 commit 925844e

1 file changed

Lines changed: 28 additions & 10 deletions

File tree

.github/workflows/sdk-canary.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: "SDK Canary (runtime compat gate)"
22

3-
# Canary compatibility gate: installs an explicit version of the @github/copilot
4-
# runtime, builds the Node SDK, and runs the Node e2e suite against it to prove
5-
# runtime <-> SDK compatibility. On a green gate it publishes an SDK canary
6-
# (pinned to the exact tested runtime) to the internal copilot-canary-test feed.
7-
# Triggered manually via workflow_dispatch.
3+
# Nightly-style canary compatibility gate: installs an explicit version of the
4+
# @github/copilot runtime, builds the Node SDK, and runs the Node e2e suite
5+
# against it. This proves runtime <-> SDK compatibility. No publishing happens
6+
# here.
87

98
env:
109
HUSKY: 0
@@ -29,6 +28,12 @@ on:
2928
required: false
3029
type: boolean
3130
default: false
31+
# TEMPORARY: branch-push trigger so we can validate the pipeline before the
32+
# workflow_dispatch entrypoint exists on main. Push events carry no dispatch
33+
# inputs, so the resolve job falls back to the currently pinned runtime from
34+
# public npm. Remove this trigger once the workflow lands on main.
35+
push: # TEMP: remove at finalize (coupled with the publish.if `event==push` clause)
36+
branches: [mackinnonbuck-sdk-canary-compat-gate]
3237

3338
permissions:
3439
contents: read
@@ -45,7 +50,7 @@ jobs:
4550
steps:
4651
- uses: actions/checkout@v6.0.2
4752

48-
# Normalize the dispatch inputs into a single (RUNTIME_VERSION,
53+
# Normalize whichever trigger fired into a single (RUNTIME_VERSION,
4954
# RUNTIME_SOURCE) pair that every downstream step references. Adding a
5055
# `repository_dispatch: types: [runtime-canary]` trigger later is purely
5156
# additive: add one more case that reads client_payload and defaults
@@ -63,6 +68,13 @@ jobs:
6368
VERSION="$INPUT_VERSION"
6469
SOURCE="$INPUT_SOURCE"
6570
;;
71+
push)
72+
# No dispatch inputs on push: fall back to the currently pinned
73+
# runtime from public npm so the run is self-consistent and a green
74+
# result proves the pipeline mechanics.
75+
SOURCE="public"
76+
VERSION="$(node -e "const v=require('./nodejs/package.json').dependencies['@github/copilot']; process.stdout.write(String(v).replace(/^[\^~]/, ''))")"
77+
;;
6678
*)
6779
echo "::error::Unsupported event '$EVENT_NAME'."
6880
exit 1
@@ -190,17 +202,23 @@ jobs:
190202
publish:
191203
name: "Publish SDK canary (internal feed)"
192204
needs: [resolve, test]
193-
# Normally publish only runs when the e2e gate is green. One bypass:
194-
# workflow_dispatch with force_publish=true — a human-acknowledged flake
195-
# override, audited via the ::warning:: step below and the run's actor.
205+
# Normally publish only runs when the e2e gate is green. Two bypasses:
206+
# - workflow_dispatch with force_publish=true: a human-acknowledged flake
207+
# override (audited via the actor on the run).
208+
# - github.event_name == 'push': TEMP: remove at finalize — branch-validation
209+
# bypass coupled with the temporary push trigger so we can exercise the
210+
# publish + bypass paths on this branch. Drop the `github.event_name ==
211+
# 'push'` clause from the `if:` below together with the push trigger; after
212+
# that, force is honored only on real dispatches.
196213
# The bypass only skips the e2e *signal* — the publish job still runs the
197214
# build (so a broken build can't publish) and enforces feed-only + read-back.
198215
if: >
199216
!cancelled() &&
200217
github.event.repository.fork == false &&
201218
needs.resolve.result == 'success' &&
202219
(needs.test.result == 'success' ||
203-
(github.event_name == 'workflow_dispatch' && inputs.force_publish))
220+
(github.event_name == 'workflow_dispatch' && inputs.force_publish) ||
221+
github.event_name == 'push')
204222
environment: cicd
205223
runs-on: ubuntu-latest
206224
permissions:

0 commit comments

Comments
 (0)