Skip to content

Commit 65db0f0

Browse files
committed
Merge remote-tracking branch 'origin/main' into cli-deploy-with-native-builders
2 parents 204e2cc + 8b0f51b commit 65db0f0

File tree

36 files changed

+783
-1635
lines changed

36 files changed

+783
-1635
lines changed

.changeset/brown-pots-beg.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(otel): exported logs and spans will now have matching trace IDs
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(cli): header will always print the correct profile

.changeset/polite-eels-divide.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+
feat(cli): implements content-addressable store for the dev CLI build outputs, reducing disk usage

.github/workflows/release.yml

Lines changed: 63 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: 🦋 Changesets Release
22

3-
permissions:
4-
contents: write
5-
63
on:
74
push:
85
branches:
@@ -25,6 +22,7 @@ jobs:
2522
contents: write
2623
packages: write
2724
pull-requests: write
25+
id-token: write
2826
if: github.repository == 'triggerdotdev/trigger.dev'
2927
outputs:
3028
published: ${{ steps.changesets.outputs.published }}
@@ -59,11 +57,6 @@ jobs:
5957
- name: 🔎 Type check
6058
run: pnpm run typecheck --filter "@trigger.dev/*" --filter "trigger.dev"
6159

62-
- name: 🔐 Setup npm auth
63-
run: |
64-
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
65-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
66-
6760
# This action has two responsibilities. The first time the workflow runs
6861
# (initial push to the `main` branch) it will create a new branch and
6962
# then open a PR with the related changes for the new version. After the
@@ -75,24 +68,76 @@ jobs:
7568
uses: changesets/action@v1
7669
with:
7770
version: pnpm run changeset:version
78-
commit: "chore: Update version for release"
79-
title: "chore: Update version for release"
71+
commit: "chore: release packages"
72+
title: "chore: release packages"
8073
publish: pnpm run changeset:release
8174
createGithubReleases: true
8275
env:
8376
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
85-
86-
# - name: 🚀 PR / Publish (mock)
87-
# if: ${{ env.ACT }}
88-
# id: changesets
89-
# run: |
90-
# echo "published=true" >> "$GITHUB_OUTPUT"
91-
# echo "publishedPackages=[{\"name\": \"@xx/xx\", \"version\": \"1.2.0\"}, {\"name\": \"@xx/xy\", \"version\": \"0.8.9\"}]" >> "$GITHUB_OUTPUT"
9277

9378
- name: 📦 Get package version
9479
if: steps.changesets.outputs.published == 'true'
9580
id: get_version
9681
run: |
9782
package_version=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[0].version')
9883
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
84+
85+
# this triggers the publish workflow for the docker images
86+
- name: 🏷️ Create and push docker tag
87+
if: steps.changesets.outputs.published == 'true'
88+
run: |
89+
set -e
90+
git tag "v.docker.${{ steps.get_version.outputs.package_version }}"
91+
git push origin "v.docker.${{ steps.get_version.outputs.package_version }}"
92+
93+
- name: Update PR title with version
94+
if: steps.changesets.outputs.published != 'true'
95+
env:
96+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
run: |
98+
PR_NUMBER=$(gh pr list --head changeset-release/main --json number --jq '.[0].number')
99+
if [ -n "$PR_NUMBER" ]; then
100+
git fetch origin changeset-release/main
101+
# we arbitrarily reference the version of the cli package here; it is the same for all package releases
102+
VERSION=$(git show origin/changeset-release/main:packages/cli-v3/package.json | jq -r '.version')
103+
gh pr edit "$PR_NUMBER" --title "chore: release v$VERSION"
104+
fi
105+
106+
update-lockfile:
107+
name: Update lockfile on release PR
108+
runs-on: ubuntu-latest
109+
needs: release
110+
if: needs.release.outputs.published != 'true'
111+
permissions:
112+
contents: write
113+
steps:
114+
- name: Checkout release branch
115+
uses: actions/checkout@v4
116+
with:
117+
ref: changeset-release/main
118+
119+
- name: Setup pnpm
120+
uses: pnpm/action-setup@v4
121+
with:
122+
version: 10.23.0
123+
124+
- name: Setup node
125+
uses: buildjet/setup-node@v4
126+
with:
127+
node-version: 20.19.0
128+
129+
- name: Install and update lockfile
130+
run: pnpm install
131+
132+
- name: Commit and push lockfile
133+
run: |
134+
set -e
135+
if git diff --quiet pnpm-lock.yaml; then
136+
echo "No lockfile changes"
137+
else
138+
git config user.name "github-actions[bot]"
139+
git config user.email "github-actions[bot]@users.noreply.github.com"
140+
git add pnpm-lock.yaml
141+
git commit -m "chore: update lockfile for release"
142+
git push origin changeset-release/main
143+
fi

apps/webapp/app/presenters/v3/SpanPresenter.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ export class SpanPresenter extends BasePresenter {
273273
spanId: run.spanId,
274274
isCached: !!originalRunId,
275275
machinePreset: machine?.name,
276+
taskEventStore: run.taskEventStore,
276277
externalTraceId,
277278
};
278279
}

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,10 @@ function RunBody({
815815
<Property.Label>Span ID</Property.Label>
816816
<Property.Value>{run.spanId}</Property.Value>
817817
</Property.Item>
818+
<Property.Item>
819+
<Property.Label>Task event store</Property.Label>
820+
<Property.Value>{run.taskEventStore}</Property.Value>
821+
</Property.Item>
818822
</div>
819823
)}
820824
</Property.Table>

apps/webapp/app/v3/eventRepository/clickhouseEventRepository.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ export class ClickhouseEventRepository implements IEventRepository {
10391039
endCreatedAt?: Date,
10401040
options?: { includeDebugLogs?: boolean }
10411041
): Promise<TraceSummary | undefined> {
1042-
const startCreatedAtWithBuffer = new Date(startCreatedAt.getTime() - 1000);
1042+
const startCreatedAtWithBuffer = new Date(startCreatedAt.getTime() - 60_000);
10431043
const endCreatedAtWithBuffer = endCreatedAt
10441044
? new Date(endCreatedAt.getTime() + 60_000)
10451045
: undefined;

docs/help-slack.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Slack support"
33
---
44

5-
If you have a paid Trigger.dev account, you can request a private Slack Connect channel.
5+
If you're on the Trigger.dev Pro plan, you can request a private Slack Connect channel.
66

77
To do this:
88

internal-packages/emails/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@
66
"main": "./src/index.tsx",
77
"types": "./src/index.tsx",
88
"scripts": {
9-
"dev": "PORT=3080 email dev"
9+
"dev": "PORT=3080 email dev",
10+
"typecheck": "tsc --noEmit"
1011
},
1112
"dependencies": {
12-
"@aws-sdk/client-ses": "^3.716.0",
13+
"@aws-sdk/client-sesv2": "^3.716.0",
1314
"@react-email/components": "0.0.16",
1415
"@react-email/render": "^0.0.12",
15-
"nodemailer": "^6.9.16",
16+
"nodemailer": "^7.0.11",
1617
"react": "^18.2.0",
1718
"react-email": "^2.1.1",
1819
"resend": "^3.2.0",
1920
"tiny-invariant": "^1.2.0",
2021
"zod": "3.25.76"
2122
},
2223
"devDependencies": {
23-
"@types/nodemailer": "^6.4.17",
24+
"@types/nodemailer": "^7.0.4",
2425
"@types/react": "18.2.69"
2526
},
2627
"engines": {

internal-packages/emails/src/transports/aws-ses.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { render } from "@react-email/render";
22
import { EmailError, MailMessage, MailTransport, PlainTextMailMessage } from "./index";
33
import nodemailer from "nodemailer"
4-
import * as awsSes from "@aws-sdk/client-ses"
4+
import { SESv2Client, SendEmailCommand } from "@aws-sdk/client-sesv2"
55

66
export type AwsSesMailTransportOptions = {
77
type: 'aws-ses',
@@ -11,13 +11,10 @@ export class AwsSesMailTransport implements MailTransport {
1111
#client: nodemailer.Transporter;
1212

1313
constructor(options: AwsSesMailTransportOptions) {
14-
const ses = new awsSes.SESClient()
14+
const sesClient = new SESv2Client()
1515

1616
this.#client = nodemailer.createTransport({
17-
SES: {
18-
aws: awsSes,
19-
ses
20-
}
17+
SES: { sesClient, SendEmailCommand }
2118
})
2219
}
2320

0 commit comments

Comments
 (0)