mirror of
https://github.com/casjaysdevdocker/gitea
synced 2026-08-14 14:01:17 -04:00
App-breaking bug found during full runtime verification of the act_runner
cache-server feature: `__random_password()`'s `tr | head -c` pipeline
could be killed by SIGPIPE once `head -c` closes its input early, and
under `set -eo pipefail` this aborted the whole script.
- rootfs/usr/local/etc/docker/functions/entrypoint.sh: wrapped the
`tr -dc ... | head -c...` pipeline in `{ ... } || true` so a SIGPIPE
from `head` closing early no longer aborts the script
- TODO.AI.md: logged the fix and the upstream-template-sync follow-up
2.2 KiB
2.2 KiB
TODO.AI.md
Lint cleanup — pre-existing script-lint violations (found incidentally while wiring act_runner cache-server)
Not fixed yet — out of scope for the cache-enablement change; flagged by script-lint agent.
rootfs/usr/local/bin/start-runners:- line 24: UUOC —
echo "$SERVER_ADDRESS" | grep -q '://'should be[[ "$SERVER_ADDRESS" == *"://"* ]] - line 24:
grep -q '://'missing--before query
- line 24: UUOC —
rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh:- line 4:
##@Versionheader present but no matchingVERSION=assignment in script body - missing
--before the grep query at lines 124 (x2), 130, 133, 134, 369, 390, 401, 438, 468, 525 (x2), 544 (x2, also should quote thegreppattern), 571, 583
- line 4:
App-breaking bug fixed — DEBUGGER guard pattern under set -e (functions/entrypoint.sh)
Needs syncing back to the upstream template in casjay-dotfiles/scripts per the Docker Template
Update Runbook in AI.md — functions/entrypoint.sh is normally regenerated, not hand-edited.
- 26x occurrences of
[ "$DEBUGGER" = "on" ] && echo/printf/__service_banner "..."used as a bare statement: underset -e, this aborts the whole script silently whenever$DEBUGGER!= "on" (the default). This was the root cause of the container dying immediately after printing only the startup banner. Fixed by appending|| trueto all 26 occurrences.
App-breaking bug fixed — __random_password() SIGPIPE (functions/entrypoint.sh)
Needs syncing back to the upstream template in casjay-dotfiles/scripts per the Docker Template
Update Runbook in AI.md — functions/entrypoint.sh is normally regenerated, not hand-edited.
__random_password()(~line 333):tr | head -cpipeline died underset -eo pipefailon SIGPIPE. Fixed by wrapping in{ ... } || true.
Other observations not yet actioned
.gitea/workflows/docker.yamluses the same stale/unpinned action pattern (@v2-@v4, DockerHub-only,catthehacker/ubuntu:act-latest) that was removed from theopengistrepo's duplicate workflow — nobuild.ymlcounterpart exists here yet.Dockerfilesets forbidden OCI labels (org.opencontainers.image.base.name,.schema-version, duplicateauthors) — same issue previously found and fixed inopengist.