Skip to content

Commit 4eb6f62

Browse files
committed
Merge remote-tracking branch 'origin/main' into packet/pr4796-merge-main
# Conflicts: # packages/trigger-sdk/src/v3/createStartSessionAction.test.ts
2 parents 2ac07b1 + 755feb2 commit 4eb6f62

437 files changed

Lines changed: 48312 additions & 4922 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: 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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
merge_group:
8+
9+
permissions: {}
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
analyze:
17+
name: Analyze (${{ matrix.language }})
18+
if: github.repository == 'triggerdotdev/trigger.dev'
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
security-events: write # Upload SARIF to GitHub Security tab
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: [actions, javascript-typescript]
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
30+
with:
31+
persist-credentials: false
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
35+
with:
36+
languages: ${{ matrix.language }}
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
40+
with:
41+
category: /language:${{ matrix.language }}
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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ packages/**/styles/tailwind.css
2424

2525
# misc
2626
.DS_Store
27+
*.swp
2728
*.pem
2829

2930
# debug

.repo-ops-baseline

Whitespace-only changes.

.server-changes/appearance-themes-and-options.md

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

.server-changes/reduce-webapp-cpu-on-worker-routes.md

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

0 commit comments

Comments
 (0)