Skip to content

fix(#756): pin ElastiCache's projection and report the published creation times - #1312

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/756-elasticache-wire-projection
Oct 1, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/756-elasticache-wire-projection

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

ElastiCache is RDS's sibling on #756's AC3 and was in the same position #1311 found RDS in: it
already answered every resource through a separate item struct rather than encoding its records,
so none of the eleven bookkeeping fields its four records declare could reach a body — and nothing
asserted that. This adds the assertion and moves the rendering layer out of the plugin.

ElastiCacheCacheCluster, ElastiCacheReplicationGroup, ElastiCacheCacheSubnetGroup and
ElastiCacheCacheParameterGroup declare AccountID and Region, two declare CreatedAt and one
declares EverTagged. All twelve sites that answer a resource hand a …ToXML item struct to
elasticacheXMLResponse, so the lines were reachable-by-declaration with nothing pinning them shut.

223 still reachable → 212. scripts/check-wire-bookkeeping.sh now reports
319 declared, 107 projected across 40 records, 212 still reachable.

What changed

  • New emulator/elasticache_wire.go — xmlEndpointItem, the four item structs and the four
    converters, moved out of elasticache_plugin.go, plus the preamble recording why the baseline
    lines stay (ecr_wire.go's replay rule), why AccountID/Region have no published home on any
    of the four shapes, which absences are DynamoDB: DescribeTable and CreateTable report Tags and TTLAttribute, which TableDescription does not have #1013 rather than choices, and the inert ever_tagged
    stamp on replication groups.
  • Two creation times now reported. CacheClusterCreateTime (API_CacheCluster) and
    ReplicationGroupCreateTime (API_ReplicationGroup), both Type: Timestamp, Required: No.
    Substrate held the value and reported it nowhere. *time.Time via elasticacheTimeOrNil, so a
    zero time is omitted rather than rendered 0001-01-01T00:00:00Z — reachable through either
    delete's undecodable-JSON fallback. API_CacheSubnetGroup and API_CacheParameterGroup publish
    no creation time, so nothing was added to those two.
  • New emulator/elasticache_wire_test.go — four tests, one per record, each driving every site
    that answers it, comparing the body's whole set of element paths against the published set.
    fix(#756): pin RDS's projection and report the published creation time #1311's technique reused: equality rather than named absences, so it cannot go vacuous, and a
    member at the wrong depth fails too.
  • xmlCacheParamGroupItem → xmlCacheParameterGroupItem while moving, matching its published
    shape name as the other three already did. File-private.
  • Four rows in scripts/wire-bookkeeping-projected.txt, notes on the twelve record-answering rows
    in docs/services.md plus the house "Responses are rendered from the published shape." block,
    and a CHANGELOG.md entry.

Provenance

Every member name and its Required: status comes from the AWS API reference, read 2026-09-30:
API_CacheCluster, API_ReplicationGroup, API_CacheSubnetGroup, API_CacheParameterGroup. The
four were checked member-by-member for an account or Region member; none publishes one. No error
code is introduced or changed.

Verification

  • make lint — 0 issues; make test (race, -count=1) — green.
  • make docs-reference-check docs-versions version-check discarded-unmarshal-check wire-bookkeeping-check operation-catalog-check operation-docs-check — all pass.
  • Negative control: injecting AccountID, Region, CreatedAt and ever_tagged into all four
    item structs and projecting them from the records failed every one of the 12 sites, confirmed
    per-action rather than per-test. Restored from backup.
  • 100% statement coverage on elasticache_wire.go.

Compatibility

A consumer reading CacheCluster or ReplicationGroup sees one new member where it previously saw
none. Nothing is removed or renamed on the wire, and no stored record changes, so a recorded run
replays from unchanged state.

Refs #756

…tion times

ElastiCache was already answering every resource through an item struct rather
than encoding its records, as RDS was at #1311: its four records declare eleven
bookkeeping fields and not one could reach a body. What was missing was the
assertion that this holds, so this adds elasticache_wire_test.go and moves the
rendering layer into elasticache_wire.go. 223 still reachable -> 212.

Writing the assertion settled one divergence: substrate stamped a creation
instant on the cache cluster and the replication group and reported it on
neither, though API_CacheCluster publishes CacheClusterCreateTime and
API_ReplicationGroup publishes ReplicationGroupCreateTime. Both are now
reported, as pointers so a zero time is omitted rather than rendered as the
year-one instant.

Neither AccountID nor Region has a published home on any of the four shapes;
all four publish ARN, from which a caller recovers both.

Refs #756
@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
emulator/elasticache_plugin.go 77.77% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit b08f389 into main Oct 1, 2026
18 checks passed
@scttfrdmn
scttfrdmn deleted the fix/756-elasticache-wire-projection branch October 1, 2026 04:27
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.

1 participant