-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Wait for runtime to be ready in __init__ #3963
Conversation
Looks like the call to I'd like to know if the removal was accidental before putting this back in. @tobitege - any insights? |
Those 2 commits are not removing your call, but comment out a log refresh in |
Line 162 adding back makes sense. If I removed it, then by accident. |
But since it's alive in |
Still, the very first call of _wait_until_alive because of potential timing issues should make sure it got'em all and that extra check is only done once. The websocket becomes alive but we have to wait for the client to be ready (bash/ipython) before we can start sending commands. |
in #3962 I just tested with minimal reverts, that sudo works again |
@tobitege sorry can you explain more? I assume you're correct given that the tests are failing, but once |
Oops, I had added this to my previous comment instead of making a new one: |
Thanks for the explanation in Slack Tobi! I think I have a better fix now-- |
Yes, looks much cleaner! |
OK @tobitege I think the tests should finally be passing |
Ok. But why move the wait before the |
What I read from the logs, the move above the super init isn't helping, other than it will "waste" the first 2 attempts in which guarantueed nothing gets initialized. |
The super init sets env vars, so it needs the environment to be ready. Otherwise the tests fail |
Hmm ok, due to the Any thoughts on the wait times, though? |
OK I refactored a bit so that the env is set later on--hopefully this works |
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.
LGTM
Short description of the problem this fixes or functionality that this introduces. This may be used for the CHANGELOG
I fixed this a few days ago, but my fix seems to have disappeared.
Give a summary of what the PR does, explaining any non-trivial design decisions
wait_for_client
function so that log refreshing is done separately, making it easier for other callers to useLink of any specific issues this addresses