Files
floci/src/test/java
soreavis 455aa4b80d fix(codepipeline): preserve and manage custom action type tags (#8049)
* fix(codepipeline): preserve and manage custom action type tags

CreateCustomActionType copied its whole request into the stored action
type, so its tags sat inside actionType instead of on the resource, and
the response had no top-level tags. TagResource, UntagResource and
ListTagsForResource only looked up pipeline ARNs, so an actiontype ARN
answered ResourceNotFoundException and a custom action type could not
be tagged.

Keep the tags on the action type's stored item and return them at the
top level of the CreateCustomActionType response, as the API model
does. The three tag operations now resolve an actiontype ARN
(actiontype:Owner/Category/Provider/Version) before falling back to a
pipeline ARN. Action types saved before this change load with no tags.

Fixes #7950

* fix(codepipeline): guard custom action type writes and cap merged tags

CreateCustomActionType checked for an existing type before storing it,
and the tag operations read, edited and stored a type's tag map, all
without a lock. Two creates of one type could both succeed, a tag write
could restore a type deleted meanwhile, and the map was edited in place
while ListTagsForResource and the store serializer iterated it. Create,
delete and tag writes of an action type now share a per-type lock,
pipeline tag writes take the lock pipeline writes already use, and a
tag write stores a new map instead of editing the stored one.

TagResource checked only the size of the incoming tag list, so a
resource with 50 tags accepted a 51st key. It now checks the merged set
and answers TooManyTagsException, for pipelines too; replacing the
value of an existing key at 50 tags still works.
2026-11-11 18:24:45 -04:00
..