Repository navigation
fix(#756): pin ElastiCache's projection and report the published creation times - #1312
Merged
Merged
Conversation
…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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
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,ElastiCacheCacheSubnetGroupandElastiCacheCacheParameterGroupdeclareAccountIDandRegion, two declareCreatedAtand onedeclares
EverTagged. All twelve sites that answer a resource hand a…ToXMLitem struct toelasticacheXMLResponse, so the lines were reachable-by-declaration with nothing pinning them shut.223 still reachable → 212.
scripts/check-wire-bookkeeping.shnow reports319 declared, 107 projected across 40 records, 212 still reachable.What changed
emulator/elasticache_wire.go—xmlEndpointItem, the four item structs and the fourconverters, moved out of
elasticache_plugin.go, plus the preamble recording why the baselinelines stay (
ecr_wire.go's replay rule), whyAccountID/Regionhave no published home on anyof 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_taggedstamp on replication groups.
CacheClusterCreateTime(API_CacheCluster) andReplicationGroupCreateTime(API_ReplicationGroup), bothType: Timestamp, Required: No.Substrate held the value and reported it nowhere.
*time.TimeviaelasticacheTimeOrNil, so azero time is omitted rather than rendered
0001-01-01T00:00:00Z— reachable through eitherdelete's undecodable-JSON fallback.
API_CacheSubnetGroupandAPI_CacheParameterGrouppublishno creation time, so nothing was added to those two.
emulator/elasticache_wire_test.go— four tests, one per record, each driving every sitethat 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→xmlCacheParameterGroupItemwhile moving, matching its publishedshape name as the other three already did. File-private.
scripts/wire-bookkeeping-projected.txt, notes on the twelve record-answering rowsin
docs/services.mdplus the house "Responses are rendered from the published shape." block,and a
CHANGELOG.mdentry.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. Thefour 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.AccountID,Region,CreatedAtandever_taggedinto all fouritem structs and projecting them from the records failed every one of the 12 sites, confirmed
per-action rather than per-test. Restored from backup.
elasticache_wire.go.Compatibility
A consumer reading
CacheClusterorReplicationGroupsees one new member where it previously sawnone. Nothing is removed or renamed on the wire, and no stored record changes, so a recorded run
replays from unchanged state.
Refs #756