Skip to content

Merge main to develop#3928

Merged
vicheey merged 2 commits into
developfrom
tmp/1779224998/main
May 19, 2026
Merged

Merge main to develop#3928
vicheey merged 2 commits into
developfrom
tmp/1779224998/main

Conversation

@vicheey
Copy link
Copy Markdown
Contributor

@vicheey vicheey commented May 19, 2026

This PR & commit is automatically created by aws-sam-cli-bot for SamTranslator@1.110.0 release.

@vicheey vicheey requested a review from a team as a code owner May 19, 2026 21:10
Copy link
Copy Markdown
Collaborator

@aws-sam-cli-bot aws-sam-cli-bot left a comment

Choose a reason for hiding this comment

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

Code Review Results

Reviewed: 4f81f22..48ad584
Files: 7
Comments: 2


Comments on lines outside the diff:

[samtranslator/model/api/api_generator.py:1592] [BUG] This back-merge silently removes the sam_expect(domain_access_association, self.logical_id, "Domain.AccessAssociation").to_be_a_map() guard that was added on develop, and also deletes the corresponding test fixtures (tests/translator/input/error_api_domain_access_association_not_dict.yaml and tests/translator/output/error_api_domain_access_association_not_dict.json).

Without this validation, when a user supplies a non-map value for Domain.AccessAssociation (for example a bare VPCE id string, as in the deleted test input), the very next line — domain_access_association.get("VpcEndpointId") — will raise AttributeError: 'str' object has no attribute 'get'. CloudFormation surfaces that as the opaque "Internal transform failure" message, which was the exact regression the deleted code (and its inline comment) was put in place to prevent.

If the intent of the back-merge from main is to reset develop to the released 1.110.0 state, please confirm this regression is acceptable; otherwise the validation and its test fixtures should be re-applied on top of the merge so the user-facing error message is preserved and the regression test stays in place.

[samtranslator/swagger/swagger.py:478] [BUG] The same back-merge removes the dict-type guard from add_authorizers_security_definitions:

if not isinstance(self.security_definitions, dict):
   raise InvalidTemplateException("securityDefinitions must be a dictionary.")

and deletes its tests (tests/translator/input/error_api_securitydefinitions_not_dict.yaml / tests/translator/output/error_api_securitydefinitions_not_dict.json).

After this change, if a user's DefinitionBody supplies securityDefinitions as a YAML list rather than a map (which is valid YAML but invalid per the Swagger 2.0 spec), the loop body that follows — self.security_definitions[authorizer_name] = authorizer.generate_swagger() — will raise TypeError: list indices must be integers or slices, not str (or Py27UniStr), again surfaced by CloudFormation as "Internal transform failure" with no actionable detail.

Please confirm this is an intentional reset to the 1.110.0 release surface; if not, restore the isinstance check and its test cases so user templates with malformed securityDefinitions continue to fail with a clear InvalidTemplateException.

@vicheey vicheey merged commit 4ed82f8 into develop May 19, 2026
8 of 9 checks passed
@vicheey vicheey deleted the tmp/1779224998/main branch May 19, 2026 21:21
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.

4 participants