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

[WIP] Trial to fix travis #564

Closed
wants to merge 6 commits into from

Conversation

pazeshun
Copy link
Contributor

First, I update .travis to jsk_travis 0.5.7 to avoid the following error:

Traceback (most recent call last):
  File "./.travis/travis_jenkins.py", line 364, in <module>
    if j.get_plugin_info('ansicolor'):
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 679, in get_plugin_info
    plugins_info = self.get_plugins(depth)
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 717, in get_plugins
    Request(self._build_url(PLUGIN_INFO, locals()))))
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 430, in jenkins_open
    self.maybe_add_crumb(req)
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 303, in maybe_add_crumb
    self._build_url(CRUMB_URL)), add_crumb=False)
  File "/home/travis/.local/lib/python2.7/site-packages/jenkins/__init__.py", line 448, in jenkins_open
    e.code, e.msg)
jenkins.JenkinsException: Error in request. Possibly authentication failed [401]: Invalid password/token for user: k-okada

(from https://travis-ci.org/start-jsk/rtmros_tutorials/jobs/617687743)

@pazeshun
Copy link
Contributor Author

pazeshun commented Dec 13, 2019

Travis passed, because building with rtmros_hrp2 is not tested (reported in #560 (comment)).
This is because encrypting (required to download private repos such as rtmros_hrp2) cannot be executed in pull request build:
https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml
https://github.com/start-jsk/rtmros_tutorials/blob/0.1.6/.travis.yml#L38
https://github.com/start-jsk/rtmros_tutorials/blob/0.1.6/.travis.yml#L40
https://docs.travis-ci.com/user/encrypting-files/

I assume travis test on master branch will fail even after this PR is merged, because rtmros_hrp2 is downloaded in that test and building with rtmros_hrp2 + released multisense_ros fails:
#561 , #504 , jsk-ros-pkg/jsk_common#1507

To avoid that, we need to download multisense_ros 3.4.9 like https://github.com/start-jsk/rtmros_hrp2/blob/master/rtmros_hrp2.rosinstall, in travis test on master.

@pazeshun
Copy link
Contributor Author

Failure in ROS_DISTRO=indigo USE_DEB=false NOT_TEST_INSTALL=true (in allow_failures):

+ catkin build --summarize --no-status -p2 --make-args -j2 --
NOTICE: Could not determine the width of the terminal. A default width of 80 will be used. This warning will only be printed once.
-----------------------------------------------------------------------
Profile:                     default
Extending:             [env] /opt/ros/indigo
Workspace:                   /workspace/ros/ws_rtmros_tutorials
-----------------------------------------------------------------------
Build Space:        [exists] /workspace/ros/ws_rtmros_tutorials/build
Devel Space:        [exists] /workspace/ros/ws_rtmros_tutorials/devel
Install Space:      [unused] /workspace/ros/ws_rtmros_tutorials/install
Log Space:         [missing] /workspace/ros/ws_rtmros_tutorials/logs
Source Space:       [exists] /workspace/ros/ws_rtmros_tutorials/src
DESTDIR:            [unused] None
-----------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-----------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        -j2
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-----------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-----------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
-----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/bin/catkin", line 11, in <module>
    load_entry_point('catkin-tools==0.4.5', 'console_scripts', 'catkin')()
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 272, in main
    catkin_main(sysargs)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 267, in catkin_main
    sys.exit(args.main(args) or 0)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/cli.py", line 422, in main
    summarize_build=opts.summarize  # Can be True, False, or None
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/build.py", line 283, in build_isolated_workspace
    workspace_packages = find_packages(context.source_space_abs, exclude_subspaces=True, warnings=[])
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", line 98, in find_packages
    raise RuntimeError('\n'.join(duplicates))
RuntimeError: Multiple packages found with the same name "hironx_tutorial":
- rtm-ros-robotics/rtmros_tutorials/hironx_tutorial
- rtmros_tutorials/hironx_tutorial
Multiple packages found with the same name "hrpsys_gazebo_tutorials":
- rtm-ros-robotics/rtmros_tutorials/hrpsys_gazebo_tutorials
- rtmros_tutorials/hrpsys_gazebo_tutorials
Multiple packages found with the same name "hrpsys_ros_bridge_tutorials":
- rtm-ros-robotics/rtmros_tutorials/hrpsys_ros_bridge_tutorials
- rtmros_tutorials/hrpsys_ros_bridge_tutorials
Multiple packages found with the same name "hrpsys_tutorials":
- rtm-ros-robotics/rtmros_tutorials/hrpsys_tutorials
- rtmros_tutorials/hrpsys_tutorials
Multiple packages found with the same name "openhrp3_tutorials":
- rtm-ros-robotics/rtmros_tutorials/openhrp3_tutorials
- rtmros_tutorials/openhrp3_tutorials

This is because rtmros_tutorials exists in .travis.rosinstall:
https://github.com/start-jsk/rtmros_tutorials/blob/master/.travis.rosinstall#L31-L33
Target package itself should be excluded from .travis.rosinstall.

Target package itself should be excluded from .travis.rosinstall
@pazeshun
Copy link
Contributor Author

pazeshun commented Dec 14, 2019

Test with ROS_DISTRO=indigo USE_DEB=false NOT_TEST_INSTALL=true passed.
This shouldn't be in allow_failures.

@pazeshun
Copy link
Contributor Author

pazeshun commented Dec 14, 2019

I assume travis test on master branch will fail even after this PR is merged, because rtmros_hrp2 is downloaded in that test and building with rtmros_hrp2 + released multisense_ros fails:

This assumption doesn't seem correct, because travis test of rtmros_tutorials currently uses jenkins.

On https://github.com/start-jsk/rtmros_tutorials/blob/0.1.6/.travis.yml#L38 and https://github.com/start-jsk/rtmros_tutorials/blob/0.1.6/.travis.yml#L40, .rosinstall in the virtural machine on travis is changed to include rtmros_hrp2.
However, that .rosinstall is not sent to jenkins, so wstool update on jenkins doesn't download rtmros_hrp2.

Real example:

  • rtmros_hrp2 was correctly added to .rosinstall in the virtural machine on travis (encrypting worked):
    �[0K$ if [ "${INSTALL_SRC}" != "" ] ;then sudo apt-get install python-yaml; rm .travis.rosinstall; for src in $INSTALL_SRC; do name=`basename $src`; python -c "import yaml;print yaml.dump([{'git':{'uri':'$src','local-name':'$name'}}], default_flow_style=False)" >> .travis.rosinstall; done; cat .travis.rosinstall; export USE_DEB=false; fi;
    Reading package lists...
    Building dependency tree...
    Reading state information...
    python-yaml is already the newest version (3.10-4ubuntu0.1).
    0 upgraded, 0 newly installed, 0 to remove and 281 not upgraded.
    - git:
        local-name: rtmros_hrp2
        uri: [email protected]:start-jsk/rtmros_hrp2
    
    (from https://travis-ci.org/start-jsk/rtmros_tutorials/jobs/469337721)
  • rtmros_hrp2 wasn't downloaded on jenkins:
    + wstool init
    Writing /workspace/ros/ws_rtmros_tutorials/src/.rosinstall
    
    update complete.
    + '[' false == false ']'
    + '[' -e /workspace/start-jsk/rtmros_tutorials/.travis.rosinstall ']'
    + wstool merge file:///workspace/start-jsk/rtmros_tutorials/.travis.rosinstall
         Performing actions: 
    
         Add new elements:
      jsk-ros-pkg/collada_robots,  jsk-ros-pkg/jsk_pr2eus,  rtm-ros-robotics/rtmros_common,  rtm-ros-robotics/rtmros_tutorials
    
    Config changed, maybe you need run wstool update to update SCM entries.
    Overwriting /workspace/ros/ws_rtmros_tutorials/src/.rosinstall
    
    update complete.
    + '[' -e /workspace/start-jsk/rtmros_tutorials/.travis.rosinstall.indigo ']'
    + wstool update
    ...
    [jsk-ros-pkg/collada_robots] Done.
    ...
    [jsk-ros-pkg/jsk_pr2eus] Done.
    ...
    [rtm-ros-robotics/rtmros_common] Done.
    ...
    [rtm-ros-robotics/rtmros_tutorials] Done.
    
    (from https://travis-ci.org/start-jsk/rtmros_tutorials/jobs/469337721)

@pazeshun pazeshun changed the title Trial to fix travis [WIP] Trial to fix travis Dec 14, 2019
@pazeshun
Copy link
Contributor Author

I expected that rtmros_hrp2 can be downloaded on jenkins, but that expectation wasn't correct:

+ '[' 'sudoapt-getinstallpython-yaml;python-c"importyaml;printyaml.dump([{\"git\":{\"uri\":\"[email protected]:start-jsk/rtmros_hrp2\",\"local-name\":\"rtmros_hrp2\"}}],default_flow_style=False)">>.rosinstall;ls-al;cat.rosinstall;wstoolupdate' '!=' '' ']'
+ sh -c 'sudo apt-get install python-yaml; python -c "import yaml;print yaml.dump([{\"git\":{\"uri\":\"[email protected]:start-jsk/rtmros_hrp2\",\"local-name\":\"rtmros_hrp2\"}}], default_flow_style=False)" >> .rosinstall; ls -al; cat .rosinstall; wstool update'
Reading package lists...
Building dependency tree...
Reading state information...
python-yaml is already the newest version.
python-yaml set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
total 4
drwxr-xr-x 2 user jenkins  61 Dec 14 08:11 .
drwxr-xr-x 4 user jenkins  50 Dec 14 08:11 ..
-rw-r--r-- 1 user jenkins 157 Dec 14 08:11 .rosinstall
lrwxrwxrwx 1 user jenkins  37 Dec 14 08:11 rtmros_tutorials -> /workspace/start-jsk/rtmros_tutorials
# THIS IS AN AUTOGENERATED FILE, LAST GENERATED USING wstool ON 2019-12-14
- git:
    local-name: rtmros_hrp2
    uri: [email protected]:start-jsk/rtmros_hrp2

Cloning into '/workspace/ros/ws_rtmros_tutorials/src/rtmros_hrp2'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
ERROR in config: Error processing 'rtmros_hrp2' : [rtmros_hrp2] Checkout of [email protected]:start-jsk/rtmros_hrp2 version None into /workspace/ros/ws_rtmros_tutorials/src/rtmros_hrp2 failed.

[rtmros_hrp2] Fetching [email protected]:start-jsk/rtmros_hrp2 (version None) to /workspace/ros/ws_rtmros_tutorials/src/rtmros_hrp2
Exception caught during install: Error processing 'rtmros_hrp2' : [rtmros_hrp2] Checkout of [email protected]:start-jsk/rtmros_hrp2 version None into /workspace/ros/ws_rtmros_tutorials/src/rtmros_hrp2 failed.

(from https://travis-ci.org/start-jsk/rtmros_tutorials/jobs/624933226)

@pazeshun
Copy link
Contributor Author

pazeshun commented Dec 21, 2019

@pazeshun pazeshun closed this Dec 21, 2019
@pazeshun pazeshun deleted the fix-travis-trial branch December 21, 2019 03:27
@pazeshun pazeshun restored the fix-travis-trial branch December 21, 2019 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant