-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Fix test_logging_to_driver and test_not_logging_to_driver #5462
Conversation
Test FAILed. |
@@ -2649,8 +2649,6 @@ def f(): | |||
output_lines = captured["out"] | |||
for i in range(200): | |||
assert str(i) in output_lines | |||
error_lines = captured["err"] | |||
assert len(error_lines) == 0 |
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.
This makes me realize that this line should have been
assert len(error_lines) == 0, error_lines
so that we can what the stderr was in the case of error
@@ -2649,8 +2649,6 @@ def f(): | |||
output_lines = captured["out"] | |||
for i in range(200): | |||
assert str(i) in output_lines | |||
error_lines = captured["err"] |
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.
If we remove this check, then we should include a comment that explains what goes wrong if we do check it. Since people (myself included) will be very tempted to bring back this check.
@@ -2649,8 +2649,6 @@ def f(): | |||
output_lines = captured["out"] | |||
for i in range(200): | |||
assert str(i) in output_lines |
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.
Unrelated to the test failure, but in this test we should really be checking that we don't get any unintended log messages (or duplicates). Especially since @stephanie-wang saw some duplicates recently.
I agree that autoscaler issue should be fixed. But I'm not familiar with autoscaler and don't know how to fix that. |
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.
@raulchen this looks good to me. I pushed an additional comment. Does that look good to you?
@robertnishihara thanks. looks good |
Test PASSed. |
Why are these changes needed?
These 2 tests are flaky on CI. Because sometimes the previous autoscaler tests will start background threads and print the following errors to stderr.
The purpose of these tests should be to verify that the logs are redirected (or not redirected) to driver stdout. So there's no need to check
stderr
. However, we should also fix the issue of not stopping autoscaler background threads in a different PR.What do these changes do?
Related issue number
Linter
scripts/format.sh
to lint the changes in this PR.