-
Notifications
You must be signed in to change notification settings - Fork 246
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
fix(python): correctly handle structs out of callbacks #1009
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
When moving out of callbacks, the result was not turned into a reference before being passed out to the jsii kernel, causing TypeErrors when attempting to turn structs (and probably other non-primitive types) to JSON. Discovered while attempting to reproduce #1003, which can no longer trigger as it depended on returning a Struct through and `any` and being hit with the bug fixed in #997... the fix also removed the conditions that make leveraging the cause possible (or at the very least I could not come up with a reproduction, and have verified that the original bug report no longer reproduces once #997 is in). That being said, still introduced the necessary changes to address the cause by properly discovering interfaces and adding the relevant overrides filtering, as this may improve the performance and reliability of the jsii runtime for Java. Fixes #1003
54623fd
to
a2bba83
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Parking this PR for now as it may not be necessary to get the Java issues out of the way (as noted, they are already rendered impossible by other changes pending release). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs
Show resolved
Hide resolved
packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs
Show resolved
Hide resolved
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiEngine.java
Show resolved
Hide resolved
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiEngine.java
Outdated
Show resolved
Hide resolved
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiEngine.java
Outdated
Show resolved
Hide resolved
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
When moving out of callbacks, the result was not turned into a reference
before being passed out to the jsii kernel, causing TypeErrors when
attempting to turn structs (and probably other non-primitive types) to
JSON.
Discovered while attempting to reproduce #1003, which can no longer
trigger as it depended on returning a Struct through and
any
and beinghit with the bug fixed in #997... the fix also removed the conditions
that make leveraging the cause possible (or at the very least I could
not come up with a reproduction, and have verified that the original bug
report no longer reproduces once #997 is in).
That being said, still introduced the necessary changes to address the
cause by properly discovering interfaces and adding the relevant
overrides filtering, as this may improve the performance and reliability
of the jsii runtime for Java.
Fixes #1003
Fixes #1005
Fixes #1007
Fixes #1035
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.