Merge pull request 'fix: bug: entrypoint.sh wait (no-args) serializes polling loop behind long-lived dev-agent/gardener — causes system-wide deadlock (#753)' (#755) from fix/issue-753 into main
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
This commit is contained in:
commit
ba3a11fa9d
1 changed files with 8 additions and 2 deletions
|
|
@ -385,11 +385,13 @@ print(cfg.get('primary_branch', 'main'))
|
||||||
log "Processing project TOML: ${toml}"
|
log "Processing project TOML: ${toml}"
|
||||||
|
|
||||||
# --- Fast agents: run in background, wait before slow agents ---
|
# --- Fast agents: run in background, wait before slow agents ---
|
||||||
|
FAST_PIDS=()
|
||||||
|
|
||||||
# Review poll (every iteration)
|
# Review poll (every iteration)
|
||||||
if [[ ",${AGENT_ROLES}," == *",review,"* ]]; then
|
if [[ ",${AGENT_ROLES}," == *",review,"* ]]; then
|
||||||
log "Running review-poll (iteration ${iteration}) for ${toml}"
|
log "Running review-poll (iteration ${iteration}) for ${toml}"
|
||||||
gosu agent bash -c "cd ${DISINTO_DIR} && bash review/review-poll.sh \"${toml}\"" >> "${DISINTO_LOG_DIR}/review-poll.log" 2>&1 &
|
gosu agent bash -c "cd ${DISINTO_DIR} && bash review/review-poll.sh \"${toml}\"" >> "${DISINTO_LOG_DIR}/review-poll.log" 2>&1 &
|
||||||
|
FAST_PIDS+=($!)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 2 # stagger fast polls
|
sleep 2 # stagger fast polls
|
||||||
|
|
@ -398,10 +400,14 @@ print(cfg.get('primary_branch', 'main'))
|
||||||
if [[ ",${AGENT_ROLES}," == *",dev,"* ]]; then
|
if [[ ",${AGENT_ROLES}," == *",dev,"* ]]; then
|
||||||
log "Running dev-poll (iteration ${iteration}) for ${toml}"
|
log "Running dev-poll (iteration ${iteration}) for ${toml}"
|
||||||
gosu agent bash -c "cd ${DISINTO_DIR} && bash dev/dev-poll.sh \"${toml}\"" >> "${DISINTO_LOG_DIR}/dev-poll.log" 2>&1 &
|
gosu agent bash -c "cd ${DISINTO_DIR} && bash dev/dev-poll.sh \"${toml}\"" >> "${DISINTO_LOG_DIR}/dev-poll.log" 2>&1 &
|
||||||
|
FAST_PIDS+=($!)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wait for fast polls to finish before launching slow agents
|
# Wait only for THIS iteration's fast polls — long-running gardener/dev-agent
|
||||||
wait
|
# from prior iterations must not block us.
|
||||||
|
if [ ${#FAST_PIDS[@]} -gt 0 ]; then
|
||||||
|
wait "${FAST_PIDS[@]}"
|
||||||
|
fi
|
||||||
|
|
||||||
# --- Slow agents: run in background with pgrep guard ---
|
# --- Slow agents: run in background with pgrep guard ---
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue