Skip to content

Commit 2c31121

Browse files
committed
Merge remote-tracking branch 'origin/main' into preview-branches
# Conflicts: # internal-packages/run-engine/src/engine/systems/runAttemptSystem.ts # packages/cli-v3/src/commands/deploy.ts # pnpm-lock.yaml
2 parents 7937003 + b74c000 commit 2c31121

File tree

104 files changed

+5503
-2118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+5503
-2118
lines changed

.changeset/big-carrots-fail.md

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+
Fix dev runs

.changeset/gold-insects-invite.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"trigger.dev": patch
3+
"@trigger.dev/core": patch
4+
---
5+
6+
Expose esbuild `keepNames` option (experimental)

.changeset/grumpy-wasps-fold.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"trigger.dev": patch
3+
"@trigger.dev/core": patch
4+
---
5+
6+
Add `experimental_autoDetectExternal` trigger config option

.changeset/pre.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,30 @@
1717
"@trigger.dev/sdk": "3.3.17"
1818
},
1919
"changesets": [
20+
"big-carrots-fail",
2021
"blue-eyes-tickle",
2122
"breezy-turtles-talk",
2223
"cuddly-boats-press",
2324
"curvy-dogs-share",
2425
"eighty-rings-divide",
2526
"four-needles-add",
2627
"gentle-waves-suffer",
28+
"gold-insects-invite",
2729
"green-lions-relate",
30+
"grumpy-wasps-fold",
2831
"hip-cups-wave",
2932
"honest-files-decide",
3033
"itchy-frogs-care",
3134
"itchy-games-sort",
3235
"late-chairs-ring",
36+
"lazy-panthers-shop",
3337
"moody-squids-count",
3438
"nice-colts-boil",
3539
"orange-rocks-grow",
3640
"plenty-dolphins-act",
3741
"polite-impalas-care",
3842
"polite-lies-fix",
43+
"rare-beds-accept",
3944
"real-rats-drop",
4045
"red-chairs-begin",
4146
"red-wasps-cover",
@@ -53,8 +58,10 @@
5358
"twelve-actors-hide",
5459
"two-tigers-dream",
5560
"weak-jobs-hide",
61+
"weak-parents-sip",
5662
"wet-deers-think",
5763
"wet-steaks-reflect",
64+
"wild-mirrors-return",
5865
"witty-donkeys-unite"
5966
]
6067
}

.changeset/silly-timers-repair.md

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+
Can now set project ref using the TRIGGER_PROJECT_REF env var

.changeset/small-dancers-smell.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
"@trigger.dev/core": patch
4+
---
5+
6+
Improve metadata flushing efficiency by collapsing operations

.changeset/weak-parents-sip.md

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+
Output esbuild metafile, can be inspected after `deploy --dry run`

.changeset/wild-mirrors-return.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"trigger.dev": patch
3+
"@trigger.dev/core": patch
4+
---
5+
6+
Expose esbuild `minify` option (experimental)

.github/workflows/publish-webapp.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: "🐳 Publish Webapp"
33
permissions:
44
contents: read
55
packages: write
6+
id-token: write
67

78
on:
89
workflow_call:

.github/workflows/release.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,3 @@ jobs:
9696
run: |
9797
package_version=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[0].version')
9898
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
99-
100-
publish:
101-
needs: release
102-
uses: ./.github/workflows/publish.yml
103-
permissions:
104-
contents: read
105-
secrets: inherit
106-
# if: needs.release.outputs.published == 'true'
107-
# disable automatic publishing for now
108-
if: false
109-
with:
110-
image_tag: v${{ needs.release.outputs.published_package_version }}
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: "🧪 Unit Tests: Internal"
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_call:
8+
9+
jobs:
10+
unitTests:
11+
name: "🧪 Unit Tests: Internal"
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8]
16+
shardTotal: [8]
17+
env:
18+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
19+
SHARD_INDEX: ${{ matrix.shardIndex }}
20+
SHARD_TOTAL: ${{ matrix.shardTotal }}
21+
steps:
22+
- name: 🔧 Disable IPv6
23+
run: |
24+
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
25+
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
26+
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
27+
28+
- name: 🔧 Configure docker address pool
29+
run: |
30+
CONFIG='{
31+
"default-address-pools" : [
32+
{
33+
"base" : "172.17.0.0/12",
34+
"size" : 20
35+
},
36+
{
37+
"base" : "192.168.0.0/16",
38+
"size" : 24
39+
}
40+
]
41+
}'
42+
mkdir -p /etc/docker
43+
echo "$CONFIG" | sudo tee /etc/docker/daemon.json
44+
45+
- name: 🔧 Restart docker daemon
46+
run: sudo systemctl restart docker
47+
48+
- name: ⬇️ Checkout repo
49+
uses: actions/checkout@v4
50+
with:
51+
fetch-depth: 0
52+
53+
- name: ⎔ Setup pnpm
54+
uses: pnpm/action-setup@v4
55+
with:
56+
version: 8.15.5
57+
58+
- name: ⎔ Setup node
59+
uses: buildjet/setup-node@v4
60+
with:
61+
node-version: 20.11.1
62+
cache: "pnpm"
63+
64+
# ..to avoid rate limits when pulling images
65+
- name: 🐳 Login to DockerHub
66+
if: ${{ env.DOCKERHUB_USERNAME }}
67+
uses: docker/login-action@v3
68+
with:
69+
username: ${{ secrets.DOCKERHUB_USERNAME }}
70+
password: ${{ secrets.DOCKERHUB_TOKEN }}
71+
- name: 🐳 Skipping DockerHub login (no secrets available)
72+
if: ${{ !env.DOCKERHUB_USERNAME }}
73+
run: echo "DockerHub login skipped because secrets are not available."
74+
75+
- name: 📥 Download deps
76+
run: pnpm install --frozen-lockfile
77+
78+
- name: 📀 Generate Prisma Client
79+
run: pnpm run generate
80+
81+
- name: 🧪 Run Internal Unit Tests
82+
run: pnpm run test:internal --reporter=default --reporter=blob --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
83+
84+
- name: Gather all reports
85+
if: ${{ !cancelled() }}
86+
run: |
87+
mkdir -p .vitest-reports
88+
find . -type f -path '*/.vitest-reports/blob-*.json' \
89+
-exec bash -c 'src="$1"; basename=$(basename "$src"); pkg=$(dirname "$src" | sed "s|^\./||;s|/\.vitest-reports$||;s|/|_|g"); cp "$src" ".vitest-reports/${pkg}-${basename}"' _ {} \;
90+
91+
- name: Upload blob reports to GitHub Actions Artifacts
92+
if: ${{ !cancelled() }}
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: internal-blob-report-${{ matrix.shardIndex }}
96+
path: .vitest-reports/*
97+
include-hidden-files: true
98+
retention-days: 1
99+
100+
merge-reports:
101+
name: "📊 Merge Reports"
102+
if: ${{ !cancelled() }}
103+
needs: [unitTests]
104+
runs-on: ubuntu-latest
105+
steps:
106+
- name: ⬇️ Checkout repo
107+
uses: actions/checkout@v4
108+
with:
109+
fetch-depth: 0
110+
111+
- name: ⎔ Setup pnpm
112+
uses: pnpm/action-setup@v4
113+
with:
114+
version: 8.15.5
115+
116+
- name: ⎔ Setup node
117+
uses: buildjet/setup-node@v4
118+
with:
119+
node-version: 20.11.1
120+
# no cache enabled, we're not installing deps
121+
122+
- name: Download blob reports from GitHub Actions Artifacts
123+
uses: actions/download-artifact@v4
124+
with:
125+
path: .vitest-reports
126+
pattern: internal-blob-report-*
127+
merge-multiple: true
128+
129+
- name: Merge reports
130+
run: pnpm dlx vitest run --merge-reports
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: "🧪 Unit Tests: Packages"
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_call:
8+
9+
jobs:
10+
unitTests:
11+
name: "🧪 Unit Tests: Packages"
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
shardIndex: [1]
16+
shardTotal: [1]
17+
env:
18+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
19+
SHARD_INDEX: ${{ matrix.shardIndex }}
20+
SHARD_TOTAL: ${{ matrix.shardTotal }}
21+
steps:
22+
- name: 🔧 Disable IPv6
23+
run: |
24+
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
25+
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
26+
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
27+
28+
- name: 🔧 Configure docker address pool
29+
run: |
30+
CONFIG='{
31+
"default-address-pools" : [
32+
{
33+
"base" : "172.17.0.0/12",
34+
"size" : 20
35+
},
36+
{
37+
"base" : "192.168.0.0/16",
38+
"size" : 24
39+
}
40+
]
41+
}'
42+
mkdir -p /etc/docker
43+
echo "$CONFIG" | sudo tee /etc/docker/daemon.json
44+
45+
- name: 🔧 Restart docker daemon
46+
run: sudo systemctl restart docker
47+
48+
- name: ⬇️ Checkout repo
49+
uses: actions/checkout@v4
50+
with:
51+
fetch-depth: 0
52+
53+
- name: ⎔ Setup pnpm
54+
uses: pnpm/action-setup@v4
55+
with:
56+
version: 8.15.5
57+
58+
- name: ⎔ Setup node
59+
uses: buildjet/setup-node@v4
60+
with:
61+
node-version: 20.11.1
62+
cache: "pnpm"
63+
64+
# ..to avoid rate limits when pulling images
65+
- name: 🐳 Login to DockerHub
66+
if: ${{ env.DOCKERHUB_USERNAME }}
67+
uses: docker/login-action@v3
68+
with:
69+
username: ${{ secrets.DOCKERHUB_USERNAME }}
70+
password: ${{ secrets.DOCKERHUB_TOKEN }}
71+
- name: 🐳 Skipping DockerHub login (no secrets available)
72+
if: ${{ !env.DOCKERHUB_USERNAME }}
73+
run: echo "DockerHub login skipped because secrets are not available."
74+
75+
- name: 📥 Download deps
76+
run: pnpm install --frozen-lockfile
77+
78+
- name: 📀 Generate Prisma Client
79+
run: pnpm run generate
80+
81+
- name: 🧪 Run Package Unit Tests
82+
run: pnpm run test:packages --reporter=default --reporter=blob --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
83+
84+
- name: Gather all reports
85+
if: ${{ !cancelled() }}
86+
run: |
87+
mkdir -p .vitest-reports
88+
find . -type f -path '*/.vitest-reports/blob-*.json' \
89+
-exec bash -c 'src="$1"; basename=$(basename "$src"); pkg=$(dirname "$src" | sed "s|^\./||;s|/\.vitest-reports$||;s|/|_|g"); cp "$src" ".vitest-reports/${pkg}-${basename}"' _ {} \;
90+
91+
- name: Upload blob reports to GitHub Actions Artifacts
92+
if: ${{ !cancelled() }}
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: packages-blob-report-${{ matrix.shardIndex }}
96+
path: .vitest-reports/*
97+
include-hidden-files: true
98+
retention-days: 1
99+
100+
merge-reports:
101+
name: "📊 Merge Reports"
102+
if: ${{ !cancelled() }}
103+
needs: [unitTests]
104+
runs-on: ubuntu-latest
105+
steps:
106+
- name: ⬇️ Checkout repo
107+
uses: actions/checkout@v4
108+
with:
109+
fetch-depth: 0
110+
111+
- name: ⎔ Setup pnpm
112+
uses: pnpm/action-setup@v4
113+
with:
114+
version: 8.15.5
115+
116+
- name: ⎔ Setup node
117+
uses: buildjet/setup-node@v4
118+
with:
119+
node-version: 20.11.1
120+
# no cache enabled, we're not installing deps
121+
122+
- name: Download blob reports from GitHub Actions Artifacts
123+
uses: actions/download-artifact@v4
124+
with:
125+
path: .vitest-reports
126+
pattern: packages-blob-report-*
127+
merge-multiple: true
128+
129+
- name: Merge reports
130+
run: pnpm dlx vitest run --merge-reports

0 commit comments

Comments
 (0)