Add service update paused case for swarm deployment log parsing#456
Add service update paused case for swarm deployment log parsing#456
service update paused case for swarm deployment log parsing#456Conversation
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
service update paused case for swarm deployment log parsing
|
@copilot add a line for CHANGELOG: |
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #456 +/- ##
=========================================
Coverage 76.96% 76.96%
Complexity 29 29
=========================================
Files 11 11
Lines 178 178
=========================================
Hits 137 137
Misses 41 41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…oyment log parsing Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the production deployment failure detection for Docker Swarm by expanding log parsing to catch the “service update paused” case, and reflects the change in user-facing output and release notes.
Changes:
- Expand
prod-deployfailure-detection grep pattern to includeservice update paused. - Adjust
prod-deployerror messages from “rolled back; failing job” to a more general “failed” wording. - Add a corresponding entry to
CHANGELOG.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Makefile | Extends swarm deploy failure detection and updates failure messaging in prod-deploy. |
| CHANGELOG.md | Documents the enhancement in the “under development” section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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 \ |
There was a problem hiding this comment.
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.
| - 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) |
There was a problem hiding this comment.
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.
The swarm deployment failure detection only matched
rollback:andupdate rolled backpatterns, missing theservice update pausedfailure case.Changes
Makefile(prod-deploy): Addedservice update pausedto the grep failure-detection pattern and updated error messages from "rolled back; failing job" to "failed" to accurately cover all matched cases:Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.