Skip to content

Commit 5ff565c

Browse files
authored
feat: move restartOnError to run options (#1965)
1 parent 4961335 commit 5ff565c

17 files changed

+116
-18
lines changed

apify-api/openapi/components/schemas/actor-tasks/TaskOptions.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ properties:
1313
type: number
1414
nullable: true
1515
example: 128
16+
restartOnError:
17+
type: boolean
18+
nullable: true
19+
example: false

apify-api/openapi/components/schemas/actors/Actor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ properties:
3131
example: My favourite actor!
3232
restartOnError:
3333
type: boolean
34-
nullable: true
3534
example: false
35+
deprecated: true # Use defaultRunOptions.restartOnError instead
3636
isPublic:
3737
type: boolean
3838
example: false

apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ properties:
2727
example: My actor is the best
2828
restartOnError:
2929
type: boolean
30-
nullable: true
3130
example: false
31+
deprecated: true # Use defaultRunOptions.restartOnError instead
3232
versions:
3333
type: array
3434
items:
@@ -46,6 +46,4 @@ properties:
4646
description: ''
4747
nullable: true
4848
defaultRunOptions:
49-
oneOf:
50-
- nullable: true
51-
- $ref: ./DefaultRunOptions.yaml
49+
$ref: ./DefaultRunOptions.yaml

apify-api/openapi/components/schemas/actors/DefaultRunOptions.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ properties:
1414
memoryMbytes:
1515
type: number
1616
example: 2048
17+
restartOnError:
18+
type: boolean
19+
example: false

apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
title: ActUpdate
2-
required:
3-
- name
4-
- isPublic
5-
- versions
62
type: object
73
properties:
84
name:
@@ -29,8 +25,8 @@ properties:
2925
example: My Actor
3026
restartOnError:
3127
type: boolean
32-
nullable: true
3328
example: false
29+
deprecated: true # Use defaultRunOptions.restartOnError instead
3430
versions:
3531
type: array
3632
items:
@@ -47,9 +43,7 @@ properties:
4743
description: ''
4844
nullable: true
4945
defaultRunOptions:
50-
oneOf:
51-
- nullable: true
52-
- $ref: ./DefaultRunOptions.yaml
46+
$ref: ./DefaultRunOptions.yaml
5347
taggedBuilds:
5448
type: object
5549
description: |
@@ -104,3 +98,8 @@ properties:
10498
latest:
10599
buildId: z2EryhbfhgSyqj6Hn
106100
beta: null
101+
required:
102+
- name
103+
- isPublic
104+
- versions
105+

apify-api/openapi/components/schemas/schedules/ScheduleActionsRunOptions.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ properties:
1313
type: number
1414
nullable: true
1515
example: 1024
16+
restartOnError:
17+
type: boolean
18+
nullable: true
19+
example: false

apify-api/openapi/paths/actor-runs/actor-runs@{runId}@resurrect.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ post:
5454
example: 10
5555
description: |
5656
Optional maximum cost of the run, in USD. Used for pay-per-event Actors. The value can only be increased beyond the value specified when the Actor run was started.
57+
- name: restartOnError
58+
in: query
59+
required: false
60+
schema:
61+
type: boolean
62+
example: false
63+
description: |
64+
Determines whether the resurrected run will be restarted if it fails. By default, the resurrected run uses the same setting as before.
5765
responses:
5866
'200':
5967
description: ''

apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,15 @@ post:
476476
type: number
477477
format: double
478478
example: 5
479+
- name: restartOnError
480+
in: query
481+
description: |
482+
Determines whether the run will be restarted if it fails.
483+
style: form
484+
explode: true
485+
schema:
486+
type: boolean
487+
example: false
479488
- name: build
480489
in: query
481490
description: |

apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,15 @@ post:
223223
type: number
224224
format: double
225225
example: 5
226+
- name: restartOnError
227+
in: query
228+
description: |
229+
Determines whether the run will be restarted if it fails.
230+
style: form
231+
explode: true
232+
schema:
233+
type: boolean
234+
example: false
226235
- name: build
227236
in: query
228237
description: |

apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,15 @@ post:
215215
type: number
216216
format: double
217217
example: 5
218+
- name: restartOnError
219+
in: query
220+
description: |
221+
Determines whether the run will be restarted if it fails.
222+
style: form
223+
explode: true
224+
schema:
225+
type: boolean
226+
example: false
218227
- name: build
219228
in: query
220229
description: |

0 commit comments

Comments
 (0)