kestra-io / kestra

:zap: Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere, 500+ plugins. Alternative to Zapier, Rundeck, Camunda, Airflow...
https://kestra.io
Apache License 2.0
13.25k stars 1.15k forks source link

feat(*): exception error from logs #5989

Closed loicmathieu closed 4 days ago

loicmathieu commented 6 days ago

Revert the ErrorMessage and fetch error logs instead.

The design of the error widget must be improved, I'll open a followup issue for that.

Example from a flow failing on a task (note that there is another log prior the failing task): image

Example from a concurrency limit exceeded: image

Example flow with the usage of the new errorLogs() Pebble function:

id: fail
namespace: company.team

tasks:
  - id: fail
    type: io.kestra.plugin.core.execution.Fail

errors:
  - id: errorLogs
    type: io.kestra.plugin.core.log.Log
    message: |
      {%- for log in errorLogs() -%}
          - task: {{ log.taskId }}, message: {{ log.message }}
      {%- endfor -%}
sonarcloud[bot] commented 5 days ago

Quality Gate Failed Quality Gate failed

Failed conditions
78.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud