fix(emr): rename ConfigurationProperties / StepProperties to the SDK Properties member - #1399
Merged
Merged
Conversation
…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.
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))
|
🎉 This PR is included in version 0.278.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
CFn spells the EMR application-configuration bag
Configuration.ConfigurationPropertiesand the step bagHadoopJarStepConfig.StepProperties; both SDK members are namedProperties.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 on2026-08-09), so both directions are pure key renames. Note the issue text
predicted a map→list conversion for
StepProperties; the live schema shows itis already a
KeyValuearray, so no shape change is needed.What changed
New shared helper
src/provisioning/emr-configuration.ts:toSdkConfigurations— renamesConfigurationProperties->Propertiesatevery
Configurationsnesting level (the type nests into itself)toSdkStepConfigs—HadoopJarStep.StepProperties->PropertiestoSdkInstanceTypeConfigs— the per-instance-type nestedConfigurationsWired at every forwarding site:
Configurations,Stepsemr-cluster-provider.tscreate()Configurationsemr-cluster-provider.tstoInstanceGroupConfigInstanceTypeConfigsemr-cluster-provider.tstoInstanceFleetConfigConfigurationsemr-instance-group-config-provider.tscreate()InstanceTypeConfigsemr-instance-fleet-config-provider.tscreate()+ModifyInstanceFleetupdateNo inverse is needed:
Configurations/Steps/InstanceTypeConfigsare alldeclared in
EMRClusterProvider.getDriftUnknownPaths, and neither instanceprovider implements
readCurrentState. Non-object / non-array input passesthrough 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.the four provider-level tests fail; restoring turns them green.
emr-cluster(2026-08-09): fixture gains top-level +nested
Configurations, a per-master-groupConfigurationsblock and astep with
StepProperties; verify.sh reads all four back from AWS. Allgreen, destroy 12 deleted / 0 errors / 0 orphans.
emr-instance-configs(2026-08-09):Configurationson thestandalone 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-groupsturned out to be an AWS-CLI-customizedcommand that hangs / dies with
[Errno 22]in a non-interactive shell(
--no-paginate --no-cli-pager </dev/nulldoes not help), which is why bothfixtures read instance groups through a small
node+@aws-sdk/client-emrhelper 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
ModifyInstanceFleetupdate path are unit-tested only. A single EMRcluster'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-configsheader already recorded this limitationfor #1070; #1383 widens what it hides, which is why it is now tracked.
The
AWS::EMR::*types are still absent fromNESTED_KEY_TARGETS(
scripts/gen-nested-key-coverage.ts), so this key class is not yetCI-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.mdentry as well.Closes #1383