Make block_until_ready() guarantee factory readiness#182
Merged
mredolatti merged 1 commit intosplitio:fix/ready_flagfrom Oct 13, 2020
Merged
Make block_until_ready() guarantee factory readiness#182mredolatti merged 1 commit intosplitio:fix/ready_flagfrom
mredolatti merged 1 commit intosplitio:fix/ready_flagfrom
Conversation
Contributor
|
Hi @sethbrite, thank you very much for raising this and sorry to hear this has been causing trouble. We will take a look and use your PR as a starting point to get this fixed so that no incorrect state is shown after a .block_until_ready() call. |
Contributor
Author
|
Hi @mredolatti, thanks! This issue has been causing many intermittent test failures for us. Should this change be accepted, do you have a timeline for its release? |
Contributor
|
it will most likely be released next week together with a feature we're working on to reduce impressions traffic. |
Contributor
Author
|
@mredolatti awesome. Thank you! |
Contributor
|
Thank you for reporting this, and once again, sorry for the trouble we caused! |
This file contains hidden or 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
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.
Python SDK
What did you accomplish?
The code change introduced in this PR ensures that a factory is ready when
block_until_readyreturns. Prior to this change, the value offactory.readywas not guaranteed to beTrueafterblock_until_ready()returns, which is counterintuitive. This behavior was due to the non-deterministic nature of Python thread scheduling.How do we test the changes introduced in this PR?
This change can be tested by running the test suite. I simply removed the
time.sleep(1)calls that enabled factory readiness assertions to pass before this change.Extra Notes