Skip to content

Commit b36d81a

Browse files
authored
Add v4 changelog to v4 docs (#2240)
* Add v4-beta changelog docs * Add beta.22 changelog entry
1 parent 275ce9f commit b36d81a

File tree

1 file changed

+234
-0
lines changed

1 file changed

+234
-0
lines changed

docs/upgrade-to-v4.mdx

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,3 +866,237 @@ const batchHandle = await tasks.batchTrigger([
866866
const runs = await batchHandle.runs.list();
867867
console.log(runs);
868868
```
869+
870+
## v4 beta Changelog
871+
872+
<Update label="April 9, 2025" description="v4.0.0-beta.0">
873+
[Trigger.dev v4
874+
release](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.0).
875+
Please see our upgrade to v4 docs to view the full changelog. Run Engine 2.0 (alpha)
876+
([#1575](https://github.com/triggerdotdev/trigger.dev/pull/1575)), improved warm start times by
877+
eagerly creating the child TaskRunProcess when a previous run as completed
878+
([#1879](https://github.com/triggerdotdev/trigger.dev/pull/1879)), and new lifecycle hooks
879+
([#1817](https://github.com/triggerdotdev/trigger.dev/pull/1817)).
880+
</Update>
881+
882+
<Update label="April 11, 2025" description="v4.0.0-beta.1">
883+
[Release
884+
v4.0.0-beta.1](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.1).
885+
Fixed init.ts in custom trigger dirs and init command now correctly installs v4-beta packages
886+
([#1914](https://github.com/triggerdotdev/trigger.dev/pull/1914)). Updated nypm package to support
887+
test-based bun.lock files and handle flush errors gracefully in dev
888+
([#1914](https://github.com/triggerdotdev/trigger.dev/pull/1914)).
889+
</Update>
890+
891+
<Update label="April 15, 2025" description="v4.0.0-beta.2">
892+
[Release
893+
v4.0.0-beta.2](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.2).
894+
Managed run controller performance and reliability improvements
895+
([#1927](https://github.com/triggerdotdev/trigger.dev/pull/1927)).
896+
</Update>
897+
898+
<Update label="April 16, 2025" description="v4.0.0-beta.3">
899+
[Release
900+
v4.0.0-beta.3](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.3).
901+
Improved usage flushing ([#1931](https://github.com/triggerdotdev/trigger.dev/pull/1931)) and
902+
fixed stalled run detection ([#1934](https://github.com/triggerdotdev/trigger.dev/pull/1934)).
903+
</Update>
904+
905+
<Update label="April 17, 2025" description="v4.0.0-beta.5">
906+
[Release
907+
v4.0.0-beta.5](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.5).
908+
Updated dependencies with various bug fixes and improvements.
909+
</Update>
910+
911+
<Update label="April 18, 2025" description="v4.0.0-beta.6">
912+
[Release
913+
v4.0.0-beta.6](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.6).
914+
The dev command now uses the platform-provided engine URL
915+
([#1949](https://github.com/triggerdotdev/trigger.dev/pull/1949)).
916+
</Update>
917+
918+
<Update label="April 23, 2025" description="v4.0.0-beta.7">
919+
[Release
920+
v4.0.0-beta.7](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.7).
921+
Fixed runLimiter check on dequeueRuns
922+
([#1953](https://github.com/triggerdotdev/trigger.dev/pull/1953)) and QUEUED status snapshot
923+
handler ([#1963](https://github.com/triggerdotdev/trigger.dev/pull/1963)).
924+
</Update>
925+
926+
<Update label="April 23, 2025" description="v4.0.0-beta.8">
927+
[Release
928+
v4.0.0-beta.8](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.8).
929+
Prevented large outputs from overwriting each other
930+
([#1971](https://github.com/triggerdotdev/trigger.dev/pull/1971)).
931+
</Update>
932+
933+
<Update label="April 25, 2025" description="v4.0.0-beta.9">
934+
[Release
935+
v4.0.0-beta.9](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.9).
936+
Fixed default machine config indexing
937+
([#1979](https://github.com/triggerdotdev/trigger.dev/pull/1979)).
938+
</Update>
939+
940+
<Update label="April 28, 2025" description="v4.0.0-beta.10">
941+
[Release
942+
v4.0.0-beta.10](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.10).
943+
TriggerApiError 4xx errors no longer cause tasks to be retried
944+
([#1970](https://github.com/triggerdotdev/trigger.dev/pull/1970)). Fixed polling interval reset
945+
bug that could create duplicate intervals, protected against unexpected attempt number changes,
946+
and prevented run execution zombies after warm starts
947+
([#1987](https://github.com/triggerdotdev/trigger.dev/pull/1987)).
948+
</Update>
949+
950+
<Update label="April 29, 2025" description="v4.0.0-beta.11">
951+
[Release
952+
v4.0.0-beta.11](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.11).
953+
Updated dependencies with various bug fixes and improvements.
954+
</Update>
955+
956+
<Update label="May 3, 2025" description="v4.0.0-beta.12">
957+
[Release
958+
v4.0.0-beta.12](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.12).
959+
Display clickable links in Cursor terminal
960+
([#1998](https://github.com/triggerdotdev/trigger.dev/pull/1998)) and added AI assistance link
961+
when you have build errors ([#1925](https://github.com/triggerdotdev/trigger.dev/pull/1925)).
962+
Added validation when passing a directory to deploy command with helpful hints
963+
([#2013](https://github.com/triggerdotdev/trigger.dev/pull/2013)).
964+
</Update>
965+
966+
<Update label="May 7, 2025" description="v4.0.0-beta.13">
967+
[Release
968+
v4.0.0-beta.13](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.13).
969+
Correctly resolved waitpoints that come in early, ensured correct state before requesting
970+
suspension, and fixed race conditions in snapshot processing
971+
([#2006](https://github.com/triggerdotdev/trigger.dev/pull/2006)). Always print full deploy logs
972+
in CI ([#2006](https://github.com/triggerdotdev/trigger.dev/pull/2006)).
973+
</Update>
974+
975+
<Update label="May 8, 2025" description="v4.0.0-beta.14">
976+
[Release
977+
v4.0.0-beta.14](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.14).
978+
Updated dependencies with various bug fixes and improvements.
979+
</Update>
980+
981+
<Update label="May 14, 2025" description="v4.0.0-beta.15">
982+
[Release
983+
v4.0.0-beta.15](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.15).
984+
Added external log exporters and fixed missing external trace exporters in deployed tasks
985+
([#2038](https://github.com/triggerdotdev/trigger.dev/pull/2038)). Log images sizes for
986+
self-hosted deploys ([#1764](https://github.com/triggerdotdev/trigger.dev/pull/1764)) and fixed
987+
init.ts auto-import for deployed workers
988+
([#2041](https://github.com/triggerdotdev/trigger.dev/pull/2041)).
989+
</Update>
990+
991+
<Update label="May 14, 2025" description="v4.0.0-beta.16">
992+
[Release
993+
v4.0.0-beta.16](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.16).
994+
Fixed init.ts detection when using the sentry esbuild plugin
995+
([#2051](https://github.com/triggerdotdev/trigger.dev/pull/2051)).
996+
</Update>
997+
998+
<Update label="May 22, 2025" description="v4.0.0-beta.17">
999+
[Release
1000+
v4.0.0-beta.17](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.17).
1001+
Exposed esbuild `keepNames` ([#2091](https://github.com/triggerdotdev/trigger.dev/pull/2091)) and
1002+
`minify` options (experimental) ([#2091](https://github.com/triggerdotdev/trigger.dev/pull/2091)).
1003+
Added `experimental_autoDetectExternal` trigger config option
1004+
([#2083](https://github.com/triggerdotdev/trigger.dev/pull/2083)) and output esbuild metafile,
1005+
which can be inspected after `deploy --dry run`
1006+
([#2087](https://github.com/triggerdotdev/trigger.dev/pull/2087)).
1007+
</Update>
1008+
1009+
<Update label="May 22, 2025" description="v4.0.0-beta.18">
1010+
[Release
1011+
v4.0.0-beta.18](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.18).
1012+
Fixed dev runs ([#2094](https://github.com/triggerdotdev/trigger.dev/pull/2094)).
1013+
</Update>
1014+
1015+
<Update label="June 2, 2025" description="v4.0.0-beta.19">
1016+
[Release
1017+
v4.0.0-beta.19](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.19).
1018+
Added import timings and bundle size analysis - the dev command now warns about slow imports
1019+
([#2114](https://github.com/triggerdotdev/trigger.dev/pull/2114)). Fixed metadata collapsing
1020+
correctness ([#2115](https://github.com/triggerdotdev/trigger.dev/pull/2115)), added support for
1021+
Preview branches in v4 projects ([#2086](https://github.com/triggerdotdev/trigger.dev/pull/2086)),
1022+
can now set project ref using the TRIGGER_PROJECT_REF env var
1023+
([#2109](https://github.com/triggerdotdev/trigger.dev/pull/2109)), and fixed `syncEnvVars` for
1024+
non-preview deployments ([#2131](https://github.com/triggerdotdev/trigger.dev/pull/2131)).
1025+
</Update>
1026+
1027+
<Update label="June 3, 2025" description="v4.0.0-beta.20">
1028+
[Release
1029+
v4.0.0-beta.20](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.20).
1030+
Updated dependencies with various bug fixes and improvements.
1031+
</Update>
1032+
1033+
<Update label="June 6, 2025" description="v4.0.0-beta.21">
1034+
[Release
1035+
v4.0.0-beta.21](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.21).
1036+
Runtime agnostic SDK config via env vars
1037+
([#2132](https://github.com/triggerdotdev/trigger.dev/pull/2132)) and fixed update command version
1038+
range handling ([#2153](https://github.com/triggerdotdev/trigger.dev/pull/2153)). Resolved issue
1039+
where CLI could get stuck during deploy finalization, unified local and remote build logic with
1040+
multi-platform build support, improved switch command which now accepts profile name as an
1041+
argument, registry configuration is now fully managed by the webapp, the deploy `--self-hosted`
1042+
flag is no longer required, and enhanced deployment error reporting and image digest retrieval
1043+
([#2138](https://github.com/triggerdotdev/trigger.dev/pull/2138)). Updated profile switcher
1044+
([#2150](https://github.com/triggerdotdev/trigger.dev/pull/2150)).
1045+
</Update>
1046+
1047+
<Update label="July 4, 2025" description="v4.0.0-beta.22">
1048+
[Release
1049+
v4.0.0-beta.22](https://github.com/triggerdotdev/trigger.dev/releases/tag/trigger.dev%404.0.0-v4-beta.22).
1050+
Fix update command version mismatch detection
1051+
([#2199](https://github.com/triggerdotdev/trigger.dev/pull/2199)). Add project details to the
1052+
whoami command ([#2231](https://github.com/triggerdotdev/trigger.dev/pull/2231)). Serialize
1053+
metadata to prevent invalid metadata from breaking run completions
1054+
([#2219](https://github.com/triggerdotdev/trigger.dev/pull/2219))
1055+
1056+
This release also includes a new experimental `processKeepAlive` option, which allows you to
1057+
keep the process alive after the run has completed for the next warm start, which makes warm starts even faster.
1058+
1059+
Currently during a warm start, we still recreate the actual task run process between runs, leading to a completely fresh global environment for each run. This experimental option will keep the task run process alive between run executions, leading to even faster warm starts. This option is respected in both the `dev` CLI and in deployed tasks.
1060+
1061+
To enable this option, add this to your `trigger.config.ts`:
1062+
1063+
```ts
1064+
import { defineConfig } from "@trigger.dev/sdk";
1065+
1066+
export default defineConfig({
1067+
project: "<project ref>",
1068+
// This is false by default
1069+
experimental_processKeepAlive: true,
1070+
maxDuration: 60,
1071+
});
1072+
```
1073+
1074+
You can also pass an object to `experimental_processKeepAlive` to provide more options:
1075+
1076+
```ts
1077+
import { defineConfig } from "@trigger.dev/sdk";
1078+
1079+
export default defineConfig({
1080+
project: "<project ref>",
1081+
experimental_processKeepAlive: {
1082+
enabled: true,
1083+
// After 20 runs execute with a single process, we'll restart the process and start fresh
1084+
maxExecutionsPerProcess: 20,
1085+
// In dev, you can combine this option with setting a max pool size, giving you the ability to limit the number of processes created on your local dev machine. Has no effect on deployed tasks
1086+
devMaxPoolSize: 10,
1087+
},
1088+
maxDuration: 60,
1089+
});
1090+
```
1091+
1092+
## Gotchas
1093+
1094+
- Be careful with memory usage and memory leaks, as this will cause memory to persist across run executions.
1095+
- It's possible different tasks get executed in the same persisted process.
1096+
- If you configure any 3rd party SDKs globally using env vars for API keys, those SDKs will not change between runs. So if you change an env var between runs, the SDK will be "stale" and continue using the old env var value. Instead, you should initialize SDKs using env vars at runtime (in any of the lifecycle hooks or inside the `run` function of a task.
1097+
- Cancelling a task will cause the task run process to be restarted. Exiting the process is the only reliable way to actually stop a running function from stopping.
1098+
- This DOES NOT effect cold starts, warm starts only will be improved.
1099+
1100+
We recommend enabling this option and testing in a staging or preview environment before trying it out in prod, as there could be unknown issues depending on what you are doing in your tasks. [#2183](https://github.com/triggerdotdev/trigger.dev/pull/2183)
1101+
1102+
</Update>

0 commit comments

Comments
 (0)