-
Notifications
You must be signed in to change notification settings - Fork 47
Report progress #64
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
Report progress #64
Conversation
tobywf
left a comment
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.
looks good
| if "callbackContext" in ser: | ||
| del ser["callbackContext"] | ||
| if self.errorCode: | ||
| ser["errorCode"] = self.errorCode.name |
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.
fine for now, i think in future we'll want to have another class to be the cloudformation callback struct and have a method to convert from one to the other
|
Also fixes #60 |
| parsed = self._parse_request(event_data) | ||
| caller_sess, platform_sess, request, action, callback, event = parsed | ||
| # Acknowledge the task for first time invocation | ||
| if not event.requestContext: |
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 think java also checks the invocation count if requestContext happens to be set: https://github.com/aws-cloudformation/cloudformation-cli-java-plugin/blob/d2cb70716ea42d87549b61d09a82d7abcb5c16e7/src/main/java/software/amazon/cloudformation/LambdaWrapper.java#L322
Issue #, if available: Also fixed #60
Description of changes:
completes support for async handlers. I've end-to-end tested async CREATE using both local and cloudwatch reinvocations.
I optimised for getting this pr in as quickly as possible, over making the code pristine. This gets the plugin fully functional and can iterate/improve from here as we go.
Also fixes a few small bug that were exposed during testing:
ProgressEventresponses (was gettingInternal Failureerrors)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.