[OpenStack-Infra] Use of conditional includes, etc. in jobs

Ian Wienand iwienand at redhat.com
Mon Sep 7 05:18:50 UTC 2015


Hi,

With more and more plugins, etc, within our various projects, I've
seen some jobs coming in with things like

  if [ -f /path/to/hook.sh ]; then
     . /path/to/hook.sh
  fi

and some similar "conditional execution" idioms.

Clearly we don't want to go overboard and deny maintainers flexibility
in providing various parts of their jobs.  However, my concern with
this sort of thing is that if these files go missing, there is high
potential for silent failure.  There's nothing worse than thinking
your jobs are doing something then finding out (probably a long time
later) they are not due to a silent, unreported failure.

My preference is to see the jobs being strict around things like
sourcing files or calling functions; thus issues like files not being
there or paths changing will then result in a loud failure.

This is really a minor thing; certainly devstack-gate isn't free of it
and you can argue around how jobs would fail.  My thought is just to
include this sort of "failure hardening" as part of the general
reviewing Zeitgeist.

Thanks,

-i



More information about the OpenStack-Infra mailing list