Skip to content

Commit 2052c36

Browse files
committed
Added known issues to upgrade guide, and moved the migration section higher up
1 parent 88f7a1e commit 2052c36

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

docs/upgrade-to-v4.mdx

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,28 @@ See the [AI SDK tool execution options docs](https://sdk.vercel.ai/docs/ai-sdk-c
442442
that implement a `.toJsonSchema()` function.
443443
</Note>
444444

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+
445467
## Installation
446468

447469
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
493515
}
494516
```
495517

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+
496524
## Deprecations
497525

498526
We've deprecated the following APIs:
@@ -714,25 +742,3 @@ We've made a few small changes to the `ctx` object:
714742

715743
- `ctx.attempt.id` and `ctx.attempt.status` have been removed. `ctx.attempt.number` is still available.
716744
- `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
737-
engine, the concurrency will return to normal.
738-
</Warning>

0 commit comments

Comments
 (0)