Skip to content

Conversation

@sethbrite
Copy link
Contributor

Python SDK

What did you accomplish?

The code change introduced in this PR ensures that a factory is ready when block_until_ready returns. Prior to this change, the value of factory.ready was not guaranteed to be True after block_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

@mredolatti
Copy link
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.

@sethbrite
Copy link
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?

@mredolatti
Copy link
Contributor

it will most likely be released next week together with a feature we're working on to reduce impressions traffic.

@sethbrite
Copy link
Contributor Author

@mredolatti awesome. Thank you!

@mredolatti
Copy link
Contributor

Thank you for reporting this, and once again, sorry for the trouble we caused!

@sethbrite sethbrite changed the base branch from master to development October 8, 2020 15:05
@mredolatti mredolatti changed the base branch from development to fix/ready_flag October 13, 2020 17:39
@mredolatti mredolatti merged commit 4208b4d into splitio:fix/ready_flag Oct 13, 2020
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