Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize S3 Size to use correct integer size #679

Merged
merged 7 commits into from
Aug 31, 2021
Merged

Customize S3 Size to use correct integer size #679

merged 7 commits into from
Aug 31, 2021

Conversation

jdisanti
Copy link
Collaborator

@jdisanti jdisanti commented Aug 31, 2021

Motivation and Context

This is a fix for awslabs/aws-sdk-rust#209.

Changes include both a short-term hack, and a (disabled) longer-term customization implementation that is blocked on smithy-lang/smithy#900.

Testing

  • Added integration test

Checklist

  • I have updated the CHANGELOG

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

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

LGTM. might be a bit more portable to just mutate the JSON in Python instead of JQ but if it works, probably not worth redoing it.

thanks for splitting out the JQ commit! that made it a lot easier to follow.

# HACK: Modify the S3 model directly to change the type of `Size` until Smithy
# allows this transformation directly (https://github.com/awslabs/smithy/pull/900).
def hack_s3_model(model_path):
result = subprocess.run(["jq", "-M", ".shapes[\"com.amazonaws.s3#Size\"].type = \"long\"", str(model_path)], capture_output = True, check = True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we do this in the future, might be clearer to just do it in Python and mutate the JSON

@jdisanti jdisanti merged commit 8676d8d into smithy-lang:main Aug 31, 2021
@jdisanti jdisanti deleted the s3-size branch August 31, 2021 23:20
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