Skip to content

ci(#2618): retry transient issue creation auth failures - #7055

Open
shairevivo wants to merge 1 commit into
fullsend-ai:mainfrom
shairevivo:srevivo/2618-retry-create-issue
Open

ci(#2618): retry transient issue creation auth failures#7055
shairevivo wants to merge 1 commit into
fullsend-ai:mainfrom
shairevivo:srevivo/2618-retry-create-issue

Conversation

@shairevivo

Copy link
Copy Markdown
Contributor

Summary

Retry the e2e triage test's issue-creation request when GitHub temporarily returns HTTP 401. Other errors still fail immediately so genuine authorization and validation failures are not hidden.

Related Issue

Fixes #2618

Changes

  • retry typed GitHub 401 errors up to three total attempts
  • use context-aware 10-second and 20-second backoff delays
  • cover recovery, typed non-401 fail-fast behavior, and retry exhaustion

Testing

  • make lint passes (stage changes first, then run)
  • Tests added/updated for new or modified logic
  • go test -race -tags=e2e ./e2e/admin -run '^TestCreateIssueWithRetry_' -count=1
  • e2e admin package compiles with the e2e build tag

The broader make go-test command was also run. It reached two unrelated baseline failures in internal/harnessdispatch and internal/sandbox; neither package compiles these e2e-tagged files.

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) — human and human-directed agent sessions only
  • I wrote this contribution myself and can explain all changes in it

@shairevivo
shairevivo requested a review from a team as a code owner September 6, 2026 08:42
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Retry transient GitHub 401s during e2e issue creation

🐞 Bug fix 🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Retries transient GitHub 401 responses during e2e triage issue creation.
• Applies cancelable 10-second and 20-second delays before returning the final error.
• Tests recovery, non-401 fail-fast behavior, and retry exhaustion.
Diagram

graph TD
  A["Triage E2E"] --> B["Create issue"] --> C{"Request result"}
  C -->|Success| D["Continue triage"]
  C -->|401 attempts remain| E["Context wait"] --> B
  C -->|Other or exhausted| F["Return error"]
  E -->|Canceled| F
Loading
High-Level Assessment

The targeted e2e helper is appropriate because HTTP 401 is normally an authentication failure and is intentionally absent from the shared GitHub transient-error classification. Retrying only this provisioning-sensitive request avoids broad client behavior changes while preserving immediate failure for genuine authorization and validation problems.

Files changed (2) +122 / -1

Bug fix (1) +30 / -1
admin_test.goRetry transient 401s when creating the triage test issue +30/-1

Retry transient 401s when creating the triage test issue

• Routes triage issue creation through a bounded three-attempt helper. The helper retries only typed GitHub 401 errors with context-aware 10-second and 20-second delays, while all other errors fail immediately.

e2e/admin/admin_test.go

Tests (1) +92 / -0
create_issue_retry_test.goCover issue-creation retry behavior +92/-0

Cover issue-creation retry behavior

• Adds e2e-tagged tests for recovery after two unauthorized responses, immediate failure on non-401 errors, and exhaustion after three unauthorized attempts. Injected delay channels keep the tests deterministic and fast.

e2e/admin/create_issue_retry_test.go

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Retry e2e issue creation up to three times when GitHub returns 401.

Fail immediately for other errors and keep backoff context-aware.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Shai Revivo <srevivo@redhat.com>
@shairevivo
shairevivo force-pushed the srevivo/2618-retry-create-issue branch from 23f32e6 to d00a959 Compare September 7, 2026 13:48
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.

e2e: CreateIssue call in admin_test.go lacks retry for transient 401s

1 participant