-
Notifications
You must be signed in to change notification settings - Fork 220
Request response workspace2 #619
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
base: main
Are you sure you want to change the base?
Conversation
Trivial: Some explanation of what this PR is adding/doing to the summary and maybe a more descriptive title for the PR. |
|
||
return modeled_future | ||
|
||
class V2DeserializationFailure(Exception): |
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.
Missing documentation
@@ -192,3 +197,78 @@ def __repr__(self): | |||
self.__class__.__module__, | |||
self.__class__.__name__, | |||
', '.join(properties)) | |||
|
|||
|
|||
class V2ServiceException(Exception): |
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.
Missing documentation
python3 -m pip install awsiotsdk | ||
``` | ||
|
||
Assuming you are in the SDK root directory, you can now run the shadow sandbox sample: |
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.
Trivial: basic fleet provisioning sample
@@ -0,0 +1,84 @@ | |||
# Jobs |
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.
Trivial: May not be worthwhile but maybe we could add a comment at the start of the deprecated sample .md files that state this sample is deprecated with a link to the current service client outside of the deprecated folder. Might not be worth the trouble though since to see this, someone would have to come looking specifically in the deprecated folder....
On a side note, should we simply remove these from existence since they're just samples that we don't want anyone using?
Args: | ||
request: `GetNamedShadowRequest` instance. | ||
|
||
Returns: |
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.
Had discussion about whether we should report that in addition to the expected return, a "rejected" request response operation will complete the future exceptionally with a V2ServiceException
. This documentation hint will help users understand and deal with potentially rejected operations.
python3 -m pip install awsiotsdk | ||
``` | ||
|
||
Assuming you are in the SDK root directory, you can now run the shadow sandbox sample: |
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.
csr fleet provisioning sample ?
|
||
def handle_get(context : SampleContext): | ||
request = iotshadow.GetShadowRequest(thing_name = context.thing) | ||
response = context.shadow_client.get_shadow(request).result() |
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.
debatable: In all the sandbox samples, rejected requests end up being caught by the try block in main where the input is being handled. I think for the sake of clarity to the customer and showing how a rejected response can be handled we should handle the exception explicitly, per helper function. Or at least in some way where we grab and print out the elements of a rejected request. e.g. the message, error code, timestamp, etc.
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.
Some trivial fixes and suggestions as well as maybe expanded documentation from codegen but functionally solid. Address and ship
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.