[ci] Diagnose logcat capture failures and retry the task once - #12744
jonathanpeppers merged 4 commits into
Conversation
Bound adb capture before Azure task cancellation, preserve per-attempt diagnostics, and retain result uploads after a recovered capture failure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the existing artifact upload policy and remove the standalone helper and tests. Keep basic console diagnostics and a bounded capture for the task-level retry. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The updated logcat capture script exits before printing the saved adb devices discovery output to the task log on failures due to set -e, reducing diagnostics when capture is most needed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the APK instrumentation pipeline template to make logcat capture more diagnosable and resilient to intermittent hangs by adding inline capture diagnostics and enabling a single Azure task-level retry.
Changes:
- Replace the previous best-effort
adb devices/adb logcatcapture with a time-bounded helper that logs timestamps, exit codes, and output byte counts. - Persist
adb devicesoutput alongside the captured logcat file and add a hard 45s shared deadline to allow task-level retry. - Increase the step timeout to 2 minutes and enable
retryCountOnTaskFailure: 1.
File summaries
| File | Description |
|---|---|
| build-tools/automation/yaml-templates/apk-instrumentation.yaml | Adds inline, time-bounded logcat capture diagnostics and enables one task-level retry for the capture step. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
/review |
|
✅ Android PR Reviewer completed successfully! Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "azcliprod.blob.core.windows.net"See Network Configuration for more information.
|
There was a problem hiding this comment.
The bounded capture and explicit adb status logging are useful improvements, and the ordinary nonzero adb devices path now prints discovery output before propagating failure. The remaining timeout path exits from inside the helper, so the diagnostic output for the hang this PR is intended to investigate can be skipped and overwritten by the retry; I left an inline comment with the requested control-flow change.
CI is still in progress for Azure DevOps build 1589763: six checks have passed, the remaining build/test matrix is running or queued, and no failed check is currently reported.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
azcliprod.blob.core.windows.net
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "azcliprod.blob.core.windows.net"See Network Configuration for more information.
Generated by Android PR Reviewer for #12744 · copilot · gpt56 · 53.5 AIC · ⌖ 11.3 AIC · ⊞ 21K
Comment /review to run again
Allow the caller to print partial discovery output before propagating the timeout status. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve the logcat capture conflict by preserving the diagnostics added in #12744 while keeping capture-only timeouts non-gating. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add basic logcat capture diagnostics and try one task-level retry to see whether it reduces intermittent capture failures. This should provide more information than a task timeout alone; whether the retry helps remains to be observed in CI.
Keep capture inline in the instrumentation YAML, logging timestamps, elapsed time, exit codes, output size, and narrowly scoped adb client tracing. Bound capture to 45 seconds so a hang returns a failure before the outer task timeout, allowing Azure to retry once within a two-minute task budget.
Keep the existing logcat artifact path, no-device skip behavior, artifact upload policy, and final failure handling.