Skip to content

Commit f92d82f

Browse files
committed
store default retry config if none set on task
1 parent 0b39a4c commit f92d82f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/cli-v3/src/entryPoints/deploy-index-worker.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,20 @@ const { buildManifest, importErrors, config } = await bootstrap();
9999

100100
let tasks = taskCatalog.listTaskManifests();
101101

102+
// If the config has retry defaults, we need to apply them to all tasks that don't have any retry settings
103+
if (config.retries?.default) {
104+
tasks = tasks.map((task) => {
105+
if (!task.retry) {
106+
return {
107+
...task,
108+
retries: config.retries?.default,
109+
};
110+
}
111+
112+
return task;
113+
});
114+
}
115+
102116
// If the config has a machine preset, we need to apply it to all tasks that don't have a machine preset
103117
if (typeof config.machine === "string") {
104118
tasks = tasks.map((task) => {

0 commit comments

Comments
 (0)