Skip to content

fix(glue): rename the Crawler DynamoDB scan members and the Iceberg table input to their SDK spellings - #1409

Merged
go-to-k merged 2 commits into
mainfrom
fix/1390-1391-glue-nested-keys
Aug 9, 2026
Merged

fix(glue): rename the Crawler DynamoDB scan members and the Iceberg table input to their SDK spellings#1409
go-to-k merged 2 commits into
mainfrom
fix/1390-1391-glue-nested-keys

Conversation

@go-to-k

@go-to-k go-to-k commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Two GlueProvider sites forwarded a CFn blob raw where the SDK model diverges. The AWS SDK v3 serializer drops unknown members, so the values silently never reached AWS while the call reported success.

Issue CFn key SDK member Effect
#1391 Targets.DynamoDBTargets[].ScanAll / .ScanRate scanAll / scanRate scan tuning lost; the target itself survived (matched by Path)
#1390 OpenTableFormatInput.IcebergInput.IcebergTableInput IcebergInput.CreateIcebergTableInput the entire Iceberg table spec (Location / Schema / PartitionSpec / WriteOrder / Properties) discarded

What changed

  • Crawler. The SDK's DynamoDBTarget is a lowercase island in an otherwise-PascalCase model — Path is PascalCase but the scan-tuning members are not. Converted on create and update, with the inverse applied in readCurrentState so drift no longer reports a phantom ScanRate removal plus scanRate addition. The other seven CrawlerTargets sub-types were audited against the SDK model and match CFn key-for-key (MongoDBTarget.ScanAll genuinely IS PascalCase) — recorded in a comment so the audit is not repeated.

  • Table. A single key rename; the renamed object's own members match CFn 1:1. The stale "maps 1:1 to the SDK type (same PascalCase)" comment is corrected, as is the vague UpdateTable claim beside it: UpdateTableRequest has no OpenTableFormatInput member at all — it carries the different, update-only UpdateOpenTableFormatInput shape that CFn does not model.

  • Retry patterns (2 new). Adding a DynamoDB crawler target makes CreateCrawler eagerly call dynamodb:DescribeTable as the crawler role, which turns the fixture into a sensitive probe of IAM propagation. It surfaced two AWS wordings of that race that cdkd did not retry, each failing the deploy outright:

    • Service is unable to assume the role <arn> to access null. Please verify the role's TrustPolicy. — the existing entry is anchored on is unable to assume provided role, which does not match the role <arn>.
    • The security token included in the request is invalid. (Service: AmazonDynamoDBv2; ... UnrecognizedClientException) — Glue assumed the fresh role and the resulting session's token was not valid yet. This one became deterministic once the crawler was correctly ordered after the role and its policy, and adding the pattern is what turned a reproducible failure into a clean pass.

    The second pattern is anchored on the Java-SDK (Service: trailer, which is load-bearing: that trailer appears only on a SERVICE-wrapped error, so the developer's own expired SSO session (same sentence, JS SDK, no trailer) still fails fast instead of burning ~48s of retries. A dedicated negative test pins that.

  • Numeric + boolean coercion. toSdkCrawlerTargets is now the wire boundary for Targets, and CFn is stringly typed, so ScanRate: "0.9" was being forwarded verbatim to a double member. Both members are coerced per the repo convention — ScanAll: "false" matters more, since the raw string is TRUTHY and would silently invert the setting. Unparseable input passes through so AWS surfaces the real validation error.

Test plan

Known gaps (reviewer-surfaced, deliberately not widened into this PR)

  • AWS::Glue::Crawler / ::Table are not in NESTED_KEY_TARGETS. Both bugs are textbook case-divergence / no-sdk-member hits for the nested-key critic, so unit tests are the only mechanical guard here. Adding them needs a CFn-schema fixture re-capture (nestedProperties / definitionShapes), which is the critic-target expansion tracked in (audit: nested-key critic blind spots found by the 0809 sweep — mixed-case SDK models, file-global literal heuristic, missing targets, selective sub-key forwards #1393).
  • Stringly-typed drift. A hand-written ScanRate: "0.9" is now coerced on the wire, but state still records the string while readCurrentState returns the number — a phantom-drift class that pre-dates this PR and affects the provider generally.
  • The update phase's scanAll: true matches AWS's own default, so scanRate: 1.2 is what carries the regression signal for that phase. Noted in a comment at the assertion; the create phase asserts the drop-proof false / 0.9 pair and fails first regardless.

Follow-ups

Closes #1391
Closes #1390

…able input to their SDK spellings

Both providers forwarded a CFn blob raw where the SDK model diverges, and the
AWS SDK v3 serializer drops unknown members, so the values silently never
reached AWS while the call reported success.

Crawler (#1391): the SDK DynamoDBTarget is a lowercase island in an otherwise
PascalCase model -- Path is PascalCase but the scan-tuning members are scanAll
and scanRate, while CFn spells them ScanAll / ScanRate. The target itself
survived (matched by Path); only the scan tuning was lost. Converted on create
and update, with the inverse applied in readCurrentState so drift no longer
reports a phantom ScanRate removal plus scanRate addition. The other seven
CrawlerTargets sub-types were audited against the SDK model and match CFn
key-for-key (MongoDBTarget.ScanAll IS PascalCase) -- recorded in a comment so
the audit is not repeated.

Table (#1390): CFn OpenTableFormatInput.IcebergInput.IcebergTableInput is the
SDK's IcebergInput.CreateIcebergTableInput, so the entire Iceberg table spec
(Location / Schema / PartitionSpec / WriteOrder / Properties) was discarded.
The renamed object's own members match CFn 1:1, so a single key rename suffices.
The stale "maps 1:1 to the SDK type (same PascalCase)" comment is corrected, as
is the vague UpdateTable claim next to it: UpdateTableRequest has no
OpenTableFormatInput member at all; it carries the different, update-only
UpdateOpenTableFormatInput shape that CFn does not model.

Closes #1391
Closes #1390
@go-to-k
go-to-k force-pushed the fix/1390-1391-glue-nested-keys branch from d4994a7 to 90c9912 Compare August 9, 2026 06:39
…able input to their SDK spellings

Both providers forwarded a CFn blob raw where the SDK model diverges, and the
AWS SDK v3 serializer drops unknown members, so the values silently never
reached AWS while the call reported success.

Crawler (#1391): the SDK DynamoDBTarget is a lowercase island in an otherwise
PascalCase model -- Path is PascalCase but the scan-tuning members are scanAll
and scanRate, while CFn spells them ScanAll / ScanRate. The target itself
survived (matched by Path); only the scan tuning was lost. Converted on create
and update, with the inverse applied in readCurrentState so drift no longer
reports a phantom ScanRate removal plus scanRate addition. The other seven
CrawlerTargets sub-types were audited against the SDK model and match CFn
key-for-key (MongoDBTarget.ScanAll IS PascalCase) -- recorded in a comment so
the audit is not repeated.

Table (#1390): CFn OpenTableFormatInput.IcebergInput.IcebergTableInput is the
SDK's IcebergInput.CreateIcebergTableInput, so the entire Iceberg table spec
(Location / Schema / PartitionSpec / WriteOrder / Properties) was discarded.
The renamed object's own members match CFn 1:1, so a single key rename suffices.
The stale "maps 1:1 to the SDK type (same PascalCase)" comment is corrected, as
is the vague UpdateTable claim next to it: UpdateTableRequest has no
OpenTableFormatInput member at all; it carries the different, update-only
UpdateOpenTableFormatInput shape that CFn does not model.

Also adds a second AWS wording to the Glue assume-role IAM-propagation retry
patterns. The existing entry is anchored on "is unable to assume provided
role", but the same race also surfaces as "Service is unable to assume the role
<arn> to access null. Please verify the role's TrustPolicy." -- hit live on this
PR's own integ run once the crawler role gained an extra inline policy, where it
failed the deploy outright instead of retrying.

The glue-update-hardening fixture now carries a DynamoDB crawler target with
non-default scan tuning (AWS defaults ScanAll to true and stores ScanRate as
null when unset, so a default echo cannot satisfy the assertion), asserted after
create and again after the UPDATE phase with a second distinct pair.

Closes #1391
Closes #1390
@go-to-k
go-to-k force-pushed the fix/1390-1391-glue-nested-keys branch from 90c9912 to 7c23dec Compare August 9, 2026 06:55
@go-to-k
go-to-k merged commit ffef506 into main Aug 9, 2026
6 checks passed
@go-to-k
go-to-k deleted the fix/1390-1391-glue-nested-keys branch August 9, 2026 06:59
github-actions Bot pushed a commit that referenced this pull request Aug 9, 2026
## [0.278.8](v0.278.7...v0.278.8) (2026-08-09)

### Bug Fixes

* **glue:** rename the Crawler DynamoDB scan members and the Iceberg table input to their SDK spellings ([#1409](#1409)) ([ffef506](ffef506))
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.278.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

1 participant