-
Notifications
You must be signed in to change notification settings - Fork 131
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: merging moveit_ci #452
Conversation
Thank you very much for your patches and the comments! This PR has a merge conflict, because it is not based the latest |
@ipa-mdl, just to clarify: I don't think that these commits can/should be merged in the present form. |
Actually, that's a bug. Will be fixed in #458 |
RE folding
This is a great addition. I will try cherry-pick this. However, we cannot rely 100% on this feature, as it is not supported by all CI providers. Local CI runs do not support folding at all.
For nested folds this makes sense. I don't have strong opinion here.
I was not a big fan either, but one gets used to it after a while ;) |
RE new features
👍
Again, 👍
Good idea, shouldn't be too hard to add.
Which folder do you cache here?
I wonder if |
We have hardened the scripts with
I'd like to refactor the variable system in a general. |
For CI testing the images can be pushed and reused, I am using this feature frequently with
Docker Registry login? This should be done with |
@@ -39,8 +39,8 @@ function run_clang_tidy { | |||
return 0 | |||
fi | |||
|
|||
local build; build="$(dirname "$db")" | |||
local name; name="$(basename "$build")" | |||
local build="$(dirname "$db")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think standardizing on industrial_ci for MoveIt is a great idea! Thanks for putting together this list, @rhaschke! We use moveit_ci extensively at PickNik for our projects, and we've contributed a lot to it over the years (I was the original developer), though @rhaschke has done a ton of work on it since then. We'd like to switch our projects to industrial_ci also, but I'd feel better if more people had admin access to this repo so we can help review PRs and contribute improvements. I nominate @rhaschke of course, and maybe someone from the PickNik team (note: I'm not a good fit anymore). Thoughts? |
I still think that both, industrial_ci and moveit_ci could benefit from a merge. However, I didn't (and won't have) time since December (and until summer at least). |
Either or... |
Closing due to inactivity. I will file smaller PRs... |
As a follow up of our discussion in moveit/moveit_ci#100, I looked a little deeper into the differences between
industrial_ci
andmoveit_ci
. I like your code base very much! It's a lot cleaner and more modular than ours, supporting several CI providers, ROS versions, and builders. On the other hand,moveit_ci
has some features that are missing inindustrial_ci
. Thus, I would like to see these two projects to merge. From my point of view, features ofmoveit_ci
that are interesting to port are:Travis supports nested folding and we make heavy use of it to nicely structure the web output,
see here for an example.
Recently, Travis also added support for nested timing, which we didn't yet implement.
You already use bash options
errexit
andpipefail
. I'm wondering, why you don't usenounset
as well? Checking for unbound variables can easily detect spelling errors in variables (see best practices). We hardenedmoveit_ci
a while ago along this line and found a few issues doing so...My suggestion is to "declare" all variables with their defaults in a separate
variables.sh
file to avoid introducing default syntax${var:-}
everywhere (which would be error-prone again).Usually CI providers have a global timeout for the job, the default for public Travis jobs is 50min.
If a build takes longer (which frequently occurs for MoveIt, when built from scratch), Travis doesn't save the cache (most notably ccache), such that the next build attempt will not be any faster.
To avoid this issue, we implemented (moveit/moveit_ci@b66a50a) an internal timeout mechanism that deliberately exits the main CI script, leaving Travis enough time to save the cache.
I'm not sure Travis changed the default behavior and saves the cache meanwhile... If not, this is an essential feature for large projects like MoveIt.
We have a mechanism to check for any warnings during the build process:
check_warnings.sh
.A poor man's solution would simply set
-Werror
, but this would make the compiler fail on the first warning. Our solution compiles the whole project and subsequently checks forstderr
output.This was only recently added (Add codecov.io support moveit/moveit_ci#96) and just compiles everything with option
--coverage
with subsequent calls to lcov.For better results, the build should use debug options as well, but this caused issues with ccache on Travis (Add codecov.io support moveit/moveit_ci#96 (comment)).
I have seen some optimization potential with regard to build time:
moveit_ci
, we restrict slow tests, likeclang-tidy
, to files that actually changed in a PR..travis.yml
and checking for it's existence might be sufficient.DOCKER_COMMIT
feature. Is it possible to commit the image to dockerhub as well? How do you handle login credentials in this case?Personally, I don't like the generated output of
industrial_ci
. Marking sections via>>>>>
and<<<<<
clutters the output and imho is superfluous if you have folding. In moveit_ci we use boldface to mark those main section headers. The first commit in this PR ports moveit_ci's folding approach generating a much cleaner output.Additionally, I have the following remarks:
VERBOSE_OUTPUT
seems to be true by default (see here).ici_quiet
. While this is a great function, I would reduce its use to a minimum. Using hierarchical folding will allow to better structure the output and avoid clutter while keeping those outputs.In moveit_ci we have various
travis_run_*
functions that essentially all echo the passed command and most bash commands go through this wrapper...not
close open folds. This allows us to immediately browse to the erroneous output, which wouldn't be hidden in a - potentially deeply nested - fold otherwise.This PR just comprises a few tests that I initially did as well as a few minor cleanups/fixes.
Consider them as a starting point for further discussions. I'm looking forward to contribute to this package and bring together the best from two worlds...