Skip to content

[PipeCD-DataStore] fix: nil pointer dereference in UpdatePluginMetadata#6611

Merged
khanhtc1202 merged 1 commit intopipe-cd:masterfrom
armistcxy:datastore/nil-fix
Mar 23, 2026
Merged

[PipeCD-DataStore] fix: nil pointer dereference in UpdatePluginMetadata#6611
khanhtc1202 merged 1 commit intopipe-cd:masterfrom
armistcxy:datastore/nil-fix

Conversation

@armistcxy
Copy link
Copy Markdown
Contributor

What this PR does: Check if d.MetadataV2.Plugins[pluginName] == nil before accessing it:

  if d.MetadataV2.Plugins[pluginName] == nil {
      d.MetadataV2.Plugins[pluginName] = &model.DeploymentMetadata_KeyValues{}
  }

Why we need it:

Which issue(s) this PR fixes:

Fixes #6610

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Signed-off-by: Hoang Ngo <adlehoang118@gmail.com>
@armistcxy armistcxy requested a review from a team as a code owner March 23, 2026 08:18
Copy link
Copy Markdown
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@khanhtc1202 khanhtc1202 merged commit 6b8204f into pipe-cd:master Mar 23, 2026
45 checks passed
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.

[PipeCD-DataStore] Nil pointer dereference in UpdatePluginMetadata

2 participants