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

fix the error handling in run_travis #265

Merged

Conversation

mathias-luedtke
Copy link
Member

fixes #262

@mathias-luedtke
Copy link
Member Author

@130s: please test

@mathias-luedtke mathias-luedtke force-pushed the fix/run_travis-return-code branch from 2020846 to d82394e Compare January 14, 2018 16:54
@mathias-luedtke mathias-luedtke requested a review from 130s February 2, 2018 07:42
Copy link
Member

@130s 130s left a comment

Choose a reason for hiding this comment

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

ROS_DISTRO seems to be set in the config.

swri_profiler$ echo $ROS_DISTRO
kinetic
swri_profiler$ git branch -vv
* master 71ae85e [origin/master] Merge pull request #11 from pjreed/install-files
swri_profiler$ more .travis.yml
sudo: required 
dist: trusty 
language: generic 
compiler:
  - gcc
notifications:
  email:
    on_success: always
    on_failure: always
env:
  global:
    - USE_DEB=true
    - ROS_DISTRO="jade"
  matrix:
    - ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
    - ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
matrix:
  allow_failures:
    - env: ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
install:
  - git clone https://github.com/ros-industrial/industrial_ci.git .ci_config
script: 
  - source .ci_config/travis.sh
#  - source ./travis.sh  # Enable this when you have a package-local script 

swri_profiler$ ~/industrial_ci/industrial_ci/scripts/run_travis
Job 1: ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
Job 2: ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
run all with ~/industrial_ci/industrial_ci/scripts/run_travis -
swri_profiler$ ~/industrial_ci/industrial_ci/scripts/run_travis -
Running job 1: ~/industrial_ci/industrial_ci/scripts/run_ci /home/n130s/cws_profiler/src/swri-robotics/swri_profiler  ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
Testing /home/n130s/cws_profiler/src/swri-robotics/swri_profiler
ROS distro '' is not supported
Tests failed exit code '1'
Failed job 1: ~/industrial_ci/industrial_ci/scripts/run_ci /home/n130s/cws_profiler/src/swri-robotics/swri_profiler  ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
swri_profiler$ ~/industrial_ci/industrial_ci/scripts/run_travis . -
Running job 1: ~/industrial_ci/industrial_ci/scripts/run_ci /home/n130s/cws_profiler/src/swri-robotics/swri_profiler  ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
Testing /home/n130s/cws_profiler/src/swri-robotics/swri_profiler
ROS distro '' is not supported
Tests failed exit code '1'
Failed job 1: ~/industrial_ci/industrial_ci/scripts/run_ci /home/n130s/cws_profiler/src/swri-robotics/swri_profiler  ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu

swri_profiler$ ~/industrial_ci/industrial_ci/scripts/run_travis .
Job 1: ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
Job 2: ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
run all with ~/industrial_ci/industrial_ci/scripts/run_travis -

Passing ROS_DISTRO from commandline seems to work.

swri_profiler$ ~/industrial_ci/industrial_ci/scripts/run_travis - -- ROS_DISTRO=jade
  • Does the script not read it from the .travis.yml?
  • If this is a requirement could you add to help or document?

@mathias-luedtke
Copy link
Member Author

For some reason I have used "globals" instead of "global"..
Please try again.

@130s
Copy link
Member

130s commented Feb 4, 2018

Hmm...

$ cd industrial_ci && git log -1
commit 1f8bbef230da217848b43738696ec0770a359abb
Author: Mathias Lüdtke <[email protected]>
Date:   Sat Feb 3 22:24:54 2018 +0100

    [run_travis] parse 'global' instead of 'globals'

$ ~/non_synced/cws_swri_profiler/src/swri-robotics/swri_profiler
$ git branch -vv
* master 71ae85e [origin/master] Merge pull request #11 from pjreed/install-files

$ ~/industrial_ci/industrial_ci/scripts/run_travis .
Job 1: ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
Job 2: ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
run all with /home/n130s/industrial_ci/industrial_ci/scripts/run_travis -

$ ~/industrial_ci/industrial_ci/scripts/run_travis -
Traceback (most recent call last):
  File "/home/n130s/industrial_ci/industrial_ci/scripts/run_travis", line 170, in <module>
    main(os.path.abspath(os.path.dirname(__file__)), sys.argv)
  File "/home/n130s/industrial_ci/industrial_ci/scripts/run_travis", line 160, in main
    cmd = ' '.join(run_ci + [job_envs[i]])
TypeError: sequence item 2: expected string, tuple found

@mathias-luedtke
Copy link
Member Author

mathias-luedtke commented Feb 4, 2018

Yeah, another bug ;)
Time for nosetests..

@mathias-luedtke
Copy link
Member Author

@130s: While this PR does not fixes all issues, it fixes at least two. Can we track the other issue individually?

@mathias-luedtke
Copy link
Member Author

@130s: swri_profiler works now ;)

@130s
Copy link
Member

130s commented Jun 11, 2018

Gets stuck at the following line. Am I missing anything? Looks like run_travis is a Python script that doesn't import anything else from industrial_ci, I'm just calling it specifying its path.

RUN sed -i "/^# deb.multiverse/ s/^# //" /etc/apt/sources.list && apt-get update -qq && apt-get -qq install --no-install-recommends -y build-essential python-catkin-tools python-pip python-rosdep python-wstool ros-jade-catkin ssh-client && apt-get clean && rm -rf /var/lib/apt/lists/`

$ cd industrial_ci && git log -1                                                       
commit fce5f4a3ae51f48a6b142da2b5691f6c598bd538
Author: Mathias Lüdtke <[email protected]>
Date:   Mon Jun 4 00:48:58 2018 +0200

    fix tuple issue

$ cd swri_profiler
$ ~/link/industrial_ci/industrial_ci/scripts/run_travis -
Running job 1: /home/n130s/link/industrial_ci/industrial_ci/scripts/run_ci /home/n130s/cws_indicarice/src/swri-robotics/swri_profiler USE_DEB=true ROS_DISTRO="jade" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
Testing /home/n130s/cws_indicarice/src/swri-robotics/swri_profiler
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Building image 'industrial-ci/jade/ubuntu:trusty':
FROM ubuntu:trusty

RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

RUN apt-get update -qq     && apt-get -qq install --no-install-recommends -y apt-utils gnupg wget ca-certificates lsb-release

RUN echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list
RUN apt-key adv --keyserver "hkp://ha.pool.sks-keyservers.net" --recv-key "0xB01FA116"     || { wget "https://raw.githubusercontent.com/ros/rosdistro/master/ros.key" -O - | apt-key add -; }

RUN sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list     && apt-get update -qq     && apt-get -qq install --no-install-recommends -y         build-essential         python-catkin-tools         python-pip         python-rosdep         python-wstool         ros-jade-catkin         ssh-client     && apt-get clean     && rm -rf /var/lib/apt/lists/*

^CTraceback (most recent call last):
  File "/home/n130s/link/industrial_ci/industrial_ci/scripts/run_travis", line 170, in <module>
    main(os.path.abspath(os.path.dirname(__file__)), sys.argv)
  File "/home/n130s/link/industrial_ci/industrial_ci/scripts/run_travis", line 164, in main
    proc.communicate(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 797, in communicate
    self.wait()
  File "/usr/lib/python2.7/subprocess.py", line 1392, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt

Passing ROS_DISTRO manually but I still see jade, and it's stuck at the same place.

n130s@130s-p50:~/non_synced/cws_swri_profiler/src/swri_profiler$ ~/link/industrial_ci/industrial_ci/scripts/run_travis - -- ROS_DISTRO=kinetic
Running job 1: /home/n130s/link/industrial_ci/industrial_ci/scripts/run_ci /home/n130s/cws_indicarice/src/swri-robotics/swri_profiler USE_DEB=true ROS_DISTRO="jade" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
Testing /home/n130s/cws_indicarice/src/swri-robotics/swri_profiler
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Building image 'industrial-ci/jade/ubuntu:trusty':
FROM ubuntu:trusty

RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

RUN apt-get update -qq     && apt-get -qq install --no-install-recommends -y apt-utils gnupg wget ca-certificates lsb-release

RUN echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list
RUN apt-key adv --keyserver "hkp://ha.pool.sks-keyservers.net" --recv-key "0xB01FA116"     || { wget "https://raw.githubusercontent.com/ros/rosdistro/master/ros.key" -O - | apt-key add -; }

RUN sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list     && apt-get update -qq     && apt-get -qq install --no-install-recommends -y         build-essential         python-catkin-tools         python-pip         python-rosdep         python-wstool         ros-jade-catkin         ssh-client     && apt-get clean     && rm -rf /var/lib/apt/lists/*

@mathias-luedtke
Copy link
Member Author

Passing ROS_DISTRO manually but I still see jade

Currently the values in .travis.yml take precedence. But overwriting but might be more intuitive..

Looks like run_travis is a Python script that doesn't import anything else from industrial_ci, I'm just calling it specifying its path.

Should work.

Gets stuck at the following line

This passes after 2min on my system.

@mathias-luedtke
Copy link
Member Author

@130s: please try again

@130s
Copy link
Member

130s commented Jun 23, 2018

Same steps in #265 (comment) worked on my computer! Merging.

@130s 130s merged commit cba6908 into ros-industrial:master Jun 23, 2018
@mathias-luedtke mathias-luedtke deleted the fix/run_travis-return-code branch February 7, 2019 15:55
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.

[run_travis] AttributeError: 'list' object has no attribute 'proc'
2 participants