Skip to content

Commit 57d34a9

Browse files
committed
Adding changeset
1 parent 6253e28 commit 57d34a9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.changeset/giant-plums-smash.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
---
4+
5+
Added and cleaned up the run ctx param:
6+
7+
- New optional properties `ctx.run.parentTaskRunId` and `ctx.run.rootTaskRunId` reference the current run's root/parent ID.
8+
- Removed deprecated properties from `ctx`
9+
- Added a new `ctx.deployment` object that contains information about the deployment associated with the run.
10+
11+
We also update `metadata.root` and `metadata.parent` to work even when the run is a "root" run (meaning it doesn't have a parent or a root associated run). This now works:
12+
13+
```ts
14+
metadata.root.set("foo", "bar");
15+
metadata.parent.set("baz", 1);
16+
metadata.current().foo // "bar"
17+
metadata.current().baz // 1
18+
```

0 commit comments

Comments
 (0)