-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
Context
The fix-permissions script at base-images/utils/fix-permissions currently logs an error but exits with status 0 when the target path doesn't exist (lines 17-21):
if ! [ -e "$1" ] ; then
echo "ERROR: File or directory $1 does not exist." >&2
# We still want to end successfully
exit 0
fiThis behavior could mask configuration bugs (e.g., incorrect paths in Dockerfile) that would be better caught at build time.
Background
The script is a modified version of the upstream s2i/scl script:
https://github.com/sclorg/s2i-python-container/blob/master/3.13-minimal/root/usr/bin/fix-permissions
The rationale for this behavior in the upstream script is unclear.
Potential improvements
Consider one or more of the following:
- Make the script fail loudly (exit 1) when the target doesn't exist
- Make this behavior configurable via an environment flag (e.g.,
FAIL_ON_MISSING=true/false) - Ensure the error message is prominent enough to be noticed in build logs
- Document the rationale for the current behavior if it should be preserved
Related
- PR: RHAIENG-2042: chore(base-images): use AIPCC-style scripting instead of scl base to add
s390xarchitecture to odh-base-image-cpu-py312-c9s #2690 - Review comment: RHAIENG-2042: chore(base-images): use AIPCC-style scripting instead of scl base to add
s390xarchitecture to odh-base-image-cpu-py312-c9s #2690 (comment) - Requested by: @jiridanek
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
📋 Backlog