Repository navigation
Enforce absolute deadlines for auction response collection #1433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d4f7018
62ad0d9
23b5b4c
8b367bc
a0b592c
3453298
879693b
9077952
1f53384
270236c
5728378
018b8de
1432675
157b8b2
e1a34e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| name: Worker auction deadline runtime regressions | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| worker-deadlines: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| adapter: [cloudflare, spin] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Read tool versions | ||
| id: versions | ||
| shell: bash | ||
| run: | | ||
| { | ||
| echo "node=$(awk '$1 == "nodejs" { print $2 }' .tool-versions)" | ||
| echo "spin=$(awk '$1 == "spin" { print $2 }' .tool-versions)" | ||
| echo "bindgen=$(sed -n '/^name = "wasm-bindgen"$/ { n; s/version = "\(.*\)"/\1/p; }' Cargo.lock)" | ||
| } >> "$GITHUB_OUTPUT" | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ steps.versions.outputs.node }} | ||
| - name: Set up Rust | ||
| uses: ./.github/actions/setup-rust | ||
| with: | ||
| target: ${{ matrix.adapter == 'cloudflare' && 'wasm32-unknown-unknown' || 'wasm32-wasip1' }} | ||
| components: clippy | ||
| cache-key: worker-deadline-${{ matrix.adapter }} | ||
| - name: Install JS dependencies | ||
| working-directory: crates/trusted-server-js/lib | ||
| run: npm ci | ||
| - name: Build actual adapter HTTP fixture | ||
| shell: bash | ||
| run: | | ||
| if [ "${{ matrix.adapter }}" = cloudflare ]; then | ||
| cargo build --locked -p trusted-server-adapter-cloudflare --example deadline-runtime --target wasm32-unknown-unknown --features cloudflare | ||
| else | ||
| cargo build --locked -p trusted-server-adapter-spin --example deadline-runtime --target wasm32-wasip1 --features spin | ||
| fi | ||
| - name: Lint runtime fixture | ||
| shell: bash | ||
| run: | | ||
| if [ "${{ matrix.adapter }}" = cloudflare ]; then | ||
| cargo clippy --locked -p trusted-server-adapter-cloudflare --example deadline-runtime --target wasm32-unknown-unknown --features cloudflare -- -D warnings | ||
| else | ||
| cargo clippy --locked -p trusted-server-adapter-spin --example deadline-runtime --target wasm32-wasip1 --features spin -- -D warnings | ||
| fi | ||
| - name: Install local Cloudflare tools | ||
| if: matrix.adapter == 'cloudflare' | ||
| shell: bash | ||
| run: | | ||
| npm install --global wrangler@4.83.0 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 thinking — wasm-bindgen and Spin are checked against published digests a few lines down, but this line pins only wrangler's own version. wrangler's dependencies are resolved fresh on every run with no lockfile, so a third-party release can change what this job runs, and whether it passes, regardless of the PR. Permissions are read-only and the job has no secrets, so the risk is mostly reproducibility. A small committed
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed on the reproducibility gap. I tried a committed I've left this one out of this PR. I'd rather handle it as one follow-up: a shared lockfile for both jobs on a current wrangler (4.156.0 audits clean), plus a Dependabot entry. Leaving this thread open in case you'd rather it land here. |
||
| mkdir -p "$RUNNER_TEMP/bindgen" | ||
| # Digests are published with the upstream GitHub release assets. | ||
| # Update the digest alongside the pinned version. | ||
| test "${{ steps.versions.outputs.bindgen }}" = 0.2.126 | ||
| archive="$RUNNER_TEMP/wasm-bindgen.tar.gz" | ||
| curl --fail --location --silent --show-error "https://github.com/wasm-bindgen/wasm-bindgen/releases/download/${{ steps.versions.outputs.bindgen }}/wasm-bindgen-${{ steps.versions.outputs.bindgen }}-x86_64-unknown-linux-musl.tar.gz" --output "$archive" | ||
| echo "064948d58e2d6c0a745216477a639ba696216d6309aaa902939d1b865b1d869d $archive" | sha256sum --check | ||
| tar -xz --strip-components=1 -C "$RUNNER_TEMP/bindgen" -f "$archive" | ||
| echo "$RUNNER_TEMP/bindgen" >> "$GITHUB_PATH" | ||
| - name: Install pinned Spin runtime | ||
| if: matrix.adapter == 'spin' | ||
| shell: bash | ||
| run: | | ||
| mkdir -p "$RUNNER_TEMP/spin" | ||
| # Update the published upstream digest alongside the pinned version. | ||
| test "${{ steps.versions.outputs.spin }}" = 4.1.0 | ||
| archive="$RUNNER_TEMP/spin.tar.gz" | ||
| curl --fail --location --silent --show-error "https://github.com/spinframework/spin/releases/download/v${{ steps.versions.outputs.spin }}/spin-v${{ steps.versions.outputs.spin }}-linux-amd64.tar.gz" --output "$archive" | ||
| echo "aeeb892f94cf861f5302546faa0bdaa82cc4be30539621299746a6dc011f3b5a $archive" | sha256sum --check | ||
| tar -xz -C "$RUNNER_TEMP/spin" -f "$archive" | ||
| echo "$RUNNER_TEMP/spin" >> "$GITHUB_PATH" | ||
| - name: Exercise delayed headers, trickling bodies, and slow publisher work | ||
| shell: bash | ||
| env: | ||
| WRANGLER_SEND_METRICS: 'false' | ||
| run: | | ||
| if [ "${{ matrix.adapter }}" = cloudflare ]; then | ||
| node scripts/test-worker-auction-deadlines.mjs cloudflare --runtime "$(command -v wrangler)" | ||
| else | ||
| node scripts/test-worker-auction-deadlines.mjs spin --runtime "$(command -v spin)" | ||
| fi | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.