Skip to content

refactor(aws): deduplicate resolveTag across 4 service clients into a shared helper #1390

Description

@cristim

#1389 added an identical resolveTag(execID string) string helper (returns execID or "no-exec") to each of 4 service packages (redshift, opensearch, memorydb, elasticache) to drop them under gocyclo 10. That's 4 copies of the same trivial function. Consolidate into one shared helper.

All 4 services already import providers/aws/internal/purchasecfg (verified), so moving resolveTag there (or into providers/aws/internal/tagging if more semantically fitting for a client-token/idempotency tag) needs no new imports and no cycle. Delete the 4 local copies, call the shared one. Behavior identical; existing tests unchanged and green; gocyclo must stay <=10 on the callers. Owner-requested during the merge-driver.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions