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

Add method to get successful output from waiters #319

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

haines
Copy link
Contributor

@haines haines commented Jul 21, 2021

Issue #, if available:
aws/aws-sdk-go-v2#1338

Description of changes:

This PR adds a WaitForOutput method to waiters that returns the successful operation's output. This allows the user to avoid making an extra API request to find the full result of the operation that they were waiting for - in my case, I want to access the StandardOutputContent on the GetCommandInvocationOutput using the ssm.NewCommandExecutedWaiter.

I opted for adding a method rather than changing the existing Wait method to avoid breaking the interface, but if a breaking change is ok then I'm happy to update this to just change the signature of Wait to include the output.

I've regenerated the SDK code locally and confirmed that the new method works as intended. The generated code changes from 697d3ed can be seen in haines/aws-sdk-go-v2@2ed786e

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

haines added a commit to haines/aws-sdk-go-v2 that referenced this pull request Jul 21, 2021
@haines
Copy link
Contributor Author

haines commented Sep 28, 2021

@jasdel @skmcgrail could you please take a look?

jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this pull request Nov 5, 2021
Updates the SDK's API clients to include the new WaitForOutput added in
smithy-go aws/smithy-go#319 change.
Copy link
Contributor

@jasdel jasdel left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to create this PR. The change looks good. We'll get this merged in and included in the next release of the smithy-go module. I've also created a AWS SDK for Go v2 PR that makes use of this change.

@jasdel jasdel merged commit 1999e74 into aws:main Nov 10, 2021
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this pull request Nov 10, 2021
Updates the SDK's API clients to include the new WaitForOutput added in
smithy-go aws/smithy-go#319 change.
@haines haines deleted the get-output-from-waiters branch November 10, 2021 06:46
jasdel added a commit to aws/aws-sdk-go-v2 that referenced this pull request Nov 10, 2021
Updates the SDK's API clients to include the new WaitForOutput added in
smithy-go aws/smithy-go#319 change.
jrichard8 pushed a commit to jrichard8/aws-sdk-go-v2 that referenced this pull request Feb 14, 2022
Updates the SDK's API clients to include the new WaitForOutput added in
smithy-go aws/smithy-go#319 change.
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