Skip to content

Conversation

claude[bot]
Copy link
Contributor

@claude claude bot commented Aug 19, 2025

Summary

Adds retry logic using backon to critical sqlx queries in update_flow_status_after_job_completion_internal to handle database pool timeouts and improve workflow reliability.

Changes

  • Added retry logic macro: Created retry_sqlx! macro for consistent retry behavior (3 attempts, 200ms delay)
  • Applied to critical queries:
    • Initial flow status fetch query - prevents function failure on pool timeout
    • Flow jobs results retrieval query - ensures proper job results collection

Technical Details

The implementation focuses on queries outside transactions (safer to retry) and targets the most critical queries that would cause workflow failures. Uses proven retry patterns from existing codebase with minimal invasive changes.

File modified: backend/windmill-worker/src/worker_flow.rs

Impact

  • Improves workflow reliability by handling temporary database connectivity issues
  • Reduces risk of workflow failures due to database pool timeouts
  • Maintains existing functionality while adding resilience

Fixes #6408

Generated with Claude Code

- Add retry logic using backon for critical sqlx queries in update_flow_status_after_job_completion_internal
- Create retry_sqlx! macro for consistent retry behavior (3 attempts, 200ms delay)
- Apply retry logic to:
  - Initial flow status fetch query (prevents function failure on pool timeout)
  - Flow jobs results retrieval query (ensures proper job results collection)
- Improves workflow reliability by handling temporary database connectivity issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Copy link

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: b6b5502
Status: ✅  Deploy successful!
Preview URL: https://de19050e.windmill.pages.dev
Branch Preview URL: https://claude-issue-6408-20250819-0.windmill.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

more resilience to pool timeout in flow update
0 participants