pixeleet
pixeleet6mo ago

Did something change in for loops?

Retries seem to be not triggered on failing for-loops anymore.
6 Replies
pixeleet
pixeleet6mo ago
@rubenf here's a repro
summary: "[BUG] No retries in for loops"
description: ""
value:
modules:
- id: b
value:
type: forloopflow
modules:
- id: c
value:
type: rawscript
content: |
// import * as wmill from "npm:windmill-client@1.336.1"

export async function main(x: string) {
console.log(x)
const shouldFail = Math.random() < 0.6;
if (shouldFail) { throw new Error("boom") }
return x
}
language: deno
input_transforms:
x:
type: javascript
value: ${flow_input.iter.value}
expr: "`${flow_input.iter.value}`"
continue_on_error: false
retry:
constant:
attempts: 5
seconds: 5
iterator:
expr: return new Array(5).fill(0).map((_, i) => i+1)
type: javascript
parallel: true
parallelism: 10
skip_failures: true
schema:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
order: []
properties: {}
required: []
summary: "[BUG] No retries in for loops"
description: ""
value:
modules:
- id: b
value:
type: forloopflow
modules:
- id: c
value:
type: rawscript
content: |
// import * as wmill from "npm:windmill-client@1.336.1"

export async function main(x: string) {
console.log(x)
const shouldFail = Math.random() < 0.6;
if (shouldFail) { throw new Error("boom") }
return x
}
language: deno
input_transforms:
x:
type: javascript
value: ${flow_input.iter.value}
expr: "`${flow_input.iter.value}`"
continue_on_error: false
retry:
constant:
attempts: 5
seconds: 5
iterator:
expr: return new Array(5).fill(0).map((_, i) => i+1)
type: javascript
parallel: true
parallelism: 10
skip_failures: true
schema:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
order: []
properties: {}
required: []
rubenf
rubenf6mo ago
Thanks for the repro, I agree the behavior is surprising
pixeleet
pixeleet6mo ago
I have a bunch of scrapers that just die for no good reason and supposed to be restarted. Happy to open a pr if you tell me where to look.
rubenf
rubenf6mo ago
I know what the issue is it's fixed on very latest
pixeleet
pixeleet6mo ago
ping me pls when you cut a new helm release