fix: make overlay dep grep non-fatal under pipefail (#281)#381
Open
jeremylongshore wants to merge 1 commit into
Open
fix: make overlay dep grep non-fatal under pipefail (#281)#381jeremylongshore wants to merge 1 commit into
jeremylongshore wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #281.
services/api/entrypoint.shruns underset -euo pipefail. When an overlay tool dir exists but yields zero pip deps,_extra_depsis just a newline, so the[[ -n "${_extra_deps}" ]]guard passes butgrep -v '^$'matches nothing and exits 1. With no|| true, the script aborts beforeexec "$@"and the api pod CrashLoopBackOffs with empty logs.One-line guard on the grep, as suggested in the issue:
No effect on the success path: with real deps
grepexits 0 and the guard is a no-op; with none, the empty file is already handled by the guardeduv pip install -r ... || trueon the next line.Tested:
shellcheckclean,bash -nok, and an isolated repro of the fragment crashes before / passes after. I couldn't run the full overlay-mount path end-to-end without the cluster.