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

Create and use a 'fake' rosdep cache for tests #614

Merged
merged 3 commits into from
Jan 25, 2021
Merged

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Jan 4, 2021

The idea here is to decouple Bloom from the live rosdistro index and rosdep database. This will also isolate bloom from the rosdep state that the system has, and makes the tests function without any network access. Since the system rosdep state isn't a dependency any more, the tests can be run even if 'rosdep init' has not been invoked on the system, meaning that the tests can now be executed without sudo rights.

This change also significantly reduces the time it takes to run the tests. Part of that is due to the BLOOM_SKIP_ROSDEP_UPDATE value, which suppresses Bloom's automatic rosdep update invocation. This isn't necessary for the 'fake' rosdep cache to work, but it makes things a bit quicker.

This change is motivated by the tests currently failing due to ros/rosdistro#27640. Rather than just update the tests to reflect the change, this approach will isolate the tests from future changes of the same kind.

Closes #616

@cottsay cottsay self-assigned this Jan 4, 2021
@cottsay cottsay force-pushed the cottsay/fake_rosdep branch from d6b91f2 to a0dc05c Compare January 4, 2021 23:23
The idea here is to decouple Bloom from the live rosdistro index and
rosdep database. This will also isolate bloom from the rosdep state that
the system has, and makes the tests function without any network access.
Since the system rosdep state isn't a dependency any more, the tests can
be run even if 'rosdep init' has not been invoked on the system, meaning
that the tests can now be executed without sudo rights.

This change also significantly reduces the time it takes to run the
tests. Part of that is due to the 'BLOOM_SKIP_ROSDEP_UPDATE', which
suppresses Bloom's automatic rosdep update invocation. This isn't
necessary for the 'fake' rosdep cache to work, but it makes things a bit
quicker.
The tests are no longer dependent on the system's rosdep state.
@cottsay cottsay force-pushed the cottsay/fake_rosdep branch from a0dc05c to 948fc53 Compare January 7, 2021 19:16
@cottsay
Copy link
Member Author

cottsay commented Jan 7, 2021

This brought the Travis build down from ~20 min to ~8 min. I expect there will be similar gains in GitHub Actions.

Copy link

@kyrofa kyrofa left a comment

Choose a reason for hiding this comment

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

Beyond fixing #616 (which I can confirm locally), I think de-coupling this from the production rosdistro is a great idea on its own. Code looks great to me.

Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

This approach looks good to me. In the future it might make sense to move this mocking capability into rosdep so it can be reused elsewhere for testing including over there.

@cottsay cottsay merged commit 4731783 into master Jan 25, 2021
@cottsay cottsay deleted the cottsay/fake_rosdep branch January 25, 2021 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_catkin_release failing
4 participants