You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 1, 2024. It is now read-only.
fix: Error out of provisioning when any part errors (fix silent CI fail) (#767)
CI tests were silently failing during provisioning since the provisioning
scripts did not set the `-e` option in bash. This commit changes the
scripts to include the recommended `set -eu -o pipefail` stanza as well as
include a more conservative `-e` on any docker-exec bash calls.
In places where existing errors were uncovered, I suppressed errors just
for the offending code with a `+e`/`-e` pair and left a comment starting
with `# FIXME[bash-e]`. Owning teams can prioritize and fix these at their
own pace.
This may cause some false positive errors (there are commands which use a
non-zero exit code to signal things other than an error) but they should
be individually reverted or fixed as they are discovered.
Also:
- Extract ANSI color code variables to a shared file and use them.
Most of the provisioning scripts tried to use the color codes, but
they weren't defined. I discovered this when I tried to add
`set -eu` to the scripts.
- Remove the `set -e` from the CI Github Action, since it is almost
certainly a no-op.
- Add `set -x` to all provisioning scripts for easier debugging (some
already had it)
- Ensure provisioning scripts have bash shebang
- Tweak function in `programs/provision.sh` to accept variable list of
arguments (and stop defaulting one of the args)
# FIXME[bash-e]: Bash scripts should use -e -- but this script fails
6
+
# with the following errors for ecommerce & edx_notes_api:
7
+
# - RuntimeError: Model class openedx.core.djangoapps.content_libraries.models.ContentLibrary doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
0 commit comments