Skip to content

test(#756): pin MSK's projections and record them - #1348

Merged
scttfrdmn merged 1 commit into
mainfrom
test/756-msk-wire-projections
Oct 3, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
test/756-msk-wire-projections

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

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

MSKCluster declares AccountID, Region and CreatedAt, none under ,omitempty. None of them
reaches a body:

  • Every cluster response is rendered through mskClusterInfoWire (msk_types.go) or its V2
    counterpart, which copy published members only.
  • CreatedAt surfaces only as the published creationTime.

The date format is correct as it is. creationTime renders as an ISO-8601 string. MSK speaks
restJson1, whose default body timestamp would be epoch seconds, but I checked the MSK API reference
today and DescribeClusterResponse documents "creationTime": "string". So unlike CodeBuild or
CodePipeline in #1338, there is nothing to convert here.

What the new test asserts

TestMSKWire_ClusterResponsesCarryNoBookkeepingMember joins the existing
emulator/msk_wire_test.go, alongside the member-casing tests from #529. It uses the shared
wireAssertNoMemberJSON and drives all nine routed operations across both API generations:

  • V1: Create, Describe, List, GetBootstrapBrokers, ListNodes and Delete.
  • V2: Create, Describe and List.

It reads all three members back from the stored record first.

Negative control (run, then restored; msk_types.go verified diff-free)

Adding accountID to mskClusterInfoOut failed exactly DescribeCluster and ListClusters, which
are the two sites that render through that projection. CreateCluster answers a two-member map, and
the V2 reads use their own projection.

The ratchet

before: 319 declared, 249 projected across 104 records, 9 internal across 6 records, 61 still reachable
after:  319 declared, 252 projected across 105 records, 9 internal across 6 records, 58 still reachable

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.

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

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 5edc7ce into main Oct 3, 2026
18 checks passed
@scttfrdmn
scttfrdmn deleted the test/756-msk-wire-projections branch October 3, 2026 02:45
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