Skip to content

fix(#756): answer ACM's DescribeCertificate through a projection, with dates as epoch seconds - #1354

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/756-acm-projection
Oct 3, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/756-acm-projection

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

This is the seventh of ten PRs in #756's 3-line block, and the first of its four fixes. It also lands
#1305's ACM row.

The two defects at one site

describeCertificate answered response{Certificate: ACMCertificate}, the persisted record:

  1. The leak (emulator: substrate bookkeeping fields render as response members AWS does not publish #756). It carried AccountID, Region and ever_tagged, plus Tags. I verified
    today that API_CertificateDetail publishes no Tags: a certificate's tags are read through
    ListTagsForCertificate.
  2. The dates (emulator: ACM, Redshift Data and Firehose render a published Timestamp as RFC3339 where the JSON protocol publishes epoch seconds #1305). CreatedAt, IssuedAt, NotAfter and NotBefore rendered as RFC3339.
    CertificateDetail types all four as Timestamp under awsJson1_1, so a typed SDK could not
    decode DescribeCertificate
    .

It now answers acmCertificateOut from the new emulator/acm_wire.go, which has ten of the published
members, with EpochSeconds dates. The record sets all four dates on every certificate, and it is the
only writer, so none renders as null. The stored record is unchanged. ListCertificates already
answered a three-member summary.

Two tests had pinned the defect

  • emulator/acm_plugin_test.go decoded the response into emulator.ACMCertificate. Its
    time.Time dates accepted the RFC3339 strings a real SDK rejects. It failed with
    cannot unmarshal number into … time.Time once the projection rendered numbers, and it now decodes
    the published members.
  • TestPluginTimeController_EveryDefaultRegistrationCarriesTheSimulatedClock expected ACM's
    CreatedAt as a quoted RFC3339 string, while its ECR and ECS cases beside it already expect epoch
    seconds for the same protocol. The ACM case now matches them. The API Gateway cases in the same test
    still expect RFC3339, which is a separate question and not touched here.

The check's exclusion list

acmCertificateOut.CreatedAt is a published member whose Go name matches a bookkeeping field, so the
check flagged it as new. It joins the exclusion list beside ACMCertificate.CreatedAt, which is the
ecs_wire.go case again: a projection carries every published member, so building one adds an entry
of this kind. The list's header now says that ACM renders correctly, and that Redshift Data and
Firehose are what remain of #1305. shellcheck is clean.

The citation

emulator/acm_wire_test.go drives all eight routed operations:

  • It tags the certificate and reads ever_tagged back first.
  • It requires Certificate to carry no Tags.
  • On a frozen clock it pins CreatedAt/IssuedAt/NotBefore at 1700000000.000, and NotAfter as a
    later number.

Negative controls (each run, then restored)

  1. describeCertificate reverted to the record fails exactly /DescribeCertificate. It names
    $.Certificate.AccountID, .Region and .ever_tagged, so the tag write is not vacuous.
  2. CreatedAt back to time.Time fails the epoch assertion.

The ratchet

before: 319 declared, 261 projected across 108 records, 9 internal across 6 records, 49 still reachable
after:  319 declared, 264 projected across 109 records, 9 internal across 6 records, 46 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 and #1305 stay open. Redshift Data and Firehose remain in #1305, and it gets a comment once
this merges.

…h dates as epoch seconds

describeCertificate handed the persisted ACMCertificate to the caller, so a
consumer read AccountID, Region and ever_tagged, plus Tags, which
API_CertificateDetail does not publish. It also rendered CreatedAt, IssuedAt,
NotAfter and NotBefore as RFC3339 strings where awsJson1_1 publishes numbers
(#1305), so a typed SDK could not decode it.

It now answers emulator/acm_wire.go's acmCertificateOut with EpochSeconds dates.
The stored record is unchanged. The projection's published CreatedAt joins
check-wire-bookkeeping's exclusion list beside the record's.

Two tests pinned the RFC3339 form: acm_plugin_test.go decoded into the stored
record type, and the plugin time-controller test expected a quoted CreatedAt.
Both now read the published shape.

emulator/acm_wire_test.go drives all eight routed operations, tags the
certificate first, and pins the dates on a frozen clock. check-wire-bookkeeping
goes from 261 projected across 108 records to 264 across 109, and from 49 still
reachable to 46.

#756 and #1305 stay open: Redshift Data and Firehose remain in #1305.
@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 14d19c7 into main Oct 3, 2026
18 checks passed
@scttfrdmn
scttfrdmn deleted the fix/756-acm-projection branch October 3, 2026 04:03
scttfrdmn added a commit that referenced this pull request Oct 3, 2026
…tion, with CreateTimestamp as epoch seconds (#1362)

DescribeDeliveryStream answered FirehoseDeliveryStream whole: AccountId and
Region, which API_DeliveryStreamDescription does not publish (#756), and Tags,
which it does not publish either. It also answered CreateTimestamp as an RFC3339
string, which an awsJson1_1 SDK cannot decode (#1305). The new
emulator/firehose_wire.go answers the five published members the record models,
with the date as EpochSeconds. The stored record is unchanged.

emulator/firehose_wire_test.go walks all six routed operations and pins
CreateTimestamp as a number; firehose_plugin_test.go decodes the published shape
rather than the record. check-wire-bookkeeping's #1305 note now records all three
services as fixed. ACM was fixed by #1354, and Redshift Data already rendered
numbers, as #1358's test pins.

check-wire-bookkeeping goes from 290 projected across 124 records to 292 across
125, and from 20 still reachable to 18.

Fixes #1305

#756 stays open.
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