Skip to content

Commit 0b87c47

Browse files
authored
Merge branch 'main' into feat/python-extension-improvements
2 parents 98b44bd + c315e38 commit 0b87c47

File tree

79 files changed

+3010
-2925
lines changed

Some content is hidden

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

79 files changed

+3010
-2925
lines changed

.changeset/cold-coins-burn.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@trigger.dev/react-hooks": patch
3+
"@trigger.dev/sdk": patch
4+
"trigger.dev": patch
5+
---
6+
7+
Add support for two-phase deployments and task version pinning

.changeset/rude-news-dress.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+
Upgrade @clack/prompts to 0.10.0 to fix CI output

.changeset/silent-squids-glow.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+
Fixes needsPromotion github action output

apps/coordinator/src/index.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,25 @@ class TaskCoordinator {
663663

664664
await chaosMonkey.call();
665665

666+
const lazyPayload = {
667+
...lazyAttempt.lazyPayload,
668+
metrics: [
669+
...(message.startTime
670+
? [
671+
{
672+
name: "start",
673+
event: "lazy_payload",
674+
timestamp: message.startTime,
675+
duration: Date.now() - message.startTime,
676+
},
677+
]
678+
: []),
679+
],
680+
};
681+
666682
socket.emit("EXECUTE_TASK_RUN_LAZY_ATTEMPT", {
667683
version: "v1",
668-
lazyPayload: lazyAttempt.lazyPayload,
684+
lazyPayload,
669685
});
670686
} catch (error) {
671687
if (error instanceof ChaosMonkey.Error) {

apps/docker-provider/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,18 @@ class DockerTaskOperations implements TaskOperations {
122122
`--env=POD_NAME=${containerName}`,
123123
`--env=COORDINATOR_HOST=${COORDINATOR_HOST}`,
124124
`--env=COORDINATOR_PORT=${COORDINATOR_PORT}`,
125-
`--env=SCHEDULED_AT_MS=${Date.now()}`,
125+
`--env=TRIGGER_POD_SCHEDULED_AT_MS=${Date.now()}`,
126126
`--name=${containerName}`,
127127
];
128128

129129
if (process.env.ENFORCE_MACHINE_PRESETS) {
130130
runArgs.push(`--cpus=${opts.machine.cpu}`, `--memory=${opts.machine.memory}G`);
131131
}
132132

133+
if (opts.dequeuedAt) {
134+
runArgs.push(`--env=TRIGGER_RUN_DEQUEUED_AT_MS=${opts.dequeuedAt}`);
135+
}
136+
133137
runArgs.push(`${opts.image}`);
134138

135139
try {

apps/kubernetes-provider/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ class KubernetesTaskOperations implements TaskOperations {
202202
name: "TRIGGER_RUN_ID",
203203
value: opts.runId,
204204
},
205+
...(opts.dequeuedAt
206+
? [{ name: "TRIGGER_RUN_DEQUEUED_AT_MS", value: String(opts.dequeuedAt) }]
207+
: []),
205208
],
206209
volumeMounts: [
207210
{
@@ -518,7 +521,7 @@ class KubernetesTaskOperations implements TaskOperations {
518521
},
519522
},
520523
{
521-
name: "SCHEDULED_AT_MS",
524+
name: "TRIGGER_POD_SCHEDULED_AT_MS",
522525
value: Date.now().toString(),
523526
},
524527
...this.#coordinatorEnvVars,

0 commit comments

Comments
 (0)