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

Python: Re-polymorph #568

Merged
merged 5 commits into from
Aug 12, 2024
Merged

Python: Re-polymorph #568

merged 5 commits into from
Aug 12, 2024

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.

Copy link

github-actions bot commented Aug 6, 2024

Detected changes to the release files or to the check-files action

Copy link

github-actions bot commented Aug 6, 2024

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

@lucasmcdonald3 lucasmcdonald3 changed the title sync Python: Re-polymorph Aug 6, 2024
@lucasmcdonald3 lucasmcdonald3 marked this pull request as ready for review August 6, 2024 15:55
@lucasmcdonald3 lucasmcdonald3 requested a review from a team as a code owner August 6, 2024 15:55
Copy link

github-actions bot commented Aug 6, 2024

Detected changes to the release files or to the check-files action

Copy link

github-actions bot commented Aug 6, 2024

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link

github-actions bot commented Aug 6, 2024

Detected changes to the release files or to the check-files action

Copy link

github-actions bot commented Aug 6, 2024

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link

github-actions bot commented Aug 6, 2024

Detected changes to the release files or to the check-files action

Copy link

github-actions bot commented Aug 6, 2024

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

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.

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this manually edited?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

encoding="utf-8",
): bytes(
"".join(UTF8.default__.Decode(value).value.Elements),
encoding="utf-8",
Copy link
Contributor

Choose a reason for hiding this comment

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

Encoding is not important?

Copy link
Contributor Author

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):
Copy link
Contributor

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?

Copy link
Contributor Author

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

@lucasmcdonald3
Copy link
Contributor Author

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.

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.

@lucasmcdonald3 lucasmcdonald3 merged commit 0552aa8 into python-reviewed Aug 12, 2024
16 of 63 checks passed
@lucasmcdonald3 lucasmcdonald3 deleted the python-repoly branch August 12, 2024 21:45
ajewellamz pushed a commit that referenced this pull request Dec 18, 2024
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.
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