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

KMS: Smithy-generated code #196

Conversation

lucasmcdonald3
Copy link
Contributor

Issue #, if available:

Description of changes:

Squash/merge commit message, if applicable:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@lucasmcdonald3 lucasmcdonald3 marked this pull request as ready for review February 5, 2024 23:43
@lucasmcdonald3 lucasmcdonald3 requested a review from a team as a code owner February 5, 2024 23:43
Copy link
Contributor

@ShubhamChaturvedi7 ShubhamChaturvedi7 left a comment

Choose a reason for hiding this comment

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

Reviewed some random operation implementations since the TypeConversion layer is almost 10k lines. They all should follow the same pattern, but it's better to get a second pair of eyes.

I assume CI is failing because not all the code pieces are checked in right now?

def com_amazonaws_kms_AlreadyExistsException(input):
output = {}
if input.message.is_Some:
output["message"] = input.message.value.VerbatimString(False)
Copy link
Contributor

Choose a reason for hiding this comment

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

What does input.KeyId.VerbatimString(False) do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This converts a Dafny key ID to a native key ID
Dafny key ID is a _dafny.Seq. Seq has a method VerbatimString: link
Dafny strings are represented as tuples of characters in Python.
VerbatimString(False) will ''.join the Dafny characters together.
This gets you to a native string

@lucasmcdonald3
Copy link
Contributor Author

Reviewed some random operation implementations since the TypeConversion layer is almost 10k lines. They all should follow the same pattern, but it's better to get a second pair of eyes.

Yep, I think this is the right way to go about this

I assume CI is failing because not all the code pieces are checked in right now?

Correct -- for any PRs until all code is checked in, refer to the CI from #171

Copy link
Contributor

@justplaz justplaz left a comment

Choose a reason for hiding this comment

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

LGTM.

@lucasmcdonald3 lucasmcdonald3 merged commit 14d1d2a into aws:python-reviewed Feb 27, 2024
16 of 46 checks passed
@lucasmcdonald3 lucasmcdonald3 deleted the lucmcdon/python-mpl-kms-smithy branch February 27, 2024 18:59
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.

3 participants