Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Enh #448: Add grouping to `make` help output (@Xakki, @samdark)
- Enh #449: Update composer dependencies and refactor to replace use of deprecated classes (@vjik)
- Chg #449: Remove `yiisoft/data-response` dependency (@vjik)
- Enh #456: Add "service update paused" case for swarm deployment log parsing (@samdark)
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CHANGELOG entry references #456, but the linked issue/intent in the PR description is yiisoft/app#455. Please update the issue/PR number in the changelog line to match the correct tracker reference.

Copilot uses AI. Check for mistakes.

## 1.2.0 February 20, 2026

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ ifeq ($(PRIMARY_GOAL),prod-deploy)
prod-deploy: ## Deploy to production.
set -euo pipefail \
docker -H ${PROD_SSH} stack deploy --prune --detach=false --with-registry-auth -c docker/compose.yml -c docker/prod/compose.yml ${STACK_NAME} 2>&1 | tee deploy.log \
if grep -qiE 'rollback:|update rolled back' deploy.log then \
if grep -qiE 'rollback:|update rolled back|service update paused' deploy.log then \
Comment on lines 128 to +130
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shell syntax in this recipe is invalid as written: with line continuations (\), set -euo pipefail and the tee deploy.log pipeline need command separators (typically ; \), and the if grep ... condition must use ; then. Otherwise these tokens concatenate into a single set invocation and/or produce a syntax error near unexpected token 'then', preventing make prod-deploy from running.

Copilot uses AI. Check for mistakes.
FAILED_TASK_ID="$(grep -oiE 'task[[:space:]]+[a-z0-9]+' deploy.log | head -n 1 | awk '{print $2}')" \
if [ -n "${FAILED_TASK_ID}" ]; then \
echo "Docker Swarm update rolled back; failing job. Failed task ID: ${FAILED_TASK_ID}" \
echo "Docker Swarm update failed. Failed task ID: ${FAILED_TASK_ID}" \
echo "--- docker service logs (${FAILED_TASK_ID}) ---" \
docker -H ${PROD_SSH} service logs --timestamps --tail 500 "${FAILED_TASK_ID}" || true \
else \
echo 'Docker Swarm update rolled back; failing job. Failed task ID: not found in deploy output.' \
echo 'Docker Swarm update failed. Failed task ID: not found in deploy output.' \
fi \
exit 1 \
fi
Expand Down
Loading