WindmillWWindmill
Powered by
andnessA
Windmill•3y ago•
11 replies
andness

Catching errors

I'm trying out Windmill to run some long running nightly tests, and I'm wondering about how to deal with tests that throw.
- All the tests are run in parallell using "branch to all" with each branch set to skip on failure
- As a result the "suite" as whole thus completes even if one test explodes, good
- But at the end of the run I want to collect all the results to produce a test report
- Each test has a name, and each test should either return "success" or "failure"
- But a test that throws an exception is inconclusive
- I would like to report the failing test alongside the other tests
- But there is no way to get the name of the branch/script that caused the failure (apart from maybe parsing the stack trace which feels a little ugly)

The obvious solution is of course just to wrap the whole body of the test in a try catch and return "inconclusive" when we catch the exception, but I'm curious if there's some feature I'm missing.

I thought maybe I could create a generic failure handler script which would transform the error payload into an inconclusive result and place that after the test, but this won't work since Windmill stops running the branch on failure. Having a global failure handler also won't work since that sits outside of the flow and can't affect the final result.

What I think would work well is an exception handler tied to the script, sort of like a try/catch as a workflow node.
WindmillJoin
3,362Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

Delay in catching docker exit code in bash script
badsequelBbadsequel / help
2y ago
New image causing errors
TonyTTony / help
11mo ago
Errors Deploying and Testing Scripts
dfulton2009Ddfulton2009 / help
8mo ago
Proxmox deployment and OOM(?) errors
StephenSStephen / help
3y ago