Skip to content

Fix for the aws sdk CI test cases#25

Open
joeky888 wants to merge 1 commit intoproject-vera:mainfrom
joeky888:sdk-helper
Open

Fix for the aws sdk CI test cases#25
joeky888 wants to merge 1 commit intoproject-vera:mainfrom
joeky888:sdk-helper

Conversation

@joeky888
Copy link
Copy Markdown

@joeky888 joeky888 commented Mar 13, 2026

  • Added a new get_nested_dict() helper that parses dot-notation query

  • Fixed the CreateLaunchTemplate (and CreateLaunchTemplateVersion) request parser to use the new get_nested_dict() instead of get_scalar() for LaunchTemplateData

  • Fixed the XML serializer for CreateSnapshot responses

I've also added a github action to test the aws sdk in the project-vera/aws-testcases repo. This PR is going to fix the CI test.

Added a new `get_nested_dict()` helper that parses dot-notation query
Fixed the `CreateLaunchTemplate` (and `CreateLaunchTemplateVersion`) request parser to use the new `get_nested_dict()` instead of `get_scalar()` for `LaunchTemplateData`
Fixed the XML serializer for `CreateSnapshot` responses

Signed-off-by: Joeky <joeky5888@gmail.com>
@joeky888
Copy link
Copy Markdown
Author

joeky888 commented Mar 13, 2026

Update from the Meeting:

  1. In the sdk create_launch_template test, when boto3 sends a CreateLaunchTemplate request, it encodes it as form-encoded query parameters. There is no single LaunchTemplateData key — it's broken up into dot-notation sub-keys:
LaunchTemplateData.InstanceType=t2.micro
LaunchTemplateData.ImageId=ami-0abcdef1234567890

So get_scalar(md, "LaunchTemplateData") looks for a key literally named LaunchTemplateData, finds nothing, and returns None. The backend then sees LaunchTemplateData=None and rejects it as a missing required parameter.

get_nested_dict collects all keys starting with LaunchTemplateData. and assembles them into {'InstanceType': 't2.micro', 'ImageId': 'ami-...'}, which is the dict the backend actually expects.


  1. In the sdk create_snapshot test fails with InternalFailure: 'int' object is not iterable.

The snapshot response includes fullSnapshotSizeInBytes (an integer, e.g. 20) and progress (also a scalar like "0%"). The original serializer treated them as lists and tried to iterate over them:

for item in param_data:  # param_data is an int like 20 — can't iterate!
    xml_parts.append(f'<item>{esc(str(item))}</item>')

This crashes with 'int' object is not iterable. The fix changes them to simple scalar XML tags:

<fullSnapshotSizeInBytes>20</fullSnapshotSizeInBytes>
<progress>0%</progress>

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