Fix empty dts panic - #7116
Open
vishnukothakapu wants to merge 1 commit into
Open
Conversation
vishnukothakapu
force-pushed
the
fix-empty-dts-panic
branch
from
August 3, 2026 18:10
ec6f4e4 to
56cc827
Compare
vishnukothakapu
force-pushed
the
fix-empty-dts-panic
branch
from
August 3, 2026 18:10
56cc827 to
e6c20a6
Compare
Signed-off-by: Vishnu Kothakapu <vishnukothakapu27@gmail.com>
vishnukothakapu
force-pushed
the
fix-empty-dts-panic
branch
from
August 3, 2026 18:11
e6c20a6 to
e1f0fcd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
Adds validation for empty
DeployTargetsacross multiplepipedv1stage plugins to prevent index out-of-bounds panics when accessingdts[0]. It also fixes a bug in the SDK whereStagePluginServiceServer.ExecuteStagepassednilfor deploy targets instead of correctly parsing them.Why we need it:
If a user misconfigures their application with an empty targets list, or if the SDK fails to pass the targets properly, affected plugins (Terraform deployment, ECS plan preview, and Kubernetes plan preview) would experience an unhandled panic and crash the process during the execution or plan preview stages. These checks ensure the plugins return a clean failure status with a descriptive log message instead.
Which issue(s) this PR fixes:
Fixes #7115
Does this PR introduce a user-facing change?:
No. This is purely an internal bug fix and adds protective checks to prevent unhandled panics.
Users with misconfigured deploy targets will now see a descriptive failure log in the PipeCD UI instead of the plugin crashing silently or hanging.
No.
N/A