Try to capture a screenshot on error - #284
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (12)
🧰 Additional context used🪛 zizmor (1.29.0).github/workflows/box.yml[warning] 80-80: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) 🔇 Additional comments (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe workflow extends build timeouts, installs QEMU QMP support, configures Packer failure handling, and captures a QEMU screen dump when the build fails. ChangesQEMU build diagnostics
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/box.yml:
- Around line 92-95: Bound the qmp-shell invocation in the failed-build handler
with an explicit step-level timeout so unavailable or unresponsive monitor files
cannot delay log upload until the job timeout; keep the existing
always/build-outcome condition and screendump command behavior unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 4b35646c-598b-47ee-881a-058fd7749b8d
📒 Files selected for processing (1)
.github/workflows/box.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: ci / setup
🧰 Additional context used
🪛 zizmor (1.29.0)
.github/workflows/box.yml
[warning] 79-79: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
🔇 Additional comments (1)
.github/workflows/box.yml (1)
65-65: LGTM!Also applies to: 76-81
| - if: always() && steps.build.outcome != 'success' && steps.build.outcome != 'skipped' | ||
| run: | | ||
| echo 'screendump filename=logs/screen.png format=png' | qmp-shell -v output-*/*.monitor | ||
|
|
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== workflow file excerpt =="
if [ -f .github/workflows/box.yml ]; then
nl -ba .github/workflows/box.yml | sed -n '1,140p'
else
echo "missing .github/workflows/box.yml"
fi
echo
echo "== timeout usage in workflow =="
rg -n "timeout|qmp-shell|shell-timeout|screendump|steps\.build\.outcome" .github/workflows/box.yml || true
echo
echo "== QMP references =="
rg -n "qmp-shell|output-\*|monitor|screendump" .github/workflows/box.yml . 2>/dev/null | head -200 || true
echo
echo "== GitHub Actions timeout usage nearby =="
rg -n "timeout-minutes:|shell:|run: |timeout " .github/workflows/box.ymlRepository: ddterm/gnome-shell-box
Length of output: 228
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== workflow file excerpt =="
if [ -f .github/workflows/box.yml ]; then
cat -n .github/workflows/box.yml | sed -n '1,140p'
else
echo "missing .github/workflows/box.yml"
fi
echo
echo "== timeout usage in workflow =="
rg -n "timeout|qmp-shell|shell-timeout|screendump|steps\.build\.outcome" .github/workflows/box.yml || true
echo
echo "== QMP references =="
rg -n "qmp-shell|output-\*|monitor|screendump" .github/workflows/box.yml . 2>/dev/null | head -200 || true
echo
echo "== GitHub Actions timeout usage nearby =="
rg -n "timeout-minutes:|shell:|run: |timeout " .github/workflows/box.ymlRepository: ddterm/gnome-shell-box
Length of output: 6311
Bound the QMP failure handler.
This failed-build step runs under the 45-minute job timeout and has no step-level timeout around qmp-shell. If output-*/*.monitor is unavailable or unresponsive, the log-upload path can be delayed until the job timeout.
Add a bounded timeout for the qmp-shell call.
Proposed fix
- echo 'screendump filename=logs/screen.png format=png' | qmp-shell -v output-*/*.monitor
+ echo 'screendump filename=logs/screen.png format=png' |
+ timeout --signal=TERM --kill-after=5s 30s qmp-shell -v output-*/*.monitor📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - if: always() && steps.build.outcome != 'success' && steps.build.outcome != 'skipped' | |
| run: | | |
| echo 'screendump filename=logs/screen.png format=png' | qmp-shell -v output-*/*.monitor | |
| - if: always() && steps.build.outcome != 'success' && steps.build.outcome != 'skipped' | |
| run: | | |
| echo 'screendump filename=logs/screen.png format=png' | | |
| timeout --signal=TERM --kill-after=5s 30s qmp-shell -v output-*/*.monitor |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/box.yml around lines 92 - 95, Bound the qmp-shell
invocation in the failed-build handler with an explicit step-level timeout so
unavailable or unresponsive monitor files cannot delay log upload until the job
timeout; keep the existing always/build-outcome condition and screendump command
behavior unchanged.
1e916c9 to
5dad922
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
No description provided.