Skip to content

Add support for configurable Plan Preview behavior in piped#6646

Open
rawadhossain wants to merge 1 commit intopipe-cd:masterfrom
rawadhossain:feat/plan-preview-config
Open

Add support for configurable Plan Preview behavior in piped#6646
rawadhossain wants to merge 1 commit intopipe-cd:masterfrom
rawadhossain:feat/plan-preview-config

Conversation

@rawadhossain
Copy link
Copy Markdown
Contributor

@rawadhossain rawadhossain commented Apr 5, 2026

What this PR does:
Adds a configurable planPreview section to piped config (PipedSpec in both pkg/config and pkg/configv1).

These values are validated and then passed to planpreview.NewHandler using existing options:

  • WithWorkerNum
  • WithCommandQueueBufferSize
  • WithCommandCheckInterval
  • WithCommandHandleTimeout

The configuration is applied in both piped entrypoints (pkg/app/piped/cmd/piped and pkg/app/pipedv1/cmd/piped).

Also includes tests to ensure:

  • YAML parsing works correctly
  • Invalid (negative) values fail validation

Why we need it:
Currently plan preview behavior can only be tuned internally (mainly in tests).
This change allows to configure things like worker count, queue size, and timing directly from piped config.

Fixes Issue #5916

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
    • Users can optionally add a spec.planPreview block in piped YAML:
      • workerNum
      • commandQueueBufferSize
      • commandCheckInterval
      • commandHandleTimeout (duration format like 5s, 10m)
    • If not provided, existing default behavior remains unchanged
  • Is this breaking change: No
  • How to migrate (if breaking change): N/A

Signed-off-by: Rawad Hossain <rawad.hossain00@gmail.com>
@rawadhossain rawadhossain force-pushed the feat/plan-preview-config branch from e800fa1 to 5db24c9 Compare April 5, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant