Skip to content

Add sidecar execution, step timeout, and retry support#6

Merged
vdemeester merged 3 commits intomainfrom
feature/sidecar-timeout
Feb 4, 2026
Merged

Add sidecar execution, step timeout, and retry support#6
vdemeester merged 3 commits intomainfrom
feature/sidecar-timeout

Conversation

@vdemeester
Copy link
Copy Markdown
Owner

Summary

  • Sidecar execution: Sidecars run as Dagger services alongside task steps, accessible by name as hostname
  • Step timeout: Steps can specify timeout using Go duration format (30s, 5m, 1h30m)
  • Step retry: Steps can specify retries: N for automatic retry on failure

Changes

Sidecar Support

  • New pkg/executor/sidecar.go with startSidecars() and bindSidecarsToContainer()
  • Sidecars are started before steps and bound via Dagger's WithServiceBinding
  • Example: examples/simple/sidecar-pipelinerun.yaml

Timeout Support

  • New pkg/executor/timeout.go with parseTimeout() helper
  • Added Timeout field to types.Step and parser
  • Uses context.WithTimeout for step cancellation
  • Example: examples/simple/timeout-pipelinerun.yaml

Retry Support

  • New pkg/executor/retry.go with executeWithRetry() helper
  • Added Retries field to types.Step and parser
  • Logs warning when retries exhausted
  • Example: examples/simple/retry-pipelinerun.yaml

Test plan

  • All existing tests pass
  • New unit tests for sidecar config building
  • New unit tests for timeout parsing
  • New unit tests for retry logic
  • Integration test with sidecar example
  • Integration test with timeout example

🤖 Generated with Claude Code

vdemeester and others added 3 commits February 4, 2026 14:53
Sidecars run as Dagger services alongside task steps:
- Start before steps execute
- Accessible by name as hostname (e.g., redis:6379)
- Run concurrently with all steps in the task

Uses Dagger's WithServiceBinding for network connectivity
between step containers and sidecar services.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Steps can now specify a timeout using Go duration format:
- timeout: "30s" - 30 second timeout
- timeout: "5m" - 5 minute timeout
- timeout: "1h30m" - 1 hour 30 minute timeout

Uses context.WithTimeout to cancel step execution if the
timeout is exceeded. Invalid or negative timeouts return
an error before execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Steps can now specify a retry count for automatic retries on failure:
- retries: 2 - retry up to 2 times (3 total attempts)
- retries: 0 - no retries (default)

Uses executeWithRetry helper for clean retry logic. Logs a warning
when step fails after all retries are exhausted.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vdemeester vdemeester merged commit 36777df into main Feb 4, 2026
3 checks passed
@vdemeester vdemeester deleted the feature/sidecar-timeout branch February 4, 2026 14:06
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.

1 participant