Repository navigation
test(#756): pin MSK's projections and record them - #1348
Merged
Merged
Conversation
MSKCluster declares AccountID, Region and CreatedAt, and none reaches a response: every cluster response is rendered through mskClusterInfoWire or its V2 counterpart, which copy published members only, and CreatedAt surfaces only as the published creationTime, an ISO-8601 string as MSK's reference documents. A new test in emulator/msk_wire_test.go drives all nine routed operations across both API generations, reading every member back from the stored record first. check-wire-bookkeeping goes from 249 projected across 104 records to 252 across 105, and from 61 still reachable to 58. #756 stays open.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 tasks done
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.
This is the third of ten PRs in #756's 3-line block. It is citation only: no production code
changes.
MSK is already projected
MSKClusterdeclaresAccountID,RegionandCreatedAt, none under,omitempty. None of themreaches a body:
mskClusterInfoWire(msk_types.go) or its V2counterpart, which copy published members only.
CreatedAtsurfaces only as the publishedcreationTime.The date format is correct as it is.
creationTimerenders as an ISO-8601 string. MSK speaksrestJson1, whose default body timestamp would be epoch seconds, but I checked the MSK API referencetoday and
DescribeClusterResponsedocuments"creationTime": "string". So unlike CodeBuild orCodePipeline in #1338, there is nothing to convert here.
What the new test asserts
TestMSKWire_ClusterResponsesCarryNoBookkeepingMemberjoins the existingemulator/msk_wire_test.go, alongside the member-casing tests from #529. It uses the sharedwireAssertNoMemberJSONand drives all nine routed operations across both API generations:It reads all three members back from the stored record first.
Negative control (run, then restored;
msk_types.goverified diff-free)Adding
accountIDtomskClusterInfoOutfailed exactlyDescribeClusterandListClusters, whichare the two sites that render through that projection.
CreateClusteranswers a two-member map, andthe V2 reads use their own projection.
The ratchet
Verification
All of these pass:
make lint: 0 issues.make test: race,-count=1.docs-reference-check docs-versions version-check discarded-unmarshal-check wire-bookkeeping-check operation-catalog-check operation-docs-check.#756 stays open.