You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/upgrade-to-v4.mdx
+28-22Lines changed: 28 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -442,6 +442,28 @@ See the [AI SDK tool execution options docs](https://sdk.vercel.ai/docs/ai-sdk-c
442
442
that implement a `.toJsonSchema()` function.
443
443
</Note>
444
444
445
+
## How to migrate to v4
446
+
447
+
First read the deprecations, breaking changes, and known issues sections below.
448
+
449
+
We recommend the following steps to migrate to v4:
450
+
451
+
1. Install the v4 package.
452
+
2. Run the `trigger dev` CLI command and test your tasks locally, fixing any breaking changes.
453
+
3. Deploy to the staging environment and test your tasks in staging, fixing any breaking changes. (this step is optional, but highly recommended)
454
+
4. Once you've verified that v4 is working as expected, you should deploy your application backend with the updated v4 package.
455
+
5. Once you've deployed your application backend, you should deploy your tasks to the production environment.
456
+
457
+
Note that between steps 4 and 5, runs triggered with the v4 package will continue using v3, and only new runs triggered after step 5 is complete will use v4.
458
+
459
+
<Warning>
460
+
Once v4 is activated in your environment, there will be a period of time where old runs will
461
+
continue to execute using v3, while new runs will use v4. Because these engines use completely
462
+
different underlying queues and concurrency models, it's possible you may have up to double the
463
+
amount of concurrently executing runs. Once the runs drain from the old run engine, the
464
+
concurrency will return to normal.
465
+
</Warning>
466
+
445
467
## Installation
446
468
447
469
To opt-in to using v4, you will need to update your dependencies to the latest version of the `v4-beta` tag.
@@ -493,6 +515,12 @@ Or you could install the CLI into your `devDependencies` and then use the `trigg
493
515
}
494
516
```
495
517
518
+
## Known issues
519
+
520
+
During the beta we will be releasing regular fixes. Here are the current known issues:
521
+
522
+
- In some cases when using `batchTriggerAndWait` with a queue that has `releaseConcurrencyOnWaitpoint`, the concurrency isn't released when the runs are started.
523
+
496
524
## Deprecations
497
525
498
526
We've deprecated the following APIs:
@@ -714,25 +742,3 @@ We've made a few small changes to the `ctx` object:
714
742
715
743
-`ctx.attempt.id` and `ctx.attempt.status` have been removed. `ctx.attempt.number` is still available.
716
744
-`ctx.task.exportName` has been removed (since we no longer require tasks to be exported to be triggered).
717
-
718
-
## Migrating to the new run engine
719
-
720
-
The new run engine is a complete rewrite of the previous engine, and will automatically be used when you upgrade to the v4 package.
721
-
722
-
We recommend the following steps to migrate to the new run engine:
723
-
724
-
1. Upgrade to the v4 package.
725
-
2. Run the `trigger dev` CLI command and test your tasks locally, fixing any breaking changes.
726
-
3. Deploy to the staging environment and test your tasks in staging, fixing any breaking changes. (this step is optional, but recommended)
727
-
4. Once you've verified that the new run engine is working as expected, you should deploy your application backend with the updated v4 package.
728
-
5. Once you've deployed your application backend, you should deploy your tasks to the production environment.
729
-
730
-
Note that between steps 4 and 5, runs triggered with the v4 package will continue using the previous engine, and only new runs triggered after step 5 is complete will use the new engine.
731
-
732
-
<Warning>
733
-
Once the new run engine is activated, there will be a period of time where old runs will continue
734
-
to execute using the previous engine, while new runs will use the new engine. Because these
735
-
engines use completely different underlying queues and concurrency models, it's possible you may
736
-
have up to double the amount of concurrently executing runs. Once the runs drain from the old run
0 commit comments