Skip to content

Update service-2.json with latest public botocore service model#5809

Merged
lucasjia-aws merged 4 commits into
aws:masterfrom
lucasjia-aws:update_service-2
Apr 29, 2026
Merged

Update service-2.json with latest public botocore service model#5809
lucasjia-aws merged 4 commits into
aws:masterfrom
lucasjia-aws:update_service-2

Conversation

@lucasjia-aws

Copy link
Copy Markdown
Collaborator

Summary

Replaced the bundled service-2.json with the latest public botocore SageMaker service model and updated codegen tooling + downstream packages to accommodate differences in the new model.

Changes

File / Area Change Why
sample/sagemaker/2017-07-24/service-2.json Replaced with latest public botocore service model Core change — keeps the bundled model in sync with the public botocore release
tools/constants.py Added PIPE_VAR_OVERRIDES for ResourceConfig fields; extended REQUIRED_TO_OPTIONAL_OVERRIDES for ModelPackage/SecurityConfig; added IntPipeVar mapping; added SHAPES_CODEGEN_OUTPUT_DIR New model exposes fields (e.g. InstanceCount, VolumeSizeInGB) as plain integers that need to be pipeline-variable-aware; some members marked required in the model are optional in practice
tools/resources_extractor.py Added EXCLUDED_RESOURCES set to exclude Session New model surfaces a Session resource that collides with boto3.session.Session import
tools/shapes_extractor.py Integrated PIPE_VAR_OVERRIDES into shape member type resolution Allows codegen to emit IntPipeVar instead of int for overridden fields
tools/shapes_codegen.py Added IntPipeVar import in generated code; updated default output dir to shapes/ Generated shapes need the new type; output path aligned with project layout
tools/resources_codegen.py Added IntPipeVar to PYTHON_TYPES list Ensures IntPipeVar fields are recognized as configurable attributes
resources.py, shapes.py, config_schema.py, shape_dag.py, resource_plan.csv Regenerated by codegen Reflect the updated service model and tooling changes above
sagemaker-mlops/ and sagemaker-train/ Fixed import and compatibility issues Downstream packages referenced shapes/fields that changed in the regenerated code

Testing

  • Codegen runs successfully and produces parseable Python output
  • All unit tests pass locally
  • Integration tests running in CI

Replaced the bundled service-2.json with the latest public botocore SageMaker service model and updated codegen tooling to handle differences in the public model:
- Added PIPE_VAR_OVERRIDES for ResourceConfig fields (IntPipeVar)
- Added REQUIRED_TO_OPTIONAL_OVERRIDES for ModelPackage/SecurityConfig
- Added EXCLUDED_RESOURCES for Session to avoid name collision
- Updated shapes output path to shapes/ directory
Re-ran codegen to regenerate resources.py, shapes.py, config_schema.py, resource_plan.csv, and shape_dag.py.
@lucasjia-aws lucasjia-aws merged commit 8b5186b into aws:master Apr 29, 2026
18 of 23 checks passed
@lucasjia-aws lucasjia-aws deleted the update_service-2 branch May 27, 2026 21:49
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.

2 participants