Skip to content

Derive service directory name from serviceId instead of model file name - #3999

Open
wty-Bryant wants to merge 2 commits into
mainfrom
fix-legacy-id-mapping-servicefolder
Open

wty-Bryant wants to merge 2 commits into
mainfrom
fix-legacy-id-mapping-servicefolder

Conversation

@wty-Bryant

@wty-Bryant wty-Bryant commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Fold the generated package folder and CMake project/target/path names off the service id (via the shared service map) instead of the model file name, so the filename no longer influences generated output. Also source CMake project/test descriptions from the service full name and drop the hardcoded "AWS" brand + path-as-display-name.

Folder derivation is byte-identical (verified by re-genereating all services using python3 tools/scripts/run_code_generation.py --all and a filename-rename sentinel guard that uses some python scripts to give every c2j model name a "sentinelzz" prefix); the only output change is the CMake description strings across 876 regenerated CMakeLists.txt, which should not impact runtime cpp code.

@wty-Bryant
wty-Bryant requested a review from sbiscigl November 12, 2026 22:03
@@ -40,7 +40,6 @@
"route-53-domains": "route53domains",
"route-53": "route53",
"s3-control": "s3control",
"sagemaker-runtime": "sagemaker-runtime",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The three entries removed from smithy/cpp-codegen/smithy2c2j_service_map.json don't affect folder resolution either way. sagemaker-runtime maps to itself, and importexport/sdb hit the no-serviceId fallback before the map is checked. Every other reader of this file falls back to the identity name when an entry is missing.

Removing them just makes this copy drift from smithy/codegen/smithy2c2j_service_map.json, which smoke test generation reads and where these entries do matter. Can we revert the map change and keep the PR scoped to model_utils.py?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

This branch has not been deployed

No deployments
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