Skip to content

Retry transient bridge polling errors in IssueLens action - #70

Merged
Changyong Gong (chagong) merged 1 commit into
mainfrom
chagong-issuelens-workflow-migration
Nov 26, 2026
Merged

Changyong Gong (chagong) merged 1 commit into
mainfrom
chagong-issuelens-workflow-migration

Conversation

@chagong

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 0309138f6af11e26b0c6edf4155b53a22bdb2b11

Dimension Assessment Rationale
Change confidence 9/10 ↑ 197 unit tests across bridge, action, stream output, triage, and team-memory suites pass, including 4 new tests for POST vs GET timeouts, transient poll/OIDC-refresh retries, permanent 4xx fail-fast, secret redaction, and wait-budget expiry.
↓ PR CI checks and a live workflow run against a cold-starting Flex Consumption ingress instance are still pending.
Diagnosis confidence 9.5/10 ↑ App Insights traces and GitHub Actions timestamps on run 45735931660 show job submission and Poll #1 succeeded, Poll #2 timed out at 30s (01:28:26.385Z to 01:28:56.385Z) while Flex Consumption scaled out 5 cold ingress instances, and the worker/Foundry run completed HTTP 200 in 23.2s.
Evidence fit 9.5/10 ↑ Uncaught TimeoutError inside submit_bridge() status polling directly hit the outer catch in main() that emitted Agent submission failed or its outcome is unknown; inspect the target before retrying at 01:28:56.543Z.

Summary

Fixes transient client-side bridge polling timeouts in .github/actions/issuelens observed during Flex Consumption ingress cold starts (for example, microsoft/vscode-java-pack triage run 45735931660, where status poll #2 exceeded 30s while issuelens-bridge-ingress scaled out cold instances even though the worker and Foundry invocation completed cleanly).

Changes

  • 60s non-retried submit timeout: Increase POST /api/issuelens/v1/jobs client timeout from 30s to 60s (BRIDGE_SUBMIT_TIMEOUT_SECONDS) for cold-start headroom while keeping job submission strictly single-attempt (never auto-retried).
  • Resilient status polling & OIDC token refresh: Retry transient transport errors (OSError, http.client.HTTPException) and retryable HTTP statuses (408, 429, 5xx) on GET /api/issuelens/v1/jobs/{job_id} polls and 120-second OIDC token refreshes within the existing 35-minute BRIDGE_WAIT_SECONDS deadline, logging secret-safe retry notices.
  • Fail-fast permanent errors & secret safety: Keep initial pre-submit OIDC failure, POST transport failure, and permanent 4xx poll/refresh errors (401, 403, 404) non-retryable with sanitized ValueError diagnostics that never echo bearer/OIDC tokens or raw exception strings.
  • Tests & docs: Add unit tests in tests/test_automation_bridge.py (BridgeActionTests) and document the timeout/retry behavior in .github/actions/issuelens/README.md.

Validation

  • py -m compileall -q .github/actions/issuelens/issuelens_action.py tests/test_automation_bridge.py
  • py -m unittest discover -s tests -p "test_*.py" (focused bridge, action, stream output, triage workflow, and team-memory suites — 197 tests passing)
  • git diff --check

Use a 60s timeout for non-retried bridge job submission POSTs while retrying transient transport and HTTP 408/429/5xx errors during bridge status polling and OIDC token refresh within the 35-minute wait budget.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 02:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The review reports no active issues with the bridge timeout and retry changes.

No open issues 🎉

What changed in this PR

Improves the IssueLens action’s resilience to transient bridge cold-start failures while preserving single-attempt job submission to avoid duplicate work.

Changes:

  • Increases the submission timeout to 60 seconds without retrying POST requests.
  • Retries transient status-poll and OIDC-refresh failures within the existing polling budget, while keeping permanent errors fail-fast and diagnostics secret-safe.
  • Adds regression tests and documents timeout and retry behavior.
File Description
tests/​test_automation_bridge.py Tests timeouts, retries, permanent failures, secret-safe diagnostics, and polling expiry.
.github/​actions/​issuelens/​README.md Documents submission timeouts and polling retry behavior.
.github/​actions/​issuelens/​issuelens_action.py Implements timeout settings, transient retries, and sanitized error handling.

Review effort: Balanced

@chagong
Changyong Gong (chagong) merged commit 61a9e9a into main Nov 26, 2026
8 checks passed
@chagong
Changyong Gong (chagong) deleted the chagong-issuelens-workflow-migration branch November 26, 2026 02:42
Changyong Gong (chagong) added a commit to microsoft/vscode-java-pack that referenced this pull request Nov 26, 2026
Update microsoft/IssueLens/.github/actions/issuelens to 61a9e9a5ff2f9514a3bdd351a0721235cd0a2813 following the squash merge of microsoft/IssueLens#70.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Changyong Gong (chagong) added a commit to microsoft/vscode-java-pack that referenced this pull request Nov 26, 2026
* Bump IssueLens action to retry transient bridge poll errors

Update microsoft/IssueLens/.github/actions/issuelens from b88dadd40754d640cbb82f4d9a5e9d36e8386981 to 0309138f6af11e26b0c6edf4155b53a22bdb2b11 (microsoft/IssueLens#70) in issueLens-run.yml and team-memory-coordinator.yml to adopt cold-start submit headroom and transient status-poll/OIDC-refresh retries.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Refresh IssueLens action pin to merged main commit

Update microsoft/IssueLens/.github/actions/issuelens to 61a9e9a5ff2f9514a3bdd351a0721235cd0a2813 following the squash merge of microsoft/IssueLens#70.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants