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

Add default kwarg to MetaDatabase.get() #721

Merged
merged 1 commit into from
Oct 19, 2019

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Oct 18, 2019

I think this fixes #720

It should fix broken rosdep CLI when a kinetic workspace is sourced. I suspect the environment is:

  • There is an existing kinetic install, and it's sourced in the current terminal
  • rosdep update has been successfully run in the past.
  • ros_environment on kinetic does not set ROS_PYTHON_VERSION, but it does set ROS_DISTRO

Then I think what happened is:

  1. Rosdep saw ROS_DISTRO, but no ROS_PYTHON_VERSION, so it tried to ask the cache which python version to use.
  2. Metadatabase.get() had no data about the python version since rosdep update hasn't been run since the python_version info was added to the rosdistro index
  3. Code here tried to treat the return value of None as an iterable type 💥

@acarrillo Mind trying this pull request on your system?

Should fix broken rosdep update when a kinetic workspace is sourced.

Signed-off-by: Shane Loretz <[email protected]>
@sloretz sloretz added the bug label Oct 18, 2019
@sloretz sloretz self-assigned this Oct 18, 2019
@sloretz sloretz requested a review from wjwwood October 18, 2019 23:48
@acarrillo
Copy link

@sloretz yup looks good thanks for the quick fix! 👍 Performed an editable rosdep install from source and was able to rosdep update

acarrillo $ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit file:///etc/ros/rosdep/farmwise.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Add distro "crystal"
Add distro "dashing"
Add distro "eloquent"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Add distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
updated cache in /home/acarrillo/.ros/rosdep/sources.cache

@codecov-io
Copy link

codecov-io commented Oct 19, 2019

Codecov Report

Merging #721 into master will increase coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #721      +/-   ##
==========================================
+ Coverage   76.03%   76.04%   +<.01%     
==========================================
  Files          40       40              
  Lines        3126     3127       +1     
==========================================
+ Hits         2377     2378       +1     
  Misses        749      749
Impacted Files Coverage Δ
src/rosdep2/main.py 49.36% <0%> (ø) ⬆️
src/rosdep2/meta.py 100% <100%> (ø) ⬆️

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 d812436...e91b931. Read the comment docs.

@sloretz sloretz merged commit eaded35 into master Oct 19, 2019
@sloretz sloretz deleted the sloretz/default_iterable_python_versions branch October 19, 2019 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rosdep resolve on version 0.16.2 yields TypeError
5 participants