-
Notifications
You must be signed in to change notification settings - Fork 146
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
Revert "Revert "[execute_process] emulate_tty configurable and defaults to true"" #277
Conversation
If want a fast CI response for this change you can try the new CI overlay job. It uses all unchanged packages from last nights build and only builds the specified changes: see http://build.ros2.org/view/Eci/job/Eci__overlay_ubuntu_bionic_amd64/21/parameters/ which finished in less than 15 min. |
Ok, I found the issue, it was the ANSI escape sequences (printed by the console logger to reset terminal colors) were being captured when emulate tty was enabled, which broke output comparison. I updated launch testing to strip these by default (with an option to not strip them in case someone needed that feature later). @pbaughman can you look at 12c0563? I moved this around because I noticed it and thought it might be a race where the event handlers could miss some events from processes included in the launch description being tested. I don't think it was the issue, but while debugging I considered it might be an issue. I can revert it if needed, but I think the new code is more correct. |
A CI build on build.ros2.org shows the same test failures as previously (not sure if I configured something incorrectly?): http://build.ros2.org/view/Eci/job/Eci__overlay_ubuntu_bionic_amd64/25/testReport/ |
Configuration looks ok, not sure. It definitely fixed it in my local vm and I pushed everything. The job used the right commit of ros2/launch (afaict). The failing test names and captured output are kind of not very useful though. |
Is it possible that the overlaid |
It shouldn't. But I wouldn't go as far as to say that it is impossible 😉 |
It's possible this fix isn't perfect, let's see what ci.ros2.org says, and I'll investigate with CI jobs containing print statements in launch if needed. |
Looks like it is failing on ci.ros2.org too (just reading the output so far), I guess I'll have to have another look. It might be the |
Ok, all the tests in But it's still failing on the build.ros2.org ci: http://build.ros2.org/view/Eci/job/Eci__overlay_ubuntu_bionic_amd64/26/console I'm not sure what's happening just yet. |
Running a smaller set of CI on ci.ros2.org, because I think it's possible that nothing is fixed on build.ros.org ( |
Yeah, looks like the build.ros2.org CI job is not catching the fix some how, the |
@wjwwood I never considered that the order of event handlers and execute processes could matter but yeah - you're right. In a perfect world, I would hope it wouldn't matter but in the real world, yours is almost certainly more correct. |
I need to still look at this failure (last one): But it's failing on nightly too: So, I'd say this is up for review. |
@stonier I refactored two parts of the original pull request, just FYI in case you care to have a look. |
9b413c1 also fixes the test failure that is also on master for the nightly's. |
Looks good to me - nicer way of checking the boolean. |
I'm looking into https://ci.ros2.org/job/ci_linux/7635/testReport/(root)/projectroot/test_logging_output_format/ now, which also seems to be related to this change. |
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 as long as CI's happy
So this last issue has become a bit crazy. I'm still working on it, but I'm going to change the default of |
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
See: pytest-dev/pytest#5579 Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
b58c950
to
2b977c0
Compare
@stonier FYI I had to disable emulate_tty by default right now, so that I can get some fixes in and at least have the feature available. I'll keep poking at the issue and try to get it so that we can re-enable it by default. |
CI test failures are from new overnight linter warnings. |
Understood, thanks. |
…ts to true"" (ros2#277) * Revert "Revert "[execute_process] emulate_tty configurable and defaults to true (ros2#265)" (ros2#276)" This reverts commit 15af530. * add option to strip ansi escape sequences from output in launch_testing Signed-off-by: William Woodall <[email protected]> * move registration of event handlers before including test file Signed-off-by: William Woodall <[email protected]> * replace \r\n with \n too, because you get this in emulated tty mode Signed-off-by: William Woodall <[email protected]> * fix a new test failure due a change in how pytest represents exceptions See: pytest-dev/pytest#5579 Signed-off-by: William Woodall <[email protected]> * refactor to not use YAML in eval of emulate_tty option Signed-off-by: William Woodall <[email protected]> * fix typo Signed-off-by: William Woodall <[email protected]> * refactor emulate_tty tests and test constructor argument Signed-off-by: William Woodall <[email protected]> * change default for emulate_tty to be False and fix warnings Signed-off-by: William Woodall <[email protected]>
This is a cherry-pick of 7b13334 from #277 to resolve a test failing on CI. Signed-off-by: Steven! Ragnarök <[email protected]>
* Fix Python 3.5 compatibility by removing unsupported type hints. Some of the type hints introduced in Dashing are not compatible with Python 3.5. Where possible I tried to convert the hints to type comments but for the type hints within function argument lists that did not appear to be possible. This is going to make backporting future changes more challenging since we will have to: 1. Review the backported code for incompatible type hints 2. Reconcile merge conflicts caused by the removal of type hints on the Dashing development branches. * Convert list comprehension to generator (#300) Addresses flake8 C412 errors introduced by flake8-comprehension 2.2.0 * Remove type comments longer than 100 chars. It isn't clear to me from [PEP-0484] how to reconcile overlong lines with type comments. [PEP-0484]: https://www.python.org/dev/peps/pep-0484/ * Don't warn on imports used for type comments. According to [PEP-0484] types used in type comments must be imported or defined in the current module. Since flake8 is not type-comment aware (at least in Dashing PR jobs) I've noqa'd the imports. [PEP-0484]: https://www.python.org/dev/peps/pep-0484/ * Remove invalid trailing comma. * Fix a test failure due to a change in how pytest represents exceptions. This is a cherry-pick of 7b13334 from #277 to resolve a test failing on CI. Signed-off-by: Steven! Ragnarök <[email protected]>
This is a refactor of #265 so that it doesn't break our other tests.
Detecting it in the first place was my fault because I narrowed our CI testing too much and so didn't exercise the failing tests.
Reverts #276