Skip to content

Commit 15333ce

Browse files
committed
Merge branch 'feat/admin-account-deletion' of https://github.com/triggerdotdev/trigger.dev into feat/admin-account-deletion
2 parents 9130c0d + 9770456 commit 15333ce

101 files changed

Lines changed: 7039 additions & 1098 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/core": patch
3+
---
4+
5+
Add `isReplay` boolean to the run context (`ctx.run.isReplay`), derived from the existing `replayedFromTaskRunFriendlyId` database field. Defaults to `false` for backwards compatibility.

.changeset/session-primitive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/core": patch
3+
---
4+
5+
Add `SessionId` friendly ID generator and schemas for the new durable Session primitive. Exported from `@trigger.dev/core/v3/isomorphic` alongside `RunId`, `BatchId`, etc. Ships the `CreateSessionStreamWaitpoint` request/response schemas alongside the main Session CRUD.

.github/VOUCHED.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ capaj
1919
chengzp
2020
bharathkumar39293
2121
bhekanik
22-
jrossi
22+
jrossi
23+
ThullyoCunha

.github/workflows/changesets-pr.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,35 @@ jobs:
121121
else
122122
echo "No changes to commit"
123123
fi
124+
125+
bump-chart-version:
126+
name: Bump Helm chart version on release PR
127+
runs-on: ubuntu-latest
128+
needs: update-lockfile
129+
permissions:
130+
contents: write
131+
steps:
132+
- name: Checkout release branch
133+
uses: actions/checkout@v4
134+
with:
135+
ref: changeset-release/main
136+
137+
- name: Bump Chart.yaml
138+
run: |
139+
set -e
140+
VERSION=$(jq -r '.version' packages/cli-v3/package.json)
141+
sed -i "s/^version:.*/version: ${VERSION}/" ./hosting/k8s/helm/Chart.yaml
142+
sed -i "s/^appVersion:.*/appVersion: v${VERSION}/" ./hosting/k8s/helm/Chart.yaml
143+
144+
- name: Commit and push Chart.yaml bump
145+
run: |
146+
set -e
147+
git config user.name "github-actions[bot]"
148+
git config user.email "github-actions[bot]@users.noreply.github.com"
149+
git add hosting/k8s/helm/Chart.yaml
150+
if ! git diff --cached --quiet; then
151+
git commit -m "chore: bump helm chart version for release"
152+
git push origin changeset-release/main
153+
else
154+
echo "Chart.yaml already at target version, no-op"
155+
fi

.github/workflows/claude-md-audit.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ concurrency:
1616

1717
jobs:
1818
audit:
19-
if: github.event.pull_request.draft == false
19+
if: >-
20+
github.event.pull_request.draft == false &&
21+
github.event.pull_request.head.repo.full_name == github.repository
2022
runs-on: ubuntu-latest
2123
permissions:
2224
contents: read

.github/workflows/e2e-webapp.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: "🧪 E2E Tests: Webapp"
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_call:
8+
9+
jobs:
10+
e2eTests:
11+
name: "🧪 E2E Tests: Webapp"
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 20
14+
env:
15+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
16+
steps:
17+
- name: 🔧 Disable IPv6
18+
run: |
19+
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
20+
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
21+
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
22+
23+
- name: 🔧 Configure docker address pool
24+
run: |
25+
CONFIG='{
26+
"default-address-pools" : [
27+
{
28+
"base" : "172.17.0.0/12",
29+
"size" : 20
30+
},
31+
{
32+
"base" : "192.168.0.0/16",
33+
"size" : 24
34+
}
35+
]
36+
}'
37+
mkdir -p /etc/docker
38+
echo "$CONFIG" | sudo tee /etc/docker/daemon.json
39+
40+
- name: 🔧 Restart docker daemon
41+
run: sudo systemctl restart docker
42+
43+
- name: ⬇️ Checkout repo
44+
uses: actions/checkout@v4
45+
with:
46+
fetch-depth: 0
47+
48+
- name: ⎔ Setup pnpm
49+
uses: pnpm/action-setup@v4
50+
with:
51+
version: 10.23.0
52+
53+
- name: ⎔ Setup node
54+
uses: buildjet/setup-node@v4
55+
with:
56+
node-version: 20.20.0
57+
cache: "pnpm"
58+
59+
# ..to avoid rate limits when pulling images
60+
- name: 🐳 Login to DockerHub
61+
if: ${{ env.DOCKERHUB_USERNAME }}
62+
uses: docker/login-action@v3
63+
with:
64+
username: ${{ secrets.DOCKERHUB_USERNAME }}
65+
password: ${{ secrets.DOCKERHUB_TOKEN }}
66+
- name: 🐳 Skipping DockerHub login (no secrets available)
67+
if: ${{ !env.DOCKERHUB_USERNAME }}
68+
run: echo "DockerHub login skipped because secrets are not available."
69+
70+
- name: 🐳 Pre-pull testcontainer images
71+
if: ${{ env.DOCKERHUB_USERNAME }}
72+
run: |
73+
echo "Pre-pulling Docker images with authenticated session..."
74+
docker pull postgres:14
75+
docker pull redis:7.2
76+
docker pull testcontainers/ryuk:0.11.0
77+
echo "Image pre-pull complete"
78+
79+
- name: 📥 Download deps
80+
run: pnpm install --frozen-lockfile
81+
82+
- name: 📀 Generate Prisma Client
83+
run: pnpm run generate
84+
85+
- name: 🏗️ Build Webapp
86+
run: pnpm run build --filter webapp
87+
88+
- name: 🧪 Run Webapp E2E Tests
89+
run: cd apps/webapp && pnpm exec vitest run --config vitest.e2e.config.ts --reporter=default
90+
env:
91+
WEBAPP_TEST_VERBOSE: "1"
Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
1-
name: 🧭 Helm Chart PR Prerelease
1+
name: 🧭 Helm Chart Prerelease
22

33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66
paths:
77
- "hosting/k8s/helm/**"
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- "hosting/k8s/helm/**"
13+
workflow_dispatch:
14+
inputs:
15+
app_version:
16+
description: "Override appVersion (e.g. 'main', 'v4.4.4'). Leave empty to keep Chart.yaml value."
17+
required: false
18+
type: string
19+
default: ""
820

921
concurrency:
10-
group: helm-prerelease-${{ github.event.pull_request.number }}
22+
group: helm-prerelease-${{ github.event.pull_request.number || github.ref }}
1123
cancel-in-progress: true
1224

1325
env:
@@ -54,6 +66,10 @@ jobs:
5466

5567
prerelease:
5668
needs: lint-and-test
69+
if: |
70+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
71+
github.event_name == 'push' ||
72+
github.event_name == 'workflow_dispatch'
5773
runs-on: ubuntu-latest
5874
permissions:
5975
contents: read
@@ -87,16 +103,35 @@ jobs:
87103
id: version
88104
run: |
89105
BASE_VERSION=$(grep '^version:' ./hosting/k8s/helm/Chart.yaml | awk '{print $2}')
90-
PR_NUMBER=${{ github.event.pull_request.number }}
91-
SHORT_SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7)
92-
PRERELEASE_VERSION="${BASE_VERSION}-pr${PR_NUMBER}.${SHORT_SHA}"
106+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
107+
PR_NUMBER=${{ github.event.pull_request.number }}
108+
SHORT_SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7)
109+
PRERELEASE_VERSION="${BASE_VERSION}-pr${PR_NUMBER}.${SHORT_SHA}"
110+
elif [[ "${{ github.event_name }}" == "push" ]]; then
111+
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
112+
PRERELEASE_VERSION="${BASE_VERSION}-main.${SHORT_SHA}"
113+
else
114+
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
115+
REF_SLUG=$(echo "${{ github.ref_name }}" | tr '/' '-' | tr -cd 'a-zA-Z0-9-')
116+
if [[ -z "$REF_SLUG" ]]; then
117+
REF_SLUG="manual"
118+
fi
119+
PRERELEASE_VERSION="${BASE_VERSION}-${REF_SLUG}.${SHORT_SHA}"
120+
fi
93121
echo "version=$PRERELEASE_VERSION" >> $GITHUB_OUTPUT
94122
echo "Prerelease version: $PRERELEASE_VERSION"
95123
96124
- name: Update Chart.yaml with prerelease version
97125
run: |
98126
sed -i "s/^version:.*/version: ${{ steps.version.outputs.version }}/" ./hosting/k8s/helm/Chart.yaml
99127
128+
- name: Override appVersion
129+
if: github.event_name == 'workflow_dispatch' && inputs.app_version != ''
130+
env:
131+
APP_VERSION: ${{ inputs.app_version }}
132+
run: |
133+
yq -i '.appVersion = strenv(APP_VERSION)' ./hosting/k8s/helm/Chart.yaml
134+
100135
- name: Package Helm Chart
101136
run: |
102137
helm package ./hosting/k8s/helm/ --destination /tmp/
@@ -109,7 +144,23 @@ jobs:
109144
# Push to GHCR OCI registry
110145
helm push "$CHART_PACKAGE" "oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts"
111146
147+
- name: Write run summary
148+
run: |
149+
{
150+
echo "### 🧭 Helm Chart Prerelease Published"
151+
echo ""
152+
echo "**Version:** \`${{ steps.version.outputs.version }}\`"
153+
echo ""
154+
echo "**Install:**"
155+
echo '```bash'
156+
echo "helm upgrade --install trigger \\"
157+
echo " oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts/${{ env.CHART_NAME }} \\"
158+
echo " --version \"${{ steps.version.outputs.version }}\""
159+
echo '```'
160+
} >> "$GITHUB_STEP_SUMMARY"
161+
112162
- name: Find existing comment
163+
if: github.event_name == 'pull_request'
113164
uses: peter-evans/find-comment@v3
114165
id: find-comment
115166
with:
@@ -118,6 +169,7 @@ jobs:
118169
body-includes: "Helm Chart Prerelease Published"
119170

120171
- name: Create or update PR comment
172+
if: github.event_name == 'pull_request'
121173
uses: peter-evans/create-or-update-comment@v4
122174
with:
123175
comment-id: ${{ steps.find-comment.outputs.comment-id }}

.github/workflows/pr_checks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- "docs/**"
88
- ".changeset/**"
99
- "hosting/**"
10+
- ".github/workflows/helm-prerelease.yml"
1011

1112
concurrency:
1213
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

.github/workflows/release-helm.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
push:
55
tags:
66
- 'helm-v*'
7+
workflow_call:
8+
inputs:
9+
chart_version:
10+
description: 'Chart version to release'
11+
required: true
12+
type: string
713
workflow_dispatch:
814
inputs:
915
chart_version:
@@ -86,8 +92,8 @@ jobs:
8692
- name: Extract version from tag or input
8793
id: version
8894
run: |
89-
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
90-
VERSION="${{ github.event.inputs.chart_version }}"
95+
if [ -n "${{ inputs.chart_version }}" ]; then
96+
VERSION="${{ inputs.chart_version }}"
9197
else
9298
VERSION="${{ github.ref_name }}"
9399
VERSION="${VERSION#helm-v}"
@@ -122,9 +128,8 @@ jobs:
122128
- name: Create GitHub Release
123129
id: release
124130
uses: softprops/action-gh-release@v1
125-
if: github.event_name == 'push'
126131
with:
127-
tag_name: ${{ github.ref_name }}
132+
tag_name: helm-v${{ steps.version.outputs.version }}
128133
name: "Helm Chart ${{ steps.version.outputs.version }}"
129134
body: |
130135
### Installation

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ jobs:
142142
git tag "v.docker.${{ steps.get_version.outputs.package_version }}"
143143
git push origin "v.docker.${{ steps.get_version.outputs.package_version }}"
144144
145+
- name: Create and push Helm chart tag
146+
if: steps.changesets.outputs.published == 'true'
147+
run: |
148+
set -e
149+
git tag "helm-v${{ steps.get_version.outputs.package_version }}"
150+
git push origin "helm-v${{ steps.get_version.outputs.package_version }}"
151+
145152
# Trigger Docker builds directly via workflow_call since tags pushed with
146153
# GITHUB_TOKEN don't trigger other workflows (GitHub Actions limitation).
147154
publish-docker:
@@ -153,6 +160,21 @@ jobs:
153160
with:
154161
image_tag: v${{ needs.release.outputs.published_package_version }}
155162

163+
# Trigger Helm chart release directly via workflow_call (same GITHUB_TOKEN
164+
# limitation as the Docker path). Runs after Docker images are published so
165+
# the chart never references images that don't exist yet.
166+
publish-helm:
167+
name: 🧭 Publish Helm chart
168+
needs: [release, publish-docker]
169+
if: needs.release.outputs.published == 'true'
170+
permissions:
171+
contents: write
172+
packages: write
173+
uses: ./.github/workflows/release-helm.yml
174+
secrets: inherit
175+
with:
176+
chart_version: ${{ needs.release.outputs.published_package_version }}
177+
156178
# After Docker images are published, update the GitHub release with the exact GHCR tag URL.
157179
# The GHCR package version ID is only known after the image is pushed, so we query for it here.
158180
update-release:

0 commit comments

Comments
 (0)