Skip to content

[Plugin/SDK] Add DeployTargetStatus and extend ExecuteStageResponse#6861

Merged
Warashi merged 2 commits into
pipe-cd:masterfrom
mohammedfirdouss:feat/sdk-deploy-target-status
May 26, 2026
Merged

[Plugin/SDK] Add DeployTargetStatus and extend ExecuteStageResponse#6861
Warashi merged 2 commits into
pipe-cd:masterfrom
mohammedfirdouss:feat/sdk-deploy-target-status

Conversation

@mohammedfirdouss
Copy link
Copy Markdown
Contributor

@mohammedfirdouss mohammedfirdouss commented May 26, 2026

What this PR does:
Adds a DeployTargetStatus type and extends ExecuteStageResponse with a DeployTargetStatuses []DeployTargetStatus field in pkg/plugin/sdk/deployment.go.

type DeployTargetStatus struct {
    Name    string
    Status  StageStatus
    Message string
}

type ExecuteStageResponse struct {
    Status               StageStatus          // unchanged — authoritative result
    DeployTargetStatuses []DeployTargetStatus // new, nil = no per-target detail
}

Why we need it:
Plugins that deploy to multiple clusters in parallel (e.g. kubernetes_multicluster) need to report per-target outcomes alongside the overall stage status. When a stage deploys to N clusters and one fails, operators currently see only "stage failed" with no indication of which cluster. The new field surfaces the per-cluster result.

This change to pkg/plugin/sdk/ will be picked up by the sync bot and propagated to pipe-cd/piped-plugin-sdk-go, after which a new SDK release tag can be cut and PR #6812 can drop its sdk_local/ shim.

Which issue(s) this PR fixes:
Related to #6446. Companion plugin PR: #6812.

Does this PR introduce a user-facing change?:

  • How are users affected: Plugin authors gain an optional field to surface per-target status. Existing plugins require no changes, a nil slice is treated as "no per-target detail reported".
  • Is this breaking change: No, the existing Status field is unchanged.
  • How to migrate: N/A

Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
@mohammedfirdouss mohammedfirdouss requested a review from a team as a code owner May 26, 2026 01:12
@github-actions github-actions Bot added area/go area/plugin-sdk piped-plugin-sdk labels May 26, 2026
@Warashi Warashi merged commit f52e999 into pipe-cd:master May 26, 2026
91 of 93 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for contributing to PipeCD! The changes in this pull request will be part of the upcoming release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants