main
ply4 git calls320 ms44 KiB1 cachedprotocol v2
107 lines4.9 KiBRaw
1name: ply main consumer check
3# ply's notify-ply-web.yml sends repository_dispatch `ply-main-updated` (client_payload.sha) on `workflow_run`, after
4# ply's ci run for a push to ply main succeeds, and only when ivarvong/ply has the PLY_WEB_DISPATCH_TOKEN secret. Until
5# that secret exists no dispatch arrives (ply's notify run logs "PLY_WEB_DISPATCH_TOKEN is not set") and only
6# workflow_dispatch runs this. It runs ply-web main's gates (npm test, lint, typecheck) against that ply commit without
7# committing the pin (scripts/ply-main-check.sh edits package.json and the lockfile in the runner only). If a gate or
8# the `npm install` of the sha fails, the run fails and opens, or comments on, one issue titled
9# "ply main <short sha> breaks ply-web"; a malformed sha only fails the run. It never deploys and needs no secrets.
11on:
12 repository_dispatch:
13 types: [ply-main-updated]
14 workflow_dispatch:
15 inputs:
16 sha:
17 description: ply commit to test (7-40 hex)
18 required: true
19 type: string
21permissions: {}
23# One group per ply sha: GitHub keeps one pending run per group and cancels the older pending one when another
24# queues, so a single fixed group would skip the middle sha of three quick dispatches. Per-sha groups only dedupe a
25# repeat of the same sha (ply's notify-ply-web.yml keys its group by sha for the same reason).
26concurrency:
27 group: ply-main-consumer-check-${{ github.event.client_payload.sha || inputs.sha }}
28 cancel-in-progress: false
30jobs:
31 check:
32 permissions:
33 contents: read
34 issues: write
35 runs-on: ubuntu-24.04
36 timeout-minutes: 45
37 env:
38 CF_SEND_TELEMETRY: "false"
39 steps:
40 - name: Validate the ply sha
41 id: sha
42 env:
43 DISPATCH_SHA: ${{ github.event.client_payload.sha }}
44 INPUT_SHA: ${{ inputs.sha }}
45 run: |
46 set -euo pipefail
47 sha="${DISPATCH_SHA:-${INPUT_SHA:-}}"
48 if ! printf '%s' "${sha}" | grep -Eq '^[0-9a-f]{7,40}$'; then
49 echo "::error::ply sha must be 7-40 lowercase hex, got '${sha}'"
50 exit 1
51 fi
52 echo "sha=${sha}" >> "$GITHUB_OUTPUT"
53 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
54 with:
55 ref: main
56 persist-credentials: false
57 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
58 with:
59 # cf needs Node ^22.23, ^24.22 or ^26.12. A bare major can resolve to an older cached release.
60 node-version: 24.22
61 cache: npm
62 # package-lock resolves ply as git+ssh. Actions has no SSH key; the repo is public.
63 - name: Fetch GitHub git dependencies over HTTPS
64 run: |
65 git config --global url."https://github.com/".insteadOf "ssh://git@github.com/"
66 git config --global url."https://github.com/".insteadOf "git+ssh://git@github.com/"
67 git config --global url."https://github.com/".insteadOf "git@github.com:"
68 # Annotated tags in the suite need a committer. The runner has none. Do not sign.
69 - name: Git identity for the test suite
70 run: |
71 git config --global user.name "ply-web"
72 git config --global user.email "ply-web@example.com"
73 git config --global commit.gpgsign false
74 - run: npm ci
75 - name: ply-web gates against the dispatched ply
76 id: check
77 env:
78 PLY_SHA: ${{ steps.sha.outputs.sha }}
79 # The script appends outcome=pass|fail to $GITHUB_OUTPUT itself (a gate or install failure is `fail`; a usage
80 # error writes nothing); test/ply-main-check.test.js pins that and this step's wiring.
81 run: sh scripts/ply-main-check.sh "${PLY_SHA}" "$RUNNER_TEMP/ply-main"
82 - name: Open or comment on the breakage issue
83 if: failure() && steps.check.outputs.outcome == 'fail'
84 env:
85 GH_TOKEN: ${{ github.token }}
86 GH_REPO: ${{ github.repository }}
87 RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
88 run: |
89 set -euo pipefail
90 # shellcheck disable=SC1091
91 . "$RUNNER_TEMP/ply-main/summary.env"
92 title="ply main ${PLY_SHORT} breaks ply-web"
93 printf '\n%s\n' "Run: ${RUN_URL}" >> "$RUNNER_TEMP/ply-main/report.md"
94 existing=$(gh issue list --state open --search "\"${title}\" in:title" --json number,title \
95 --jq "map(select(.title == \"${title}\")) | .[0].number // empty")
96 if [ -n "${existing}" ]; then
97 gh issue comment "${existing}" --body-file "$RUNNER_TEMP/ply-main/report.md"
98 else
99 gh issue create --title "${title}" --body-file "$RUNNER_TEMP/ply-main/report.md"
100 fi
101 - name: Keep the logs
102 if: always()
103 uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
104 with:
105 name: ply-main-check
106 path: ${{ runner.temp }}/ply-main
107 if-no-files-found: ignore
Diagnostics4 git calls · 320 ms
CallStatusSizeTime0320 ms
discover200152 B15 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200145 B4 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=4
git.response.bytes=145
git.response.cache=UPDATING
git.response.duration_ms=4
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=145
git.pkt.payload.max=76
git.ls_refs.count=2
git.ls_refs.head=refs/heads/main
fetchblob:none · deepen 1020042 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=302
git.response.bytes=42585
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=262b639aa1b258fc1777c3a66ba8f811df3a3da2
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=6
git.pkt.data=4
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=42585
git.pkt.payload.max=42490
git.sideband.band1.bytes=42489
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=61
git.pack.bytes=42489
git.pack.ofs_delta=0
git.pack.ref_delta=0
git.pack.chain.max=0
git.pack.trailer=7dbf576d97429022615f79aa46b440d9da603496
git.pack.full=61
Open pack map
fetch2002.2 KiB302 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=2226
git.response.cache=MISS
git.response.duration_ms=302
git.fetch.wants=8b80f619692e3c855b2a581955c8d7c84413e55d
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=2226
git.pkt.payload.max=2205
git.sideband.band1.bytes=2204
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/ply-web.git
Ref
refs/heads/main
Commit
262b639aa1b258fc1777c3a66ba8f811df3a3da2
cf-ray
a5e1c235cd976c75
Request
43c60d15…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format