Improve update-plugins workflow resilience#7407
Conversation
Continue processing remaining plugins when one fails instead of crashing. Add summary at the end showing succeeded/failed/skipped counts and plugin names. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Review Summary by QodoImprove update-plugins workflow resilience and error handling
WalkthroughsDescription• Continue processing remaining plugins when one fails • Add summary showing succeeded/failed/skipped counts • Remove tail truncation for full checkPlugin output visibility • Track plugin status throughout workflow execution Diagramflowchart LR
A["Plugin Processing Loop"] --> B["Clone/Pull Plugin"]
B --> C{Success?}
C -->|No| D["Add to Skipped List"]
C -->|Yes| E["Run checkPlugin"]
E --> F{Success?}
F -->|Yes| G["Add to Succeeded List"]
F -->|No| H["Add to Failed List"]
D --> I["Continue to Next"]
G --> I
H --> I
I --> J["Display Summary"]
File Changes1. .github/workflows/update-plugins.yml
|
Code Review by Qodo
1. Unconditional cd escapes workspace
|
| if cd etherpad-lite/bin && pnpm run checkPlugin "$plugin" autopush 2>&1; then | ||
| succeeded="$succeeded $plugin" | ||
| else | ||
| echo "WARN: checkPlugin failed for $plugin" | ||
| failed="$failed $plugin" | ||
| fi | ||
| cd ../.. |
There was a problem hiding this comment.
1. Unconditional cd escapes workspace 🐞 Bug ≡ Correctness
If cd etherpad-lite/bin fails, the script still executes cd ../.., moving out of the intended parent directory and causing subsequent clone/pull/checks to run from the wrong location. This can make later iterations fail unpredictably (and potentially stop the job due to default bash -e behavior).
Agent Prompt
### Issue description
The workflow does `if cd etherpad-lite/bin && pnpm ...; then ... else ... fi` and then unconditionally runs `cd ../..`. If the `cd etherpad-lite/bin` fails, the script is still in the parent directory (after `cd ..`) and `cd ../..` moves out of the intended workspace, breaking subsequent relative-path operations.
### Issue Context
This step runs under GitHub Actions' default bash settings (includes `-e`), so once the script ends up in the wrong directory, later commands can fail and abort the run.
### Fix Focus Areas
- .github/workflows/update-plugins.yml[42-71]
### Suggested change
Prefer one of:
1) Run the check in a subshell so the working directory never needs to be restored:
```bash
if (cd etherpad-lite/bin && pnpm run checkPlugin "$plugin" autopush 2>&1); then
...
else
...
fi
```
2) Or explicitly guard and restore:
```bash
repo_root=$(pwd)
cd etherpad-lite/bin || { echo "WARN: missing etherpad-lite/bin"; failed="$failed $plugin"; continue; }
...
cd "$repo_root"
```
Also remove the unconditional `cd ../..` if using the subshell approach.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Summary
tail -20truncation so full checkPlugin output is visible for debuggingTest plan
🤖 Generated with Claude Code