Skip to content

Commit d77ae80

Browse files
committed
feat(parallel): quiet docker compose pull under --parallel
Under --parallel, sibling containers' compose-pull progress bars interleave into unreadable output. Pass --quiet to docker compose pull when PARALLEL > 1 so the live progress UI is suppressed; hoist's own per-container Checking.../ Pulling image... log lines still show activity. Serial runs are unchanged. Bump HOIST_VERSION to 1.8.1 and document the behavior in README/CLAUDE.
1 parent 5b674b4 commit d77ae80

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ A worked Ansible playbook that drives `--cron install` through this contract liv
142142

143143
`--parallel N` uses a bash worker pool (`process_container "$c" &` + `wait -n`) inside the same shell process. Forked subshells inherit functions and variables natively, so no `export -f` is needed — new helpers Just Work. Bash 4.3+ is required for `wait -n`. Per-container state goes through cache files (`.notified`, `.run-result`, `.rollup`) since variables modified in a `&` subshell don't propagate back to the parent.
144144

145+
When `PARALLEL > 1`, `compose_pull_wrapper` (`hoist.sh:393`) passes `--quiet` to `docker compose pull` so sibling containers' progress bars don't interleave into unreadable output. Hoist's own per-container `Checking...` / `Pulling image...` log lines still print, so the run never looks hung. Serial runs (`PARALLEL=1`, the default) keep Docker's verbose progress output.
146+
145147
### Notification channels and rollup
146148

147149
Per-container labels: discord, slack, generic, telegram, gotify, ntfy, teams, matrix. Each channel also has a `GLOBAL_*` fallback in config. When `WEBHOOK_ROLLUP=true`, channels listed in `WEBHOOK_ROLLUP_CHANNELS` get one summary message at end of run (using the `GLOBAL_*` URL) instead of per-container sends — per-container labels for those channels are ignored.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ bash hoist.sh [options]
103103
| `--tag <value>` | Use a label subset (e.g. `--tag nightly` reads `com.sumguy.hoist.nightly.*` labels) |
104104
| `--dry-run` | Show what would be updated without pulling, recreating, or notifying (implies `--verbose`) |
105105
| `--verbose` | Log containers skipped because they have no hoist labels |
106-
| `--parallel <N>` | Process containers concurrently with `N` workers |
106+
| `--parallel <N>` | Process containers concurrently with `N` workers (`N > 1` passes `--quiet` to `docker compose pull` to keep interleaved progress output readable; hoist's own per-container log lines still show) |
107107
| `--only <names>` | Comma-separated list of container names to include (others ignored). Names not currently running emit a warning. |
108108
| `--exclude <names>` | Comma-separated list of container names to skip. Highest precedence — wins over `--only`. |
109109
| `--list`, `--status` | Print a table of all running containers with their label config and last-cached digest, then exit. No pulls or updates are performed. |

hoist.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
HOIST_VERSION="1.8.0"
2+
HOIST_VERSION="1.8.1"
33
HOIST_REPO="KingPin/hoist"
44

55
DOCKER_BINARY="${DOCKER_BINARY:-$(which docker)}"
@@ -392,7 +392,15 @@ _compose_exec() {
392392

393393
compose_pull_wrapper() {
394394
[[ "$1" == /* ]] || { log "Error: compose workdir is not an absolute path: $1"; return 1; }
395-
_with_project_lock "$1" _compose_exec "$1" "$2" pull
395+
# Under --parallel, sibling containers' compose-pull progress bars interleave
396+
# into unreadable garbage. Suppress Docker's progress UI with --quiet there;
397+
# hoist's own per-container "Pulling image..." log lines still show activity.
398+
# Serial runs keep the verbose progress output.
399+
if (( PARALLEL > 1 )); then
400+
_with_project_lock "$1" _compose_exec "$1" "$2" pull --quiet
401+
else
402+
_with_project_lock "$1" _compose_exec "$1" "$2" pull
403+
fi
396404
}
397405

398406
compose_up_wrapper() {

0 commit comments

Comments
 (0)