usdot-fhwa-stol / carma-platform

CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication. Doxygen Source Code Documentation :
https://usdot-fhwa-stol.github.io/documentation/carma-platform/
403 stars 124 forks source link

Update install.sh #2441

Closed MishkaMN closed 2 months ago

MishkaMN commented 2 months ago

PR Details

Description

When carma-platform is building, install.sh script is configured to print every command it is calling using -ex command. x option should be removed as the log is gigantic and easily wipes previous useful logs and prints multiple duplicate list of ALL packages being sourced (which is different and unnecessary than packages the user is building).

Original log: Couldn't upload the full log because it's more than 26MB! Excerpt of what it is printing:

+ [[ 0 -gt 0 ]]
+ cd /home/carma/src
 ---> Removed intermediate container 80e2d7343792
 ---> fcd2a338fb6d
Step 9/32 : FROM 086ff7461a2b AS install
 ---> 086ff7461a2b
Step 10/32 : ARG ROS1_PACKAGES=""
 ---> Running in 2d7b100f5531
 ---> Removed intermediate container 2d7b100f5531
 ---> 32af243708d2
Step 11/32 : ENV ROS1_PACKAGES=${ROS1_PACKAGES}
 ---> Running in 8f8f1d112ba3
 ---> Removed intermediate container 8f8f1d112ba3
 ---> 944eb1b03150
Step 12/32 : ARG ROS2_PACKAGES=""
 ---> Running in 05043f46c33d
 ---> Removed intermediate container 05043f46c33d
 ---> 0ddc206412b8
Step 13/32 : ENV ROS2_PACKAGES=${ROS2_PACKAGES}
 ---> Running in 66acda58b768
 ---> Removed intermediate container 66acda58b768
 ---> 780de263f3ce
Step 14/32 : RUN mkdir ~/carma_ws
 ---> Running in 1e7d45b77faf
 ---> Removed intermediate container 1e7d45b77faf
 ---> 24dd0b1228e9
Step 15/32 : COPY --from=source-code --chown=carma /home/carma/src /home/carma/carma_ws/src
 ---> 545e0a74b656
Step 16/32 : RUN ~/carma_ws/src/carma-platform/docker/install.sh
 ---> Running in a32d6d2847ff
+ [[ ! -z  rosbag_mock_drivers ]]
+ echo 'Sourcing previous build for incremental build start point...'
+ source /opt/carma/install/setup.bash
Sourcing previous build for incremental build start point...
>>>>>>>>>>>> SEE BELOW >>>>>>>>>>>>>>>>>
++ COLCON_CURRENT_PREFIX=/opt/ros/noetic
++ _colcon_prefix_chain_bash_source_script /opt/ros/noetic/local_setup.bash
++ '[' -f /opt/ros/noetic/local_setup.bash ']'
++ '[' -n '' ']'
++ . /opt/ros/noetic/local_setup.bash
+++ CATKIN_SHELL=bash
+++++ dirname /opt/ros/noetic/local_setup.bash
++++ builtin cd /opt/ros/noetic
++++ pwd
+++ _CATKIN_SETUP_DIR=/opt/ros/noetic
+++ . /opt/ros/noetic/setup.sh --extend --local
++++ : /opt/ros/noetic
++++ _SETUP_UTIL=/opt/ros/noetic/_setup_util.py
++++ unset _CATKIN_SETUP_DIR
++++ '[' '!' -f /opt/ros/noetic/_setup_util.py ']'
+++++ uname -s
++++ _UNAME=Linux
++++ _IS_DARWIN=0
++++ '[' Linux = Darwin ']'
++++ unset _UNAME
++++ export CMAKE_PREFIX_PATH
++++ '[' 0 -eq 0 ']'
++++ export LD_LIBRARY_PATH
++++ unset _IS_DARWIN
++++ export PATH
++++ export PKG_CONFIG_PATH
++++ export PYTHONPATH
++++ '[' -z bash ']'
++++ '[' -d '' ']'
++++ _TMPDIR=/tmp
+++++ mktemp /tmp/setup.sh.XXXXXXXXXX
++++ _SETUP_TMP=/tmp/setup.sh.t9eXXMZH78
++++ unset _TMPDIR
++++ '[' 0 -ne 0 -o '!' -f /tmp/setup.sh.t9eXXMZH78 ']'
++++ CATKIN_SHELL=bash
++++ /opt/ros/noetic/_setup_util.py --extend --local
++++ _RC=0
++++ '[' 0 -ne 0 ']'
++++ unset _RC
++++ unset _SETUP_UTIL
++++ . /tmp/setup.sh.t9eXXMZH78
+++++ export CMAKE_PREFIX_PATH=/opt/ros/noetic
+++++ CMAKE_PREFIX_PATH=/opt/ros/noetic
+++++ export LD_LIBRARY_PATH=/opt/ros/noetic/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
+++++ LD_LIBRARY_PATH=/opt/ros/noetic/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
+++++ export PATH=/opt/ros/noetic/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++++ PATH=/opt/ros/noetic/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++++ export PKG_CONFIG_PATH=/opt/ros/noetic/lib/pkgconfig
+++++ PKG_CONFIG_PATH=/opt/ros/noetic/lib/pkgconfig
+++++ export PYTHONPATH=/opt/ros/noetic/lib/python3/dist-packages
+++++ PYTHONPATH=/opt/ros/noetic/lib/python3/dist-packages
+++++ export _CATKIN_ENVIRONMENT_HOOKS_COUNT=12
+++++ _CATKIN_ENVIRONMENT_HOOKS_COUNT=12
+++++ export _CATKIN_ENVIRONMENT_HOOKS_0=/opt/ros/noetic/etc/catkin/profile.d/1.ros_distro.sh
+++++ _CATKIN_ENVIRONMENT_HOOKS_0=/opt/ros/noetic/etc/catkin/profile.d/1.ros_distro.sh
+++++ export _CATKIN_ENVIRONMENT_HOOKS_0_WORKSPACE=/opt/ros/noetic
+++++ _CATKIN_ENVIRONMENT_HOOKS_0_WORKSPACE=/opt/ros/noetic
+++++ export _CATKIN_ENVIRONMENT_HOOKS_1=/opt/ros/noetic/etc/catkin/profile.d/1.ros_etc_dir

New Log: install-new-log.txt

Related GitHub Issue

NA

Related Jira Key

https://usdot-carma.atlassian.net/browse/CAR-6079

Motivation and Context

This extreme logging makes it hard to see any issue happens during build

How Has This Been Tested?

local VM tested

Types of changes

Checklist:

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud