-
Notifications
You must be signed in to change notification settings - Fork 11
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
Python: Re-polymorph #568
Python: Re-polymorph #568
Conversation
Detected changes to the release files or to the check-files action |
Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS |
Detected changes to the release files or to the check-files action |
Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS |
Detected changes to the release files or to the check-files action |
Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS |
Detected changes to the release files or to the check-files action |
Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume all of it was generated from the codegenerator? Since this is auto-generated and huge, lmk if you want me focus on specific sections.
@@ -80,15 +82,19 @@ def __init__( | |||
"""Constructor for KeyStoreConfig. | |||
|
|||
:param ddb_table_name: The DynamoDB table name that backs this Key Store. | |||
:param kms_configuration: The AWS KMS Key that protects this Key Store. | |||
:param kms_configuration: Configures Key Store's KMS Key ARN restrictions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this manually edited?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope -- this is from this commit f3a0a52#diff-72a6f33196c935b246e042eaf33841994d8cbf1fbe8b76bc1bfbf1042f5a97a9
encoding="utf-8", | ||
): bytes( | ||
"".join(UTF8.default__.Decode(value).value.Elements), | ||
encoding="utf-8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encoding is not important?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before, this was bytes
, which was incorrect, since encryption context is strings.
Now that this is a string, it doesn't need an encoding.
@@ -77,12 +78,40 @@ def aws_cryptography_keystore_KMSConfiguration(dafny_input): | |||
KMSConfiguration_union_value = aws_cryptographic_materialproviders.smithygenerated.aws_cryptography_keystore.models.KMSConfigurationKmsKeyArn( | |||
dafny_input.kmsKeyArn.VerbatimString(False) | |||
) | |||
elif isinstance(dafny_input, KMSConfiguration_kmsMRKeyArn): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume all these changes come from the reviewed codegen re-polymorphing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly -- this MPL commit pins to my "reviewed" branch of Smithy-Dafny code
Correct, all of this is from the code generator. I don't think any area needs particular focus. Basically just making sure nothing seems egregiously wrong. |
Tweaked the generation target a little bit, to move the Wrapper structs into a shared place (which #452 already did as well) and unify the code for resource operations better with service operations.
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.