-
Notifications
You must be signed in to change notification settings - Fork 618
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
Cleanup the symantics of ACS Handler #3225
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angelcar
reviewed
May 26, 2022
nodir-t
previously approved these changes
May 26, 2022
angelcar
previously approved these changes
May 26, 2022
aws-gibbskt
force-pushed
the
ecs_handler_cleanup
branch
from
June 1, 2022 19:37
f9a4b7b
to
d602deb
Compare
sparrc
reviewed
Jun 3, 2022
aws-gibbskt
force-pushed
the
ecs_handler_cleanup
branch
3 times, most recently
from
June 6, 2022 16:24
b821046
to
ee71db1
Compare
aws-gibbskt
force-pushed
the
ecs_handler_cleanup
branch
2 times, most recently
from
June 13, 2022 16:25
d573d0c
to
6af628b
Compare
aws-gibbskt
force-pushed
the
ecs_handler_cleanup
branch
from
June 29, 2022 20:08
6af628b
to
6478cde
Compare
aws-gibbskt
force-pushed
the
ecs_handler_cleanup
branch
from
March 7, 2023 19:00
6478cde
to
871e3c7
Compare
The ACS handler was using a channel to support looping, but the channel was only sent to from the current thread via a go routine that would just write to the channel. The rewrite maintains the behavior of always connecting when disconnected potentially after a retry backoff. However it uses a simple endless for loop rather than reading from channels to mimic this straightforward behavior. The rewrite also adheres to the interface contract on returning the error from the context if it is Done for any reason other than cancelled.
aws-gibbskt
force-pushed
the
ecs_handler_cleanup
branch
from
March 7, 2023 19:21
871e3c7
to
2c63238
Compare
sparrc
approved these changes
Mar 16, 2023
singholt
approved these changes
Mar 16, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The ACS handler was using a channel to support looping, but the
channel was only sent to from the current thread via a go routine
that would just write to the channel.
The rewrite maintains the behavior of always connecting when
disconnected potentially after a retry backoff. However it uses
a simple endless for loop rather than reading from channels to
mimic this straightforward behavior.
The rewrite also adheres to the interface contract on returning
the error from the context if it is Done for any reason other
than cancelled.
Testing
Added additional tests to validate that all paths reconnect or exit when Context is Error or Cancelled, with appropriate returns. No additional testing outside of Unit/Functional tests.
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.