turbot / flowpipe

Flowpipe is a cloud scripting engine. Automation and workflow to connect your clouds to the people, systems and data that matters.
https://flowpipe.io
GNU Affero General Public License v3.0
383 stars 16 forks source link

Race condition bug triggered by step failure #630

Closed vhadianto closed 9 months ago

vhadianto commented 9 months ago

Describe the bug This is an intermittent bug.

Sometime this test case: https://github.com/turbot/flowpipe/blob/v0.2.2/internal/es/estest/mod_test.go#L1414

fails, the log is indicating that the step hasn't been retried before a pipeline fail has been raised. What should happen here is the step retry:

    step "http" "bad_http" {
        url = "http://api.google.com/astros.jsons"

        retry {
            if = result.status_code == 404
            max_attempts = 3
        }
    }

should be fully completed before the pipeline fail is raised.

There is a race condition somehwere.

Flowpipe version (flowpipe -v) Example: v0.2.0

vhadianto commented 9 months ago

Events dump from one of the failed run:

551-race-condition.json

vhadianto commented 9 months ago

Fixed with https://github.com/turbot/flowpipe/commit/907ef7d4e96cd0ee95c6d1b29122829d03364aba

Released with v0.2.3