Skip to content
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

Refactor Servo velocity bounds enforcement. Disable flaky unit tests. #428

Merged
merged 2 commits into from
May 20, 2021

Conversation

vatanaksoytezer
Copy link
Contributor

@vatanaksoytezer vatanaksoytezer commented Apr 19, 2021

Port of moveit/moveit#2471 and an attempt to fix flakiness (again). Overall this PR:

  • Ports 2471.
  • Fixes most flakiness of the tests.
  • Adds low latency (named basic_servo_tests)

@vatanaksoytezer vatanaksoytezer changed the title Port of Refactor Servo velocity bounds enforcement Port of Refactor Servo velocity bounds enforcement (Work in progress) Apr 19, 2021
@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #428 (edfffa9) into main (d788700) will decrease coverage by 2.13%.
The diff coverage is 0.00%.

❗ Current head edfffa9 differs from pull request most recent head ff9eb0b. Consider uploading reports for the commit ff9eb0b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #428      +/-   ##
==========================================
- Coverage   51.41%   49.29%   -2.12%     
==========================================
  Files         223      218       -5     
  Lines       23343    22985     -358     
==========================================
- Hits        12000    11328     -672     
- Misses      11343    11657     +314     
Impacted Files Coverage Δ
moveit_ros/moveit_servo/src/servo_calcs.cpp 0.00% <0.00%> (-63.83%) ⬇️
...oveit_servo/include/moveit_servo/collision_check.h 0.00% <0.00%> (-100.00%) ⬇️
...veit_servo/include/moveit_servo/servo_parameters.h 0.00% <0.00%> (-100.00%) ⬇️
moveit_ros/moveit_servo/src/collision_check.cpp 0.00% <0.00%> (-75.36%) ⬇️
moveit_ros/moveit_servo/src/servo.cpp 0.00% <0.00%> (-70.96%) ⬇️
..._core/collision_detection/src/collision_common.cpp 0.00% <0.00%> (-42.85%) ⬇️
...space/constrained_planning_state_space_factory.cpp 66.67% <0.00%> (-33.33%) ⬇️
...lanners/ompl/ompl_interface/src/ompl_interface.cpp 50.48% <0.00%> (-26.44%) ⬇️
...anning_scene_monitor/src/current_state_monitor.cpp 36.25% <0.00%> (-19.65%) ⬇️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f94cfd...ff9eb0b. Read the comment docs.

@vatanaksoytezer
Copy link
Contributor Author

Seems folks at nav2 had a similar case of flaky tests (see ros-navigation/navigation2#584). They solved it with seperating the test with the others.

In a related note this PR should solve the test failures related to servo_server not being opened.

@vatanaksoytezer
Copy link
Contributor Author

This also includes #352

@vatanaksoytezer vatanaksoytezer changed the title Port of Refactor Servo velocity bounds enforcement (Work in progress) Port of Refactor Servo velocity bounds enforcement Apr 20, 2021
@vatanaksoytezer vatanaksoytezer added the enhancement New feature or request label Apr 22, 2021
@vatanaksoytezer
Copy link
Contributor Author

@JafarAbdi @AndyZe @tylerjw can you guys review this? It seems to pass for some time with multi thread and sleeps added to tests.

@vatanaksoytezer vatanaksoytezer requested review from tylerjw, JafarAbdi and AndyZe and removed request for tylerjw and JafarAbdi April 22, 2021 13:38
Copy link
Member

@tylerjw tylerjw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I glanced through the changes and left a couple comments. Thank-you for working on this. I'll test this soon and give you a more detailed review.

moveit_ros/moveit_servo/test/basic_servo_tests.cpp Outdated Show resolved Hide resolved
@AndyZe
Copy link
Member

AndyZe commented Apr 23, 2021

I think you should rename the PR because it's more than just porting the ROS1 PR now. Maybe something like:

Refactor Servo velocity bounds enforcement. Fix flaky unit tests.

Copy link
Member

@AndyZe AndyZe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks great!

@vatanaksoytezer vatanaksoytezer changed the title Port of Refactor Servo velocity bounds enforcement Refactor Servo velocity bounds enforcement. Fix flaky unit tests. Apr 23, 2021
@gavanderhoorn
Copy link
Member

@vatanaksoytezer: a small comment on logistics: it would be OK to git push commits in batches, instead of individually.

Pushing individual commits leads to the CI infrastructure starting jobs every time you push, and it also leads to everyone who Watches this repository receiving emails for every individual push as well.

Over the past few days, I've received 48 notifications about this PR alone, which seems a bit excessive.

@vatanaksoytezer
Copy link
Contributor Author

vatanaksoytezer commented Apr 23, 2021

@gavanderhoorn thanks for the heads up and sorry that you've received so many notifications. Although I am aware that I should not push that much, for this PR I was actually pushing on purpose to trigger actions and see if the flakiness on tests continue. I cannot reproduce the errors in my local machine and wanted to try as much as I can to see if it breaks with those changes.

On your comment I could probably test this in my own Github repository before opening the PR (which I did for the first 15 or so commits), but I found out tests be still failing after I opened the PR here. Will try my best to not push that much again.

@gavanderhoorn
Copy link
Member

I was actually pushing on purpose to trigger actions and see if the flakiness on tests continue.

of course if you're trying to debug the GHA cfg, that would be a different situation.

It was more of a general comment though. The same happened in a few other PRs.

I could probably test this in my own Github repository before opening the PR (which I did for the first 15 or so commits)

that seems like a good approach indeed.

@vatanaksoytezer
Copy link
Contributor Author

It was more of a general comment though. The same happened in a few other PRs.

No worries, I will be more careful with my other PRs. Thanks for giving the heads up.

@vatanaksoytezer
Copy link
Contributor Author

@AndyZe @tylerjw @JafarAbdi I am thinking about disabling the tests again since CI still seems to fail with the same errors after my additions.

@AndyZe
Copy link
Member

AndyZe commented Apr 25, 2021

I am thinking about disabling the tests again since CI still seems to fail with the same errors after my additions.

Yep, I guess that is what we have to do.

@AndyZe
Copy link
Member

AndyZe commented Apr 27, 2021

@vatanaksoytezer can you go ahead and set the tests back as they were previously and we'll get this merged?
We're at 42 commits now. I think it would be a good idea to squash this all down to 1 commit that only updates velocity bounds enforcement.

@vatanaksoytezer
Copy link
Contributor Author

@vatanaksoytezer can you go ahead and set the tests back as they were previously and we'll get this merged?
We're at 42 commits now. I think it would be a good idea to squash this all down to 1 commit that only updates velocity bounds enforcement.

@AndyZe I was waiting for today's meetup to confirm disabling tests with other people as well. Will squash and update this PR afterwards.

@vatanaksoytezer vatanaksoytezer changed the title Refactor Servo velocity bounds enforcement. Fix flaky unit tests. Refactor Servo velocity bounds enforcement. Disable flaky unit tests. Apr 28, 2021
@tylerjw
Copy link
Member

tylerjw commented May 10, 2021

I'm sorry I've been slow to respond on this. I'll look more closely at this tonight.

@vatanaksoytezer vatanaksoytezer changed the title Refactor Servo velocity bounds enforcement. Disable flaky unit tests. Refactor Servo velocity bounds enforcement. Enable flaky unit tests. May 10, 2021
@vatanaksoytezer
Copy link
Contributor Author

Only remaining problem is: https://github.com/ros-planning/moveit2/runs/2547716859?check_suite_focus=true#step:7:7976 any ideas @tylerjw @AndyZe ? Every other test works fine and as expected. I would honestly prefer to just disable this and merge this PR and open up a new one to fix that issue.

@AndyZe
Copy link
Member

AndyZe commented May 10, 2021

Disabling that one test sounds fine to me. I checked the yaml file and it seems fine. It passes locally, too.

Net test coverage still improves by a lot.

@vatanaksoytezer
Copy link
Contributor Author

The error seems to persist (see https://github.com/ros-planning/moveit2/runs/2548539403)

Copy link
Member

@AndyZe AndyZe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking until flaky tests are resolved

@AndyZe AndyZe force-pushed the feature/port2471 branch 3 times, most recently from 554bb82 to 606abc0 Compare May 11, 2021 03:11
@AndyZe
Copy link
Member

AndyZe commented May 11, 2021

OK, we have tried very hard to fix CI. I'm at the point where we just disable the tests again.

@vatanaksoytezer
Copy link
Contributor Author

I think that's fair. Probably we will have to leave to another day.

@AndyZe AndyZe force-pushed the feature/port2471 branch 7 times, most recently from ac06ed2 to ce84511 Compare May 11, 2021 18:45
@AndyZe AndyZe changed the title Refactor Servo velocity bounds enforcement. Enable flaky unit tests. Refactor Servo velocity bounds enforcement. Disable flaky unit tests. May 11, 2021
@henningkayser
Copy link
Member

I'm merging this, CI is fixed by #470.

@henningkayser henningkayser merged commit 0192dfd into moveit:main May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants