Skip to content

fix(ec2,sagemaker): real capacity-reservation split/capacity blocks and model-driven SageMaker describe shapes - #2733

Merged
vieiralucas merged 3 commits into
mainfrom
fix/ec2-split-sagemaker-describe
Oct 17, 2026
Merged

vieiralucas merged 3 commits into
mainfrom
fix/ec2-split-sagemaker-describe

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Summary

EC2

  • CreateCapacityReservationBySplitting / MoveCapacityToCapacityReservation now move real capacity between reservations instead of echoing synthesized ones. The split destination is a fresh active On-Demand reservation (source config, no tags/history/interruptible allocation) with createDate == startDate == split time. Client tokens replay idempotently.
  • DryRun is answered before any parameter/state check (as EC2 does from the permission check). DryRunOperation (EC2's documented common error, 412) is added to the probe's EC2 accepted-error list.
  • DescribeCapacityBlockOfferings returns real offerings per the user-guide rules (1-14 days in 1-day steps or up to 182 in 7-day steps, 1-64 instances, 11:30 UTC starts within 8 weeks). PurchaseCapacityBlock consumes an offering and creates a scheduled capacity-block reservation. No invented prices.

SageMaker

  • Describe/List outputs are projected from the stored request through the Smithy model (derive.rs, shape.rs): DescribeCluster instance groups as ClusterInstanceGroupDetails (current/desired pairs, InService), inference component DeployedImage + copy counts, human task UI ContentSha256, ProfilingStatus from DisableProfiler, OnDemand feature groups without provisioned units, work team WorkforceArn.
  • Partial updates (*ForUpdate members, generated from the model) merge into stored state instead of replacing it.
  • Required output members are synthesized from each element's own identifiers; intEnum leaves get modelled values; dispatch parses and serializes once.
  • After merging main (batch D, fix(conformance): batch D services to 100%; model-aware round-trip echo #2728): main's engine owns the Workforce/Workteam wrapper, derive only transforms.

Test plan

  • cargo clippy --workspace --all-targets -D warnings, cargo fmt --check
  • lib: ec2 475, sagemaker 73, conformance 96
  • cargo test -p fakecloud-conformance --test ec2 --test sagemaker
  • e2e: sagemaker (14), ec2_capacity_reservation_split
  • probe run --services sagemaker,ec2: 43106/43106, 1211/1211 ops

No SDK/docs surface change (no new introspection endpoints, op counts unchanged).


Summary by cubic

Makes EC2 capacity-reservation splitting and capacity blocks move real capacity instead of echoing synthesized data, and projects SageMaker read responses through the Smithy model's output shapes instead of echoing the stored request.

EC2

  • CreateCapacityReservationBySplitting and MoveCapacityToCapacityReservation transfer capacity between actual reservations; the split destination is a fresh active On-Demand reservation with no tags or history, and client tokens replay idempotently.
  • DryRun is answered before parameter and state validation, and DryRunOperation is accepted as EC2's documented common error.
  • DescribeCapacityBlockOfferings returns real offerings following the user-guide duration, step, and booking-window rules, and PurchaseCapacityBlock consumes one to create a scheduled capacity-block reservation with no invented prices.

SageMaker

  • Describe/List responses are projected from the stored request through the model's output shape trees: cluster instance groups report current/desired pairs and InService, inference components report deployed images and copy counts, human task UIs report ContentSha256, and ProfilingStatus and On-Demand throughput come from stored state.
  • Partial updates (*ForUpdate members) merge into stored state instead of replacing it, and required output members are synthesized from each element's own identifiers.

No new endpoints or SDK surface changes; operation counts are unchanged.

Written for commit 429fc83. Summary will update on new commits.

View guided diff Turn on auto-fix

…SageMaker describe shapes

- EC2: CreateCapacityReservationBySplitting / MoveCapacityToCapacityReservation
  move real capacity, answer DryRun first, record createDate on split.
- EC2: DescribeCapacityBlockOfferings returns real offerings per the user-guide
  duration/booking-window rules; PurchaseCapacityBlock consumes one and creates a
  scheduled capacity-block reservation.
- SageMaker: Describe* outputs are projected from the stored request through the
  model (derive.rs/shape.rs), including DescribeCluster instance-group status
  fields, ForUpdate partial-update merges, ProfilingStatus and OnDemand throughput.
- Conformance: DryRunOperation accepted as EC2's documented common error.
…er-describe

# Conflicts:
#	crates/fakecloud-e2e/tests/sagemaker.rs
#	crates/fakecloud-ec2/src/service/capacity.rs
…rging main

Main's engine now wraps DescribeWorkforce/Workteam output itself
(WRAPPED_OUTPUTS), so derive only transforms the record; wrapping there too
projected an empty inner view. Shape test sends a complete VPC config, which
main's validation now requires.
@vieiralucas
vieiralucas merged commit 1004cd1 into main Oct 17, 2026
163 checks passed
@vieiralucas
vieiralucas deleted the fix/ec2-split-sagemaker-describe branch October 17, 2026 07:46
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