-
Notifications
You must be signed in to change notification settings - Fork 142
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
[execute_process] emulate_tty configurable and defaults to true #265
Conversation
d174fb2
to
b9f1dc1
Compare
@stonier thanks for updating the pr, but it looks like flake8 is complaining still in our CI. :( |
Your CI looks to be somewhat ahead of my bionic installation which passes the flake 8 test (is it due solely to pytest versions? I have 3.3.2, CI has 4.6.3). I've taken a stab at guessing what the fix should be - can you trigger the CI run? |
Thanks @clalancette and @stonier, yeah I think our CI uses flake8 from pypi (latest). |
It does appear, however, that a related test is failing on Windows. |
Just for reference (because that log is a PITA to read):
launch/launch/launch/launch_service.py Line 184 in 81476cb
|
Weird, that's a debug message. Not sure why that would try to print only after these changes... I don't see a failure on master. I wonder if this is a red herring and there's another issue? I'll look into it quickly. |
Pushed a commit for the linting. Worth noting though, it's something of a challenge getting the linting to work in the same way as it does on CI - I haven't been able to do so yet. Without going into the CI console log to try and reproduce the environment setup step-by-step are there more convenient instructions somewhere? It's worth noting that on a dashing-bionic install:
Does it really need to lean on non-system versions? |
This part of the setup instructions have you install Which is what our CI does. Our binary instructions exclude things needed to run tests, because the assumption is that if you're installing the binaries that you are building on top of it and will install your own test dependencies if you want to run linters on your packages. We also build from source when drafting changes to the core packages, since that is more likely to be up-to-date than the binary packages and because that's what we need to do in order to emulate CI's checks. You could also use our docker images if you want a known good environment in which to test. Sorry you had issues getting the linters to behave, that can be frustrating.
That's because we install it from pip and debian packages cannot install dependencies from pip.
That's correct, it's an out of date version with bugs/false positives in it.
Unfortunately, yes I believe it does. You could argue that we don't need all of these linter extensions in the first place, which I would tend to agree with a bit (thought obviously others on the team thought they were worthwhile), but if you really want to push against this, I'd try to find the point where these linters were added and comment there. |
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.
One question, otherwise lgtm.
It's not a big drama, but it does certainly complicate things and the ROS infrastructure promises that one has come to rely on start to fall away. The implication here is that I can install ament debian packages for linting, but they have only been verified to work with hidden pip dependencies. There is no guarantee that they will even be functional out of the box without their pip dependencies. Additionally, the Thanks for the link back to the installation docs though. |
I agree, though I also see the counter point of how constraining it is when we cannot use the tools we need to get the job done (not saying that's the case here, but it has been in similar cases in the past). Perhaps @dirk-thomas can comment on this, since he spends a lot of time working on these tools and dependencies. (he's on vacation right now though, so it might be later)
|
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, thanks!
Signed-off-by: Daniel Stonier <d.stonier@gmail.com>
Signed-off-by: Daniel Stonier <d.stonier@gmail.com>
Signed-off-by: Daniel Stonier <d.stonier@gmail.com>
Signed-off-by: Daniel Stonier <d.stonier@gmail.com>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Daniel Stonier <d.stonier@gmail.com>
Signed-off-by: Daniel Stonier <d.stonier@gmail.com>
…mended in review Signed-off-by: Daniel Stonier <d.stonier@gmail.com>
Thanks @stonier for the contribution and for taking time to iterate with us! |
Unfortunately this broke a bunch of our tests last night, so I'll revert and fix it up. |
Just for the record: the tests failing to match their output seem to be related to this change http://build.ros2.org/view/Eci/job/Eci__nightly-fastrtps_ubuntu_bionic_amd64/21/testReport/ |
…ts to true"" (#277) * Revert "Revert "[execute_process] emulate_tty configurable and defaults to true (#265)" (#276)" This reverts commit 15af530. * add option to strip ansi escape sequences from output in launch_testing Signed-off-by: William Woodall <william@osrfoundation.org> * move registration of event handlers before including test file Signed-off-by: William Woodall <william@osrfoundation.org> * replace \r\n with \n too, because you get this in emulated tty mode Signed-off-by: William Woodall <william@osrfoundation.org> * fix a new test failure due a change in how pytest represents exceptions See: pytest-dev/pytest#5579 Signed-off-by: William Woodall <william@osrfoundation.org> * refactor to not use YAML in eval of emulate_tty option Signed-off-by: William Woodall <william@osrfoundation.org> * fix typo Signed-off-by: William Woodall <william@osrfoundation.org> * refactor emulate_tty tests and test constructor argument Signed-off-by: William Woodall <william@osrfoundation.org> * change default for emulate_tty to be False and fix warnings Signed-off-by: William Woodall <william@osrfoundation.org>
…#265) * [execute_process] emulate_tty now configurable and defaults to true Signed-off-by: Daniel Stonier <d.stonier@gmail.com> * [examples] do not emulate ttys Signed-off-by: Daniel Stonier <d.stonier@gmail.com> * trivial Signed-off-by: Daniel Stonier <d.stonier@gmail.com> * test for emulate_tty configuration Signed-off-by: Daniel Stonier <d.stonier@gmail.com> * copyright Signed-off-by: Daniel Stonier <d.stonier@gmail.com> * attempted flake8 fixes Signed-off-by: Daniel Stonier <d.stonier@gmail.com> * Fix flake8 errors. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * guard for windows (#1) Signed-off-by: Daniel Stonier <d.stonier@gmail.com> * linting, fix quotes on strings Signed-off-by: Daniel Stonier <d.stonier@gmail.com> * drop the warning and guard, lean on the graceful degradation as recommended in review Signed-off-by: Daniel Stonier <d.stonier@gmail.com>
…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 <william@osrfoundation.org> * move registration of event handlers before including test file Signed-off-by: William Woodall <william@osrfoundation.org> * replace \r\n with \n too, because you get this in emulated tty mode Signed-off-by: William Woodall <william@osrfoundation.org> * fix a new test failure due a change in how pytest represents exceptions See: pytest-dev/pytest#5579 Signed-off-by: William Woodall <william@osrfoundation.org> * refactor to not use YAML in eval of emulate_tty option Signed-off-by: William Woodall <william@osrfoundation.org> * fix typo Signed-off-by: William Woodall <william@osrfoundation.org> * refactor emulate_tty tests and test constructor argument Signed-off-by: William Woodall <william@osrfoundation.org> * change default for emulate_tty to be False and fix warnings Signed-off-by: William Woodall <william@osrfoundation.org>
Attempting resolution of #188. Can test with the example included.
@wjwwood is this in line with what you were expecting?