Skip to content

fix: update service-2.json with latest public botocore service model#5806

Closed
lucasjia-aws wants to merge 2 commits into
aws:masterfrom
lucasjia-aws:master
Closed

fix: update service-2.json with latest public botocore service model#5806
lucasjia-aws wants to merge 2 commits into
aws:masterfrom
lucasjia-aws:master

Conversation

@lucasjia-aws

Copy link
Copy Markdown
Collaborator

Issue

This PR updates the bundled service-2.json to the lastest public botocore service model and regenerates all codegen outputs.

Changes

Commit 1: Update service model and regenerate codegen outputs

Area File(s) Change
Service model sagemaker-core/sample/sagemaker/2017-07-24/service-2.json Replaced with latest public botocore service model
Codegen tooling tools/constants.py Added PIPE_VAR_OVERRIDES for ResourceConfig (IntPipeVar), IntPipeVar to type mappings, REQUIRED_TO_OPTIONAL_OVERRIDES for ModelPackage/SecurityConfig, SHAPES_CODEGEN_OUTPUT_DIR
Codegen tooling tools/resources_extractor.py Added EXCLUDED_RESOURCES = {"Session"} to prevent codegen name collision with boto3 Session
Codegen tooling tools/resources_codegen.py Updated Session import to from boto3.session import Session
Codegen tooling tools/shapes_codegen.py Added IntPipeVar import, updated shapes output path to shapes/ directory
Codegen tooling tools/shapes_extractor.py Applied PIPE_VAR_OVERRIDES during shape member generation
Codegen output resources.py Regenerated from public service model (83 resources)
Codegen output shapes/shapes.py Regenerated from public service model
Codegen output config_schema.py Regenerated
Codegen output resource_plan.csv Regenerated (Session removed)
Codegen output utils/code_injection/shape_dag.py Regenerated
Codegen output tools/api_coverage.json Regenerated

Commit 2: Fix upstream package compatibility

Area File(s) Change
sagemaker-train finetune_utils.py Removed enable_ffm param from _create_input_channels() (field no longer in public model)
sagemaker-mlops feature_group_manager.py Removed unused AddOnlineStoreReplicaAction import (shape no longer in public model)
sagemaker-mlops test_iceberg_properties.py Removed unsupported description param from FeatureGroup update test calls

Testing

  • All sagemaker-core unit tests pass
  • All sagemaker-train unit tests pass
  • All sagemaker-mlops unit tests pass
  • All sagemaker-serve unit tests pass
  • Integration tests running in CI

…and regenerate codegen outputs

Replaced the bundled service-2.json with the latest public botocore SageMaker service model, then 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.
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