Skip to content

fix(emr): rename ConfigurationProperties / StepProperties to the SDK Properties member - #1399

Merged
go-to-k merged 3 commits into
mainfrom
fix/1383-emr-configuration-properties
Aug 9, 2026
Merged

fix(emr): rename ConfigurationProperties / StepProperties to the SDK Properties member#1399
go-to-k merged 3 commits into
mainfrom
fix/1383-emr-configuration-properties

Conversation

@go-to-k

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

Copy link
Copy Markdown
Owner

Summary

CFn spells the EMR application-configuration bag
Configuration.ConfigurationProperties and the step bag
HadoopJarStepConfig.StepProperties; both SDK members are named Properties.
The EMR providers cast the CFn blobs straight to the SDK types, and the AWS
SDK v3 serializer drops unknown members — so every EMR application
configuration (spark-defaults / hive-site / yarn-site …) silently vanished and
the cluster came up unconfigured while cdkd reported the deploy as successful.
Step properties were dropped the same way.

Both value shapes already match (Record<string,string> for the former,
KeyValue[] for the latter — verified against the live CFn registry schema on
2026-08-09), so both directions are pure key renames. Note the issue text
predicted a map→list conversion for StepProperties; the live schema shows it
is already a KeyValue array, so no shape change is needed.

What changed

New shared helper src/provisioning/emr-configuration.ts:

  • toSdkConfigurations — renames ConfigurationProperties -> Properties at
    every Configurations nesting level (the type nests into itself)
  • toSdkStepConfigsHadoopJarStep.StepProperties -> Properties
  • toSdkInstanceTypeConfigs — the per-instance-type nested Configurations

Wired at every forwarding site:

Site File
top-level Configurations, Steps emr-cluster-provider.ts create()
per-instance-group Configurations emr-cluster-provider.ts toInstanceGroupConfig
per-fleet InstanceTypeConfigs emr-cluster-provider.ts toInstanceFleetConfig
standalone group Configurations emr-instance-group-config-provider.ts create()
standalone fleet InstanceTypeConfigs emr-instance-fleet-config-provider.ts create() + ModifyInstanceFleet update

No inverse is needed: Configurations / Steps / InstanceTypeConfigs are all
declared in EMRClusterProvider.getDriftUnknownPaths, and neither instance
provider implements readCurrentState. Non-object / non-array input passes
through untouched so an unresolved intrinsic surfaces as AWS's own validation
error rather than a confusing local crash.

Test plan

  • vp run check / typecheck:test / build / test — 516 files, 8704 tests, 0 type errors.
  • Revert probe: restoring the raw casts in all three real providers makes
    the four provider-level tests fail; restoring turns them green.
  • Real AWS, emr-cluster (2026-08-09): fixture gains top-level +
    nested Configurations, a per-master-group Configurations block and a
    step with StepProperties; verify.sh reads all four back from AWS. All
    green, destroy 12 deleted / 0 errors / 0 orphans.
  • Real AWS, emr-instance-configs (2026-08-09): Configurations on the
    standalone TASK group — a conversion site the cluster fixture cannot reach.
    Assertion green.

Both runs are recorded in docs/_generated/integ-last-run.tsv.

Notes

aws emr list-instance-groups turned out to be an AWS-CLI-customized
command that hangs / dies with [Errno 22] in a non-interactive shell
(--no-paginate --no-cli-pager </dev/null does not help), which is why both
fixtures read instance groups through a small node + @aws-sdk/client-emr
helper instead. The trap is recorded as a memory rule.

Deferred

No real-AWS coverage for any InstanceTypeConfigs (instance-FLEET) path
both EMR fixtures are instance-GROUP based, so the per-fleet conversion sites
and the ModifyInstanceFleet update path are unit-tested only. A single EMR
cluster's instance-collection type is fixed at create (groups XOR fleets), so
covering fleets needs a SECOND fixture + a second cluster per run rather than
an extension of an existing one — filed as (#1400) rather than bundled here.
The existing emr-instance-configs header already recorded this limitation
for #1070; #1383 widens what it hides, which is why it is now tracked.

The AWS::EMR::* types are still absent from NESTED_KEY_TARGETS
(scripts/gen-nested-key-coverage.ts), so this key class is not yet
CI-blocking for EMR. Critic target expansion is tracked in (#1393); adding a
target needs a schema-fixture re-capture and may surface unrelated
divergences, so it does not belong in this bug fix. Recorded in the new
.claude/rules/code-layout.md entry as well.

Closes #1383

go-to-k added 2 commits August 9, 2026 12:42
…Properties member

CFn spells the EMR application-configuration bag
`Configuration.ConfigurationProperties` and the step bag
`HadoopJarStepConfig.StepProperties`, while both SDK members are named
`Properties`. The EMR providers cast the CFn blobs straight to the SDK
types, and the AWS SDK v3 serializer drops unknown members - so every
EMR application configuration (spark-defaults / hive-site / yarn-site
...) silently vanished and the cluster came up unconfigured while cdkd
reported the deploy as successful. Step properties were dropped the
same way.

The value shapes already match (Record<string,string> for the former,
KeyValue[] for the latter - verified against the live CFn registry
schema), so both directions are pure key renames.

- new shared helper src/provisioning/emr-configuration.ts:
  toSdkConfigurations (recursive - Configurations nests into itself),
  toSdkStepConfigs, toSdkInstanceTypeConfigs
- wired at every forwarding site: EMRClusterProvider top-level
  Configurations / Steps, per-instance-group Configurations, per-fleet
  InstanceTypeConfigs; EMRInstanceGroupConfigProvider create;
  EMRInstanceFleetConfigProvider create + ModifyInstanceFleet update
- no inverse needed: Configurations / Steps / InstanceTypeConfigs are
  all in EMRClusterProvider.getDriftUnknownPaths and neither instance
  provider implements readCurrentState
- unit tests for the helper plus per-provider wiring tests, the four
  provider-level ones verified to fail without the fix
- emr-cluster fixture gains top-level + NESTED Configurations, a
  per-master-group Configurations block and a step with StepProperties;
  emr-instance-configs gains Configurations on the standalone TASK
  group. Both verify.sh files read the values back from AWS through a
  new SDK-based list_instance_groups_json helper (aws emr
  list-instance-groups is CLI-customized and unusable non-interactively)

Closes #1383
…roup helper

- cli-flag-coverage was stale: the new node/SDK helper introduces
  --input-type and the CLI-customization comment names --no-paginate /
  --no-cli-pager, and the matrix counts DECLARED flags found in verify.sh.
  CI caught it; regenerating here (integ- and scenario-coverage were
  already regenerated in the first commit).
- the helper now follows Marker, for parity with the provider's own
  paginated listInstanceGroups — a partial first page would silently
  satisfy the Configurations assertions.
@go-to-k
go-to-k merged commit 8547784 into main Aug 9, 2026
5 checks passed
@go-to-k
go-to-k deleted the fix/1383-emr-configuration-properties branch August 9, 2026 05:04
github-actions Bot pushed a commit that referenced this pull request Aug 9, 2026
## [0.278.3](v0.278.2...v0.278.3) (2026-08-09)

### Bug Fixes

* **emr:** rename ConfigurationProperties / StepProperties to the SDK Properties member ([#1399](#1399)) ([8547784](8547784))
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.278.3 🎉

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

Development

Successfully merging this pull request may close these issues.

AWS::EMR::*: ConfigurationProperties / StepProperties never renamed to SDK Properties — every EMR app configuration silently dropped

1 participant