Skip to content

Commit a24e560

Browse files
authored
Merge branch 'main' into feat/snapshot-store-wiring-tri-13451
2 parents bd88f15 + 7447919 commit a24e560

182 files changed

Lines changed: 8654 additions & 1549 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Fixes an issue introduced in 4.5.11 that made deploy image builds of projects with large dependency trees noticeably slower.

‎.changeset/eighty-donkeys-shake.md‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎.changeset/realtime-streams-from-latest.md‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎.changeset/spotty-pillows-visit.md‎

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"trigger.dev": patch
3+
"@trigger.dev/build": patch
4+
"@trigger.dev/core": patch
5+
---
6+
7+
The `trigger.dev deploy` and `trigger.dev dev` commands now warn (with the suggested fix) when your code loads a package through `createRequire()` that won't be available in the deployed image. Previously it would fail at runtime in production to load the package. Deploys also now show bundler warnings for your code instead of discarding them.

‎.github/workflows/codeql.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7+
merge_group:
78

89
permissions: {}
910

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Dispatch RepoOps sync
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: dispatch-repo-ops-sync
13+
cancel-in-progress: false
14+
15+
jobs:
16+
dispatch:
17+
if: vars.REPO_OPS_SYNC_ENABLED == 'true'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Create Dispatcher App token
21+
id: app-token
22+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
23+
with:
24+
app-id: ${{ vars.REPO_OPS_DISPATCHER_APP_ID }}
25+
private-key: ${{ secrets.REPO_OPS_DISPATCHER_APP_PRIVATE_KEY }}
26+
repositories: ${{ secrets.REPO_OPS_MONO_REPOSITORY }}
27+
permission-contents: write
28+
29+
- name: Dispatch the private sync worker
30+
env:
31+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
32+
PUBLIC_SHA: ${{ github.sha }}
33+
MONO_REPOSITORY: ${{ secrets.REPO_OPS_MONO_REPOSITORY }}
34+
run: |
35+
set -euo pipefail
36+
[[ "$MONO_REPOSITORY" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]]
37+
[[ "$PUBLIC_SHA" =~ ^[0-9a-f]{40}$ ]]
38+
gh api "repos/${MONO_REPOSITORY}/dispatches" \
39+
--method POST \
40+
--field event_type=repo-ops-public-push \
41+
--field "client_payload[public_sha]=$PUBLIC_SHA"

‎.github/workflows/pr_checks.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: 🤖 PR Checks
33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
6+
merge_group:
67

78
concurrency:
89
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -26,6 +27,15 @@ jobs:
2627
cli: ${{ steps.filter.outputs.cli }}
2728
sdk: ${{ steps.filter.outputs.sdk }}
2829
steps:
30+
# Merge queue events use Git to compare the synthetic merge commit with
31+
# its captured base, while pull request events use the GitHub API.
32+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
33+
if: github.event_name == 'merge_group'
34+
with:
35+
fetch-depth: 20
36+
filter: blob:none
37+
persist-credentials: false
38+
2939
# `code` uses `every` semantics so the negation patterns actually subtract.
3040
# With the default `some` quantifier, `**` matches every file and the
3141
# subsequent `!...` patterns are no-ops (each pattern is OR'd, not AND'd).

‎.github/workflows/publish.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,18 @@ on:
3333
- "packages/**"
3434
- "!packages/**/*.md"
3535
- "!packages/**/*.eslintrc"
36+
# CLI + libraries published to npm; none are built into the webapp/supervisor images.
37+
- "!packages/cli-v3/**"
38+
- "!packages/build/**"
39+
- "!packages/python/**"
40+
- "!packages/react-hooks/**"
41+
- "!packages/rsc/**"
42+
- "!packages/schema-to-json/**"
3643
- "internal-packages/**"
44+
# Test/tooling-only internal packages, never in an image.
45+
- "!internal-packages/testcontainers/**"
46+
- "!internal-packages/sdk-compat-tests/**"
47+
- "!internal-packages/observability-map/**"
3748
- "apps/**"
3849
- "!apps/**/*.md"
3950
- "!apps/**/*.eslintrc"
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: repo-ops-sync-gate
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
merge_group:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
gate:
13+
if: github.event_name == 'pull_request' || vars.REPO_OPS_SYNC_ENABLED == 'true'
14+
timeout-minutes: 15
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Reject reserved RepoOps trailers
18+
if: github.event_name == 'pull_request'
19+
env:
20+
PR_TITLE: ${{ github.event.pull_request.title }}
21+
PR_BODY: ${{ github.event.pull_request.body }}
22+
run: |
23+
python3 - <<'PY'
24+
import os
25+
import re
26+
import sys
27+
28+
text = f"{os.environ.get('PR_TITLE', '')}\n{os.environ.get('PR_BODY', '')}"
29+
match = re.search(r"(?m)^(?:OSS-RevId|Mono-RevId):", text)
30+
if match:
31+
print(f"BLOCKED: PR title/body contains reserved RepoOps trailer {match.group(0)!r}", file=sys.stderr)
32+
raise SystemExit(1)
33+
print("ok: no reserved RepoOps trailers")
34+
PY
35+
36+
- name: Pull request check context
37+
if: github.event_name == 'pull_request'
38+
run: echo 'State is checked again against the live tips by merge queue.'
39+
40+
- name: Create read-only Dispatcher App token
41+
if: github.event_name == 'merge_group'
42+
id: app-token
43+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
44+
with:
45+
app-id: ${{ vars.REPO_OPS_DISPATCHER_APP_ID }}
46+
private-key: ${{ secrets.REPO_OPS_DISPATCHER_APP_PRIVATE_KEY }}
47+
repositories: ${{ secrets.REPO_OPS_MONO_REPOSITORY }}
48+
permission-contents: read
49+
50+
- name: Wait for pending mono changes
51+
if: github.event_name == 'merge_group'
52+
env:
53+
APP_TOKEN: ${{ steps.app-token.outputs.token }}
54+
PUBLIC_TOKEN: ${{ github.token }}
55+
MONO_BASELINE: ${{ vars.REPO_OPS_MONO_BASELINE }}
56+
PUBLIC_BASELINE: ${{ vars.REPO_OPS_PUBLIC_BASELINE }}
57+
MONO_REPOSITORY: ${{ secrets.REPO_OPS_MONO_REPOSITORY }}
58+
PUBLIC_REPOSITORY: ${{ github.repository }}
59+
run: |
60+
set -euo pipefail
61+
[[ "$MONO_REPOSITORY" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]]
62+
[[ "$PUBLIC_REPOSITORY" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]]
63+
git clone --filter=blob:none --no-tags \
64+
"https://x-access-token:${PUBLIC_TOKEN}@github.com/${PUBLIC_REPOSITORY}.git" public
65+
git clone --filter=blob:none --no-tags \
66+
"https://x-access-token:${APP_TOKEN}@github.com/${MONO_REPOSITORY}.git" mono
67+
68+
for _ in $(seq 1 60); do
69+
git -C public fetch --no-tags origin \
70+
+refs/heads/main:refs/remotes/origin/main
71+
git -C mono fetch --no-tags origin \
72+
+refs/heads/main:refs/remotes/origin/main
73+
output="$(mktemp)"
74+
mono/tooling/plan-repo-ops-outbound.sh \
75+
mono public "$(git -C mono rev-parse origin/main)" \
76+
"$MONO_BASELINE" "$PUBLIC_BASELINE" "$output"
77+
native_count="$(grep -E '^native_count=' "$output" | cut -d= -f2)"
78+
rm -f "$output"
79+
80+
if (( native_count == 0 )); then
81+
echo 'No unsynced native mono oss/ commits.'
82+
exit 0
83+
fi
84+
echo "Waiting for $native_count native mono oss/ commit(s)."
85+
sleep 10
86+
done
87+
echo 'Timed out waiting for mono-to-public sync.' >&2
88+
exit 1

0 commit comments

Comments
 (0)