Fix panic when Lambda manifest has no tags defined#6215
Merged
Conversation
Signed-off-by: ucpr <contact@ucpr.dev>
2472b94 to
18ca3c2
Compare
t-kikuc
approved these changes
Sep 10, 2025
Member
t-kikuc
left a comment
There was a problem hiding this comment.
Thank you so much!
- the panic point is here (
Tags): - ✅ the code location:
loadFunctionManifest()seems better than inpovider.LoadFunctionManifest()because the latter one does not need to know the default value ofTags. - ✅ This default value does not affect other codes including
updateTagsConfig()because currently the case of nil tags is not handled, and handling it as a empty map like this PR is correct.
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:
Fix panic when deploying Lambda functions with manifests that don't have tags defined in the spec.
Why we need it:
According to the PipeCD documentation, the
tagsfield is optional in Lambda function manifests ("Except the tags and the environments field, all others are required fields for the deployment to run").However, the current implementation assumes that the
tagsfield always exists, causing a panic with "assignment to entry in nil map" error when it's not defined.Example manifest that causes the panic:
Piped (v0.52.2) error log:
This prevents successful deployment of Lambda functions that don't explicitly define tags in their manifests, despite tags being an optional field per the specification.
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?:
tagsfield in their function manifests. The deployment will nolonger panic and PipeCD management tags will be properly added.