From 38ee296c1cbc1245e5e270a21f66ff5d14c840d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hanu=C5=A1?= Date: Thu, 2 Oct 2025 15:13:17 +0200 Subject: [PATCH 1/3] feat: move restartOnError from Actor to Run options --- src/resource_clients/actor.ts | 4 ++-- src/resource_clients/actor_collection.ts | 1 - src/resource_clients/schedule.ts | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/resource_clients/actor.ts b/src/resource_clients/actor.ts index 195c42b0..9ea896f2 100644 --- a/src/resource_clients/actor.ts +++ b/src/resource_clients/actor.ts @@ -268,7 +268,6 @@ export interface Actor { name: string; username: string; description?: string; - restartOnError?: boolean; isPublic: boolean; isAnonymouslyRunnable?: boolean; createdAt: Date; @@ -305,6 +304,7 @@ export interface ActorDefaultRunOptions { build: string; timeoutSecs: number; memoryMbytes: number; + restartOnError?: boolean; } export interface ActorExampleRunInput { @@ -330,7 +330,6 @@ export type ActorUpdateOptions = Partial< | 'seoTitle' | 'seoDescription' | 'title' - | 'restartOnError' | 'versions' | 'categories' | 'defaultRunOptions' @@ -486,6 +485,7 @@ export interface ActorRunOptions { memoryMbytes: number; diskMbytes: number; maxTotalChargeUsd?: number; + restartOnError?: boolean; } export interface ActorBuildOptions { diff --git a/src/resource_clients/actor_collection.ts b/src/resource_clients/actor_collection.ts index f5f75d20..02aaf4be 100644 --- a/src/resource_clients/actor_collection.ts +++ b/src/resource_clients/actor_collection.ts @@ -76,7 +76,6 @@ export interface ActorCollectionCreateOptions { isDeprecated?: boolean; isPublic?: boolean; name?: string; - restartOnError?: boolean; seoTitle?: string; seoDescription?: string; title?: string; diff --git a/src/resource_clients/schedule.ts b/src/resource_clients/schedule.ts index e3a6fc94..52015333 100644 --- a/src/resource_clients/schedule.ts +++ b/src/resource_clients/schedule.ts @@ -117,6 +117,7 @@ export interface ScheduledActorRunOptions { build: string; timeoutSecs: number; memoryMbytes: number; + restartOnError?: boolean; } export interface ScheduleActionRunActorTask extends BaseScheduleAction { From 3777136a702483fa27f465e49bf3c60921c95b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hanu=C5=A1?= Date: Fri, 3 Oct 2025 15:27:05 +0200 Subject: [PATCH 2/3] feat: deprecate restartOnError instead of removing it --- src/resource_clients/actor.ts | 7 ++++++- src/resource_clients/actor_collection.ts | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/resource_clients/actor.ts b/src/resource_clients/actor.ts index 9ea896f2..478bfbb9 100644 --- a/src/resource_clients/actor.ts +++ b/src/resource_clients/actor.ts @@ -268,6 +268,8 @@ export interface Actor { name: string; username: string; description?: string; + /** @deprecated Moved to defaultRunOptions.restartOnError */ + restartOnError?: boolean; isPublic: boolean; isAnonymouslyRunnable?: boolean; createdAt: Date; @@ -334,7 +336,10 @@ export type ActorUpdateOptions = Partial< | 'categories' | 'defaultRunOptions' | 'actorStandby' - > + > & { + /** @deprecated Moved to defaultRunOptions.restartOnError */ + restartOnError?: boolean; + } >; export interface ActorStandby { diff --git a/src/resource_clients/actor_collection.ts b/src/resource_clients/actor_collection.ts index 02aaf4be..960f838a 100644 --- a/src/resource_clients/actor_collection.ts +++ b/src/resource_clients/actor_collection.ts @@ -76,6 +76,8 @@ export interface ActorCollectionCreateOptions { isDeprecated?: boolean; isPublic?: boolean; name?: string; + /** @deprecated Moved to defaultRunOptions.restartOnError */ + restartOnError?: boolean; seoTitle?: string; seoDescription?: string; title?: string; From e38d0d8daf48a96d49d056623e59f47d1e08fa46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hanu=C5=A1?= Date: Fri, 3 Oct 2025 16:29:41 +0200 Subject: [PATCH 3/3] chore: better wording of deprecation message --- src/resource_clients/actor.ts | 4 ++-- src/resource_clients/actor_collection.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/resource_clients/actor.ts b/src/resource_clients/actor.ts index 478bfbb9..b24b1e4d 100644 --- a/src/resource_clients/actor.ts +++ b/src/resource_clients/actor.ts @@ -268,7 +268,7 @@ export interface Actor { name: string; username: string; description?: string; - /** @deprecated Moved to defaultRunOptions.restartOnError */ + /** @deprecated Use defaultRunOptions.restartOnError instead */ restartOnError?: boolean; isPublic: boolean; isAnonymouslyRunnable?: boolean; @@ -337,7 +337,7 @@ export type ActorUpdateOptions = Partial< | 'defaultRunOptions' | 'actorStandby' > & { - /** @deprecated Moved to defaultRunOptions.restartOnError */ + /** @deprecated Use defaultRunOptions.restartOnError instead */ restartOnError?: boolean; } >; diff --git a/src/resource_clients/actor_collection.ts b/src/resource_clients/actor_collection.ts index 960f838a..43ad2656 100644 --- a/src/resource_clients/actor_collection.ts +++ b/src/resource_clients/actor_collection.ts @@ -76,7 +76,7 @@ export interface ActorCollectionCreateOptions { isDeprecated?: boolean; isPublic?: boolean; name?: string; - /** @deprecated Moved to defaultRunOptions.restartOnError */ + /** @deprecated Use defaultRunOptions.restartOnError instead */ restartOnError?: boolean; seoTitle?: string; seoDescription?: string;