Skip to content

fix: pass nil tags when task definition has no tags#44

Merged
teaguru merged 1 commit into
masterfrom
fix/empty-tags-register-task-definition
Jun 24, 2026
Merged

fix: pass nil tags when task definition has no tags#44
teaguru merged 1 commit into
masterfrom
fix/empty-tags-register-task-definition

Conversation

@teaguru

@teaguru teaguru commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

AWS rejects RegisterTaskDefinition with an empty Tags slice ("Tags can not be empty"). #43 passed describeResult.Tags directly, which is an empty slice for untagged task definitions rather than nil. The SDK treats nil (omit the field) and []Tag{} (empty list) differently.

Add nilIfEmpty() helper that converts an empty slice to nil so untagged task definitions continue to work, while tagged task definitions still propagate their tags correctly.

@teaguru teaguru requested a review from alexbell708 June 24, 2026 04:59
AWS rejects RegisterTaskDefinition with an empty Tags slice ("Tags can
not be empty"). #43 passed describeResult.Tags directly, which is an
empty slice for untagged task definitions rather than nil. The SDK
treats nil (omit the field) and []Tag{} (empty list) differently.

Add nilIfEmpty() helper that converts an empty slice to nil so untagged
task definitions continue to work, while tagged task definitions still
propagate their tags correctly.
@teaguru teaguru force-pushed the fix/empty-tags-register-task-definition branch from 8809160 to 4ba9096 Compare June 24, 2026 21:35
@teaguru teaguru enabled auto-merge (squash) June 24, 2026 21:45
@teaguru teaguru disabled auto-merge June 24, 2026 21:57
@teaguru teaguru merged commit b1149a4 into master Jun 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants