-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Pr 3220 fix #3339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pr 3220 fix #3339
Changes from all commits
d763cb8
0fba878
6bc752c
ca30dbd
0d361c8
fd2f823
45c7318
3993730
64c0271
838be18
05024a2
587deb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@trigger.dev/core": minor | ||
| --- | ||
|
|
||
| Define RunEvent schema and update ApiClient to use it |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| "@trigger.dev/core": patch | ||
| --- | ||
|
|
||
| fix(core): define RunEvent schema and update ApiClient validation | ||
|
|
||
| Defines proper RunEvent schema with Zod validation and updates ApiClient to use the new schema for improved type safety and runtime validation. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ import { | |
| EnvironmentVariableResponseBody, | ||
| EnvironmentVariableWithSecret, | ||
| ListQueueOptions, | ||
| ListRunEventsResponse, | ||
| ListRunResponseItem, | ||
| ListScheduleOptions, | ||
| QueueItem, | ||
|
|
@@ -44,6 +45,7 @@ import { | |
| RetrieveQueueParam, | ||
| RetrieveRunResponse, | ||
| RetrieveRunTraceResponseBody, | ||
| RunEvent, | ||
| ScheduleObject, | ||
| SendInputStreamResponseBody, | ||
| StreamBatchItemsResponse, | ||
|
|
@@ -702,7 +704,7 @@ export class ApiClient { | |
|
|
||
| listRunEvents(runId: string, requestOptions?: ZodFetchOptions) { | ||
| return zodfetch( | ||
| z.any(), // TODO: define a proper schema for this | ||
| ListRunEventsResponse, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚩 Schema tightening from z.any() to ListRunEventsResponse may strip fields from API response The change from Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| `${this.baseUrl}/api/v1/runs/${runId}/events`, | ||
| { | ||
| method: "GET", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Removal of S2 read session timeout allows CLI to hang indefinitely
The old code had
stop: { waitSecs: 60 * 20 }which provided a 20-minute safety timeout for the S2 read session. This PR removes it entirely. Thefor await (const record of readSession)loop atpackages/cli-v3/src/commands/deploy.ts:1175will now block indefinitely if nofinalizedevent is ever emitted (e.g., build server crashes, stream infrastructure issues, or any scenario where the deployment process hangs without producing a terminal event). TheabortControlleris only triggered upon receiving afinalizedevent (packages/cli-v3/src/commands/deploy.ts:1227), so without the server-side timeout, there is no fallback to break the loop.Was this helpful? React with 👍 or 👎 to provide feedback.