-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Improvements to edge cases of CheckStream #21404
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
girarda
approved these changes
Jan 13, 2023
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.
🎉
erohmensing
changed the title
Update CheckStream to see successful connection to an empty stream as a success
Improvements to edge cases of CheckStream
Jan 13, 2023
This was referenced Jan 13, 2023
@pedroslopez thanks for asking about which edge cases we're trying to handle - adding you if curious. Hope the comments help with that! |
girarda
reviewed
Jan 13, 2023
girarda
approved these changes
Jan 13, 2023
jbfbell
pushed a commit
that referenced
this pull request
Jan 13, 2023
* Add test for failure case * Except StopIteration - make test pass * Don't attempt to connect to a stream if we get no stream slices * Make helper method for getting first record for a slice * Add comments and exit early if stream to check isn't in list of source streams * move helpers to helper module * Clarify what it means when StopIteration is returned by helper methods
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.
What
CheckStream is meant to check that all of the configuration for connection is provided (e.g. API tokens, headers, etc.). We do this by trying to grab the first record from a stream, which uses all of the connection configuration to perform the record grabbing.
Fixes KeyError issue surfaced by the introduction of AvailabilityStrategy (see #20891 and #20677 for more context)
🚨 User Impact 🚨
Users who try to perform a check() operation on a source using CheckStream, where at least one of the
streams_to_check
is empty, will now have success instead of failure checking.