Skip to content

Commit 38ef310

Browse files
authored
ci: switch to ubuntu-latest-large, likely root cause of stuck runs (#1305)
* ci: switch to ubuntu-latest-large, likely root cause of stuck runs Every run dispatched from this branch (release dry-run, e2e-tests, ci.yml) sat at runner_id: 0 - queued, never picked up - despite the code itself being fine. Found the likely actual cause: this repo's workflows still use plain ubuntu-latest, while segmentio/analytics-next (which works fine) uses ubuntu-latest-large everywhere. There's also an already-open, unrelated PR in this repo (#1296) whose entire diff is exactly this same ubuntu-latest -> ubuntu-latest-large migration, confirming the org has moved off plain ubuntu-latest. Switches the three files this PR touches. Will verify with a real dispatch before re-enabling e2e-tests.yml's push/pull_request triggers (left as workflow_dispatch-only in the previous commit, pending this fix's confirmation). * fix: bump curation-blocked dependencies (flatted, ip, lodash-es) Artifactory's curation policy was returning 403 on these tarball fetches through virtual-npm-thirdparty: - flatted@3.2.9 -> bumped to ^3.4.2 (fixes two HIGH severity advisories: prototype pollution via parse(), unbounded recursion DoS) - lodash-es@4.17.21 -> bumped to ^4.18.0 (fixes HIGH severity code injection via _.template) - ip@2.0.0 -> bumped to ^2.0.1 (fixes the two LOW severity advisories that do have patches) ip's HIGH severity SSRF advisory (isPublic() misclassification) has no fix at all - GitHub's advisory data shows firstPatchedVersion: null, vulnerable range "<= 2.0.1" (every published version, including the one this bumps to). ip is purely a transitive dependency of build tooling (node-gyp, semantic-release, npm-registry-fetch, per node_modules) - never shipped in the published SDK packages. If Artifactory's curation still blocks 2.0.1 for that unfixed advisory, the remediation path is a curation waiver request for this specific package/advisory, not a further version bump - no code change can fix a vulnerability with no patched version. yarn.lock regenerated via devbox (yarn-berry, already declared in devbox.json) rather than the system yarn - this machine's global Homebrew yarn (3.4.1) conflicts with Corepack's need to own the same binary path for the packageManager-pinned yarn@4.1.0, and devbox's isolated Nix environment sidesteps that entirely. * fix: bump remaining curation-blocked dependencies (batch of 16) The first real Artifactory-routed install surfaced far more blocked packages than the 3 originally reported - 22 distinct package@version pairs across 16 package names, all transitive (semantic-release/npm's own dependency chain: npm-the-package, pacote, tar, glob, sigstore, protobufjs, @grpc/grpc-js, etc.). Two categories: - Clear CVE fixes (babel-plugin-transform-modules-systemjs, grpc-js, diff, fast-xml-parser, glob, image-size, protobufjs, shell-quote, sigstore 4.x, ws, undici): bumped to each advisory's firstPatchedVersion per GitHub's Security Advisory API. - No covering CVE at the blocked version (browserslist, minimatch, npm, pacote, sigstore 2.x): these already exceeded their only known advisory's fix version, so the block is likely Artifactory's "immature version" cooldown policy rather than a real CVE - bumped forward with a modest floor and let yarn resolve to whatever's actually latest/mature. tar@^6.1.11/^6.1.2/^6.2.0 (resolving 6.2.1) has no available fix at all - `tar@^6.2.2` returned "No candidates found", confirming 6.2.1 is the last-ever 6.x release (same unfixed situation as ip's HIGH severity SSRF advisory from the previous commit). Left unresolved rather than forcing a major-version jump to 7.x, which risks breaking whatever declared the narrower ^6.x range deliberately - if curation still blocks this, the path is a waiver request, not a further version bump. yarn.lock regenerated via devbox (same as the previous commit). Verified: devbox run check passes clean (lint, format, build, typecheck, all 70 test suites/492 tests). * fix: eliminate tar@6.2.1 via node-gyp bump, tighten yarn network timeouts Two real problems from the last CI run: 1. tar@6.2.1 (via node-gyp) and browserslist were still 403'd despite the previous batch fix. tar 6.x genuinely has no fix (confirmed last commit - ^6.2.2 returns "No candidates found", 6.2.1 is the last-ever 6.x release) - but node-gyp 13.0.1 depends on tar@^7.5.4 instead of 6.x (checked node-gyp's current package.json on GitHub). Overriding node-gyp itself sidesteps the unfixable tar line entirely rather than forcing a breaking major bump on tar directly. Needed two resolutions keys - node-gyp@^12.4.0 (what npm's package.json declared) and node-gyp@latest (a separate dist-tag declaration elsewhere in the tree, resolving independently to the same stale 10.0.1) - fixing only one left the other still pulling tar@6.2.1. browserslist was also still blocked at 4.28.6 despite already exceeding its only known CVE fix (4.16.5) by a wide margin - not a CVE match, more likely Artifactory's curation flagging brand-new releases pending an async scan. Bumped the floor to ^4.24.0 instead of chasing "latest" again. 2. Both failed jobs took ~9.5 minutes each to fail (not fast), per the last run's logs - yarn's default httpTimeout (60s) x httpRetry (3) let a single hung/blocked request eat most of the job's time before finally erroring. Added explicit httpTimeout: 30000 / httpRetry: 2 to .yarnrc.yml so a curation block or genuine network hang fails in under a minute instead of burning ~10 minutes per CI attempt. Verified: devbox run check passes clean (lint, format, build, typecheck, all 70 test suites/492 tests). tar@6.2.1 confirmed gone from yarn.lock entirely - only the already-fixed 7.5.20 line remains. * revert: remove ineffective httpTimeout/httpRetry fail-fast attempt Confirmed via the actual CI log this didn't help: the ~7-9 minute hang is an ETIMEDOUT at the TCP connect layer (node:net internalConnectMultiple), which happens before any HTTP request is sent - httpTimeout/httpRetry only bound the HTTP request/response cycle after a connection is already established, so they were never going to touch this specific failure mode. * ci: add a curation audit step for clearer diagnostics than a raw 403 Every curation block so far has just shown a raw 403 with no policy reason, forcing manual guesswork (checked GitHub's advisory API, compared publish dates, etc.) to figure out why. IPD's curation.md documents jf ca (curation audit) as the actual authoritative way to see which policy blocked a package (48h age cooldown, critical CVE, malicious package) - this wires that in as an automatic, targeted diagnostic instead of leaving it to manual investigation next time. New .github/actions/curation-audit: - Parses the captured yarn install log for the specific packages that actually got a curation 403 (not a full-tree scan - jf ca doesn't support Yarn natively per IPD's own docs, and scanning the whole lockfile would be slow and could trigger unrelated checks) - Builds a throwaway npm-only project containing just those package@version pairs, authenticated with the same OIDC-exchanged token the Artifactory OIDC Auth step already obtained this job - jf ca --run-native reads registry config from .npmrc, sidestepping the missing Yarn support entirely - Runs jf ca and prints the actual policy violation per package Wired into every job in both ci.yml and release.yml as an if: failure() step right after "Install dependencies" - it only runs when the install actually fails, and only audits what failed. Split the release.yml jobs' combined "yarn install && yarn build && yarn release" run: blocks into a separate Install dependencies step so there's a clean point to attach the audit and capture its log, matching the pattern already used in the ci job. * fix: add set -o pipefail so a failed yarn install is actually detected The last run proved this bug live: yarn install failed with real curation 403s (browserslist, npm, pacote, sigstore, ws) after 9m31s, but the step still reported success because GHA's default `bash -e` does NOT set pipefail - `| tee` made the step's exit code tee's (0), not yarn's. That silently skipped the new Curation Audit step (it's gated on if: failure()) and left eslint/commitlint to fail downstream with a confusing "missing node_modules" error instead of the real cause. * refactor: run the curation audit pre-flight instead of after install fails Auditing only after yarn install already failed meant every curation block still cost the full ~9 minute install hang before we saw a reason. Read every resolved package straight out of yarn.lock (a committed file, not a log we scraped) and run jf ca against all of them before yarn install even starts, so a blocked package fails in seconds with a policy reason instead of minutes with a raw 403. This also removes the action's `install-log` input entirely, which was flagged by Semgrep as a shell-injection vector (untrusted input interpolated directly into a run: script). There's no longer an untrusted input to interpolate - the audit reads yarn.lock from the checkout, so the finding no longer applies. * fix: pass --legacy-peer-deps to the curation audit's npm resolution The pre-flight audit builds a synthetic project pinning every package yarn.lock resolved as a flat top-level dependency. npm's own resolver enforces peer-dependency compatibility on that flat list and hit a real ERESOLVE conflict (@react-native-firebase/app@22.2.0 vs a peer requirement for 17.5.0 from @react-native-firebase/messaging) before ever reaching the curation check - yarn tolerates this shape of mismatch in its own resolver, npm does not. jf ca ships --legacy-peer-deps specifically to bypass this for audits like ours, where we only care whether a given version is curation-blocked, not whether the flattened tree is peer-valid. * fix: audit each resolved package in isolation instead of one combined tree jf ca --run-native resolves the synthetic project as a single atomic npm operation. Confirmed live: with every yarn.lock package flattened into one project, npm's own resolution needs to actually fetch each tarball, and the first hard-blocked one (npm@10.9.8, denied by an Xray "download blocking policy" on remote-npm-thirdparty-filtered- cache) aborted the whole run before a single result could be reported - so a combined audit can only ever surface one blocked package per run, never the full picture. Give every resolved package its own throwaway project and .npmrc and run jf ca against it independently, 16 at a time via xargs. One package's hard block can no longer hide any of the others - every curation-blocked package gets its own reported reason. Verified the extraction, scoped-package name/version splitting, and the pass/fail aggregation locally against a stub jf before relying on real CI time to confirm it end-to-end. * revert: audit reactively against yarn's own confirmed-blocked packages Pre-flight auditing the whole resolved tree doesn't work with jf ca: confirmed live that a single hard-curation-blocked package aborts the entire native npm resolution atomically, so a full-tree audit can only ever surface one blocked package per run. Auditing every resolved package individually to work around that hits a different problem: packages with their own peer dependencies (most babel/eslint plugins) fail npm ls with ELSPROBLEMS in an isolated single-package project - confirmed 556 of 557 "blocked" results just now were this false positive, not real curation blocks. The packages actually blocked in practice (browserslist, npm, pacote, sigstore, ws) are plain utility packages with no peer deps of their own, so isolating just them doesn't hit that problem - the fix is to go back to running the audit after yarn install fails, scoped to exactly the packages yarn's own resolver (which handles multi-version/ peer forking correctly) already confirmed as 403'd, rather than trying to preflight the whole tree. check_one.sh also no longer trusts jf's exit code alone - it only reports BLOCKED when the output actually contains a real curation signal ("download blocking policy" or a nonzero blocked-package count), and downgrades any other failure to a non-fatal "inconclusive" note, so unrelated resolution noise on some future package can't be mistaken for a real block. Restores the install-log input this reactive design needs, this time threaded through via env: (as Semgrep's own suggested fix indicated) instead of interpolated directly into the run: script, so the shell-injection finding from before doesn't reappear. * fix: dedupe the curation extraction against yarn's repeated failure lines Confirmed against a real failed run: yarn prints each 403 twice - once in the resolution tree (prefixed with │/└) and again in the final summary (no prefix). The extraction's prefix-strip only handled the first form, so the second leaked "➤ YN0035: " into the parsed name and produced a bogus extra "package" per real block (7 real blocks showed up as 14 extracted lines). Made the │/└ prefix optional so both forms normalize to the same name@version and collapse via the existing sort -u. * fix: resolve the actual curation-blocked transitive dependencies The new curation audit step (see previous commits) finally gave real, authoritative reasons instead of raw 403s: - browserslist, sigstore, and pacote were never blocked themselves - they're blocked via transitive deps (baseline-browser-mapping, electron-to-chromium, tar) that publish new versions almost daily. Our existing resolutions used floating caret ranges as overrides, which still re-resolve to whatever's newest on every lockfile regen - for packages that publish faster than the 48h curation cooldown, "newest" is *always* less than 48h old, so every rebump just walked the pin forward into the next immature version. Pinned tar/baseline-browser-mapping/electron-to-chromium to exact (no caret) versions confirmed several days old, so they stop drifting forward on future installs. - npm@10.9.8 hit a separate, harder Xray "download blocking policy" (not the age cooldown) with no clear fixed version. Traced it to semantic-release-yarn depending on the old @semantic-release/npm@11 (which wants npm@^10.0.0) even though our own devDependencies already use @semantic-release/npm@13.1.5. Overriding that stale transitive consumer to 13.1.5 removes the npm@10.x subtree entirely instead of chasing a version pin - and turned out to also carry its own bundled (and separately blocked) copies of sigstore and pacote, so this one override cleared three of the seven blocked packages at once. devbox run check: 70 suites / 492 tests still pass. * fix: pin ws to exact known-good versions instead of floating carets ws@6.2.6 and ws@7.5.13 were still 403ing in real installs even though the curation audit reports them clean (not a policy violation) - both were published only 5 days ago, so this looks like a stale cached block decision from when they really were brand-new rather than a live re-check. Same underlying mistake as the earlier tar/npm/ pacote fixes: our resolutions values were floating caret ranges ("^6.2.4", "^7.5.11"), so every lockfile regen kept re-picking whatever patch was newest at that moment. Pinned to exact versions we have direct evidence already resolve without issue: 7.5.10 (2+ years old, was already resolving cleanly for the ws@^7.0.0 consumer with no override at all) for every 7.x consumer, and 6.2.4 (2 months old) for the 6.x line. Also added an explicit ws@^7.0.0 entry that had no override before and was quietly relying on luck. devbox run check: 70 suites / 492 tests still pass. * fix: pin ws 7.x line to the CVE-patched 7.5.11, not 7.5.10 7.5.10 (used in the previous commit as a known-not-currently-blocked version) is actually vulnerable to a HIGH severity DoS advisory fixed in 7.5.11 (GHSA memory exhaustion from tiny fragments/data chunks, published 2026-06-15). Correctness here matters independently of whatever is blocking ws in CI - don't deliberately pin a vulnerable version just because it happens to currently pass Artifactory. devbox run check: 70 suites / 492 tests still pass. * fix: install treefmt + shfmt in CI so format:check can actually run yarn format:check shells out to treefmt directly, which is normally provided by devbox locally - CI's plain corepack+yarn setup never had it, so this step has been silently unreachable in every run so far (curation blocks always failed the install step first). Now that the dependency fixes let install succeed, this surfaced as "command not found: treefmt". Installs the treefmt and shfmt binaries directly from their GitHub releases (plain, non-curated downloads - not npm/pip packages) rather than pulling in devbox/nix for this alone. shfmt covers the repo's two tracked .sh files; nixfmt is left out since zero .nix files are tracked, so treefmt never needs to invoke it (confirmed locally via devbox run -- treefmt --clear-cache --fail-on-change, 0 changes). * fix: drop the dead nix formatter from treefmt.toml treefmt validates every configured formatter's binary exists on PATH at startup regardless of whether it has matching files - so nixfmt not being installed in CI broke the whole format:check step even though zero .nix files are tracked in this repo (confirmed via git ls-files). Installing nixfmt just to satisfy a formatter with nothing to format isn't worth it; removing the dead config entry is simpler and correct. * fix: exclude .yarnrc.yml from prettier formatting checks The Artifactory OIDC Auth step appends an npmRegistries auth block to .yarnrc.yml at CI runtime, before Lint (formatting) runs. That injected content isn't prettier-formatted, so format:check flagged it as an "unexpected change" even though nothing in the actual committed source is wrong - it's a machine-mutated runtime artifact, not something anyone should be hand-formatting anyway.
1 parent bf3c6a7 commit 38ef310

7 files changed

Lines changed: 794 additions & 1542 deletions

File tree

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: 'Curation Audit'
2+
description: 'On install failure, run a JFrog curation audit against just the packages yarn actually 403d, for a clear policy reason instead of a raw 403'
3+
4+
inputs:
5+
install-log:
6+
description: 'Path to the captured yarn install output'
7+
required: true
8+
9+
runs:
10+
using: 'composite'
11+
steps:
12+
- name: Extract 403d packages from the install log
13+
shell: bash
14+
id: extract
15+
env:
16+
INSTALL_LOG: ${{ inputs.install-log }}
17+
run: |
18+
set -euo pipefail
19+
WORKDIR=$(mktemp -d)
20+
echo "AUDIT_WORKDIR=$WORKDIR" >> "$GITHUB_ENV"
21+
22+
# yarn logs each curation 403 as three lines, and prints the same
23+
# failure twice: once in the resolution tree (with a │/└ prefix) and
24+
# once more in the final summary (no prefix) - the prefix is
25+
# optional here so both forms normalize to the same name@version
26+
# and collapse into one entry via sort -u below.
27+
# ➤ YN0035: │ <name>@npm:<version>: The remote server failed to provide...
28+
# ➤ YN0035: │ Response Code: 403 (Forbidden)
29+
sed -E 's/\x1b\[[0-9;]*m//g' "$INSTALL_LOG" \
30+
| grep "npm:.*: The remote server failed" \
31+
| sed -E 's/.*YN0035: ([│└] )?//' \
32+
| sed -E 's/(@npm:[^:]+): The remote.*/\1/' \
33+
| sed -E 's/@npm:/@/' \
34+
| sort -u > "$WORKDIR/packages.txt" || true
35+
36+
count=$(wc -l < "$WORKDIR/packages.txt" | tr -d ' ')
37+
echo "count=$count" >> "$GITHUB_OUTPUT"
38+
echo "Found $count curation-blocked package(s):"
39+
cat "$WORKDIR/packages.txt"
40+
41+
host=$(echo "${ARTIFACTORY_URL}" | sed -E 's#https?://##')
42+
cat > "$WORKDIR/base.npmrc" <<EOF
43+
registry=${ARTIFACTORY_URL}/artifactory/api/npm/virtual-npm-thirdparty/
44+
//${host}/artifactory/api/npm/virtual-npm-thirdparty/:_authToken=${YARN_NPM_AUTH_TOKEN}
45+
EOF
46+
47+
cat > "$WORKDIR/check_one.sh" <<'SCRIPT'
48+
#!/usr/bin/env bash
49+
set -uo pipefail
50+
51+
pkg="$1"
52+
name="${pkg%@*}"
53+
version="${pkg##*@}"
54+
55+
tmpdir=$(mktemp -d)
56+
cp "${AUDIT_WORKDIR}/base.npmrc" "$tmpdir/.npmrc"
57+
python3 -c '
58+
import json, sys
59+
name, version, out = sys.argv[1], sys.argv[2], sys.argv[3]
60+
json.dump({"name": "curation-audit-synthetic", "version": "1.0.0", "private": True, "dependencies": {name: version}}, open(out, "w"))
61+
' "$name" "$version" "$tmpdir/package.json"
62+
63+
out=$(cd "$tmpdir" && jf ca --run-native --legacy-peer-deps --format=table 2>&1)
64+
exit_status=$?
65+
rm -rf "$tmpdir"
66+
67+
# jf's own exit code doesn't distinguish a real curation block from noise
68+
# (e.g. npm ls ELSPROBLEMS when a package's own peer deps aren't declared
69+
# in this single-package synthetic project) - only treat it as a real
70+
# block when the output actually says so.
71+
if echo "$out" | grep -qE "download blocking policy|Found [1-9][0-9]* blocked packages?"; then
72+
echo "::group::BLOCKED: $pkg"
73+
echo "$out"
74+
echo "::endgroup::"
75+
exit 1
76+
elif [ $exit_status -ne 0 ]; then
77+
echo "::group::Audit inconclusive for $pkg (non-curation resolution error, ignoring)"
78+
echo "$out"
79+
echo "::endgroup::"
80+
fi
81+
exit 0
82+
SCRIPT
83+
chmod +x "$WORKDIR/check_one.sh"
84+
85+
- name: Install jf CLI
86+
if: steps.extract.outputs.count != '0'
87+
shell: bash
88+
run: |
89+
curl -fkL https://getcli.jfrog.io/v2-jf | sh
90+
sudo mv jf /usr/local/bin/jf
91+
92+
- name: Configure jf against the SDK build lane
93+
if: steps.extract.outputs.count != '0'
94+
shell: bash
95+
run: |
96+
jf c add curation-audit-server \
97+
--url="${ARTIFACTORY_URL}" \
98+
--access-token="${YARN_NPM_AUTH_TOKEN}" \
99+
--interactive=false \
100+
--overwrite
101+
jf c use curation-audit-server
102+
103+
- name: Curation audit each blocked package
104+
if: steps.extract.outputs.count != '0'
105+
shell: bash
106+
run: |
107+
set -uo pipefail
108+
xargs -P 8 -n 1 "${AUDIT_WORKDIR}/check_one.sh" < "${AUDIT_WORKDIR}/packages.txt"
109+
exit_status=$?
110+
if [ $exit_status -ne 0 ]; then
111+
echo "::error::Curation blocked one or more packages - see the BLOCKED groups above for the policy reason on each."
112+
exit 1
113+
fi

.github/workflows/ci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
jobs:
1717
ci:
1818
name: Lint + Build + Test
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-latest-large
2020
permissions:
2121
contents: read
2222
id-token: write
@@ -29,9 +29,21 @@ jobs:
2929
node-version: 22
3030
- run: corepack enable
3131
- name: Install dependencies
32-
run: yarn install --immutable
32+
run: |
33+
set -o pipefail
34+
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
35+
- name: Curation Audit (on install failure)
36+
if: failure()
37+
uses: ./.github/actions/curation-audit
38+
with:
39+
install-log: /tmp/yarn-install.log
3340
- name: Lint (eslint)
3441
run: yarn lint
42+
- name: Install treefmt + shfmt
43+
run: |
44+
curl -fsSL https://github.com/numtide/treefmt/releases/download/v2.5.0/treefmt_2.5.0_linux_amd64.tar.gz | sudo tar -xz -C /usr/local/bin treefmt
45+
sudo curl -fsSL -o /usr/local/bin/shfmt https://github.com/mvdan/sh/releases/download/v3.13.1/shfmt_v3.13.1_linux_amd64
46+
sudo chmod +x /usr/local/bin/shfmt
3547
- name: Lint (formatting)
3648
run: yarn format:check
3749
- name: Build
@@ -44,7 +56,7 @@ jobs:
4456
commitlint:
4557
name: Commitlint
4658
if: github.event_name == 'pull_request'
47-
runs-on: ubuntu-latest
59+
runs-on: ubuntu-latest-large
4860
permissions:
4961
contents: read
5062
id-token: write
@@ -57,7 +69,14 @@ jobs:
5769
node-version: 22
5870
- run: corepack enable
5971
- name: Install dependencies
60-
run: yarn install --immutable
72+
run: |
73+
set -o pipefail
74+
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
75+
- name: Curation Audit (on install failure)
76+
if: failure()
77+
uses: ./.github/actions/curation-audit
78+
with:
79+
install-log: /tmp/yarn-install.log
6180
- name: Validate PR title
6281
run: echo "$PR_TITLE" | yarn commitlint
6382
env:

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
e2e-tests:
2424
# Skip on fork PRs and Dependabot PRs where repo secrets aren't available
2525
if: ${{ github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') }}
26-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-latest-large
2727

2828
steps:
2929
- name: Checkout SDK

.github/workflows/release.yml

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
jobs:
2323
ci:
2424
name: Lint + Build + Test
25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-latest-large
2626
permissions:
2727
contents: read
2828
id-token: write
@@ -35,9 +35,21 @@ jobs:
3535
node-version: 22
3636
- run: corepack enable
3737
- name: Install dependencies
38-
run: yarn install --immutable
38+
run: |
39+
set -o pipefail
40+
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
41+
- name: Curation Audit (on install failure)
42+
if: failure()
43+
uses: ./.github/actions/curation-audit
44+
with:
45+
install-log: /tmp/yarn-install.log
3946
- name: Lint (eslint)
4047
run: yarn lint
48+
- name: Install treefmt + shfmt
49+
run: |
50+
curl -fsSL https://github.com/numtide/treefmt/releases/download/v2.5.0/treefmt_2.5.0_linux_amd64.tar.gz | sudo tar -xz -C /usr/local/bin treefmt
51+
sudo curl -fsSL -o /usr/local/bin/shfmt https://github.com/mvdan/sh/releases/download/v3.13.1/shfmt_v3.13.1_linux_amd64
52+
sudo chmod +x /usr/local/bin/shfmt
4153
- name: Lint (formatting)
4254
run: yarn format:check
4355
- name: Build
@@ -51,7 +63,7 @@ jobs:
5163
name: Release (dry-run)
5264
if: inputs.type == 'dry-run'
5365
needs: [ci]
54-
runs-on: ubuntu-latest
66+
runs-on: ubuntu-latest-large
5567
permissions:
5668
contents: write
5769
issues: write
@@ -71,9 +83,18 @@ jobs:
7183
node-version: 22
7284
- run: corepack enable
7385

86+
- name: Install dependencies
87+
run: |
88+
set -o pipefail
89+
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
90+
- name: Curation Audit (on install failure)
91+
if: failure()
92+
uses: ./.github/actions/curation-audit
93+
with:
94+
install-log: /tmp/yarn-install.log
95+
7496
- name: Release (dry-run)
7597
run: |
76-
yarn install --immutable
7798
yarn build
7899
yarn multi-semantic-release --dry-run
79100
env:
@@ -83,7 +104,7 @@ jobs:
83104
name: Release (beta)
84105
if: inputs.type == 'beta'
85106
needs: [ci]
86-
runs-on: ubuntu-latest
107+
runs-on: ubuntu-latest-large
87108
environment: Publish-Beta
88109
permissions:
89110
contents: write
@@ -104,9 +125,18 @@ jobs:
104125
node-version: 22
105126
- run: corepack enable
106127

128+
- name: Install dependencies
129+
run: |
130+
set -o pipefail
131+
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
132+
- name: Curation Audit (on install failure)
133+
if: failure()
134+
uses: ./.github/actions/curation-audit
135+
with:
136+
install-log: /tmp/yarn-install.log
137+
107138
- name: Release (beta)
108139
run: |
109-
yarn install --immutable
110140
yarn build
111141
yarn release
112142
env:
@@ -118,7 +148,7 @@ jobs:
118148
name: Release (production)
119149
if: inputs.type == 'production'
120150
needs: [ci]
121-
runs-on: ubuntu-latest
151+
runs-on: ubuntu-latest-large
122152
environment: Publish
123153
permissions:
124154
contents: write
@@ -139,9 +169,18 @@ jobs:
139169
node-version: 22
140170
- run: corepack enable
141171

172+
- name: Install dependencies
173+
run: |
174+
set -o pipefail
175+
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
176+
- name: Curation Audit (on install failure)
177+
if: failure()
178+
uses: ./.github/actions/curation-audit
179+
with:
180+
install-log: /tmp/yarn-install.log
181+
142182
- name: Release (production)
143183
run: |
144-
yarn install --immutable
145184
yarn build
146185
yarn release
147186
env:

package.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,47 @@
5959
"ts-jest": "^29.1.1",
6060
"typescript": "^5.2.2"
6161
},
62-
"packageManager": "yarn@4.1.0"
62+
"packageManager": "yarn@4.1.0",
63+
"resolutions": {
64+
"flatted@^3.2.9": "^3.4.2",
65+
"ip@^2.0.0": "^2.0.1",
66+
"lodash-es@^4.17.21": "^4.18.0",
67+
"@babel/plugin-transform-modules-systemjs@^7.23.9": "^7.29.4",
68+
"@grpc/grpc-js@~1.9.0": "~1.9.16",
69+
"diff@^5.1.0": "^5.2.2",
70+
"fast-xml-parser@^4.0.12": "^4.5.5",
71+
"glob@^10.2.2": "^10.5.0",
72+
"glob@^10.3.10": "^10.5.0",
73+
"glob@^10.3.7": "^10.5.0",
74+
"image-size@^1.0.2": "^1.2.1",
75+
"protobufjs@^7.2.5": "^7.6.5",
76+
"shell-quote@1.8.0": "^1.9.0",
77+
"shell-quote@^1.7.2": "^1.9.0",
78+
"sigstore@^4.0.0": "^4.1.1",
79+
"minimatch@^9.0.0": "^9.0.4",
80+
"minimatch@^9.0.1": "^9.0.4",
81+
"minimatch@^9.0.3": "^9.0.4",
82+
"@semantic-release/npm@npm:^11.0.0": "^13.1.5",
83+
"npm@^10.0.0": "10.9.0",
84+
"npm@^11.6.2": "11.18.0",
85+
"pacote@^17.0.0": "^17.0.7",
86+
"pacote@^17.0.4": "^17.0.7",
87+
"pacote@^17.0.6": "^17.0.7",
88+
"pacote@^21.0.0": "^21.4.1",
89+
"pacote@^21.0.2": "^21.4.1",
90+
"pacote@^21.4.0": "^21.4.1",
91+
"sigstore@^2.2.0": "^2.2.1",
92+
"ws@^6.2.2": "6.2.4",
93+
"ws@^7": "7.5.11",
94+
"ws@^7.0.0": "7.5.11",
95+
"ws@^7.5.1": "7.5.11",
96+
"undici@^6.23.0": "^6.27.0",
97+
"node-gyp@^12.4.0": "^13.0.1",
98+
"node-gyp@latest": "^13.0.1",
99+
"browserslist@^4.20.4": "^4.24.0",
100+
"browserslist@^4.22.2": "^4.24.0",
101+
"tar": "7.5.20",
102+
"baseline-browser-mapping": "2.10.43",
103+
"electron-to-chromium": "1.5.393"
104+
}
63105
}

treefmt.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
[formatter.nix]
2-
command = "nixfmt"
3-
includes = ["*.nix"]
4-
51
[formatter.prettier]
62
command = "prettier"
73
options = ["--write"]
84
includes = ["*.js", "*.jsx", "*.ts", "*.tsx", "*.md", "*.yml", "*.yaml", "*.json"]
5+
# .yarnrc.yml gets an auth block appended at CI runtime (Artifactory OIDC Auth
6+
# step, before this check runs) - that injected content isn't prettier-
7+
# formatted and shouldn't be, so don't flag it as a real formatting diff.
8+
excludes = [".yarnrc.yml"]
99

1010
[formatter.shfmt]
1111
command = "shfmt"

0 commit comments

Comments
 (0)