Skip to content

test(ghcredentials): run real gh tests outside the -short unit tier - #1666

Merged
skevetter merged 1 commit into
mainfrom
fix/flake-ghcredentials-real-gh
Oct 23, 2026
Merged

skevetter merged 1 commit into
mainfrom
fix/flake-ghcredentials-real-gh

Conversation

@skevetter

@skevetter skevetter commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

The real-gh tests spawn gh with a fixed 1.5s per-account lookup budget. In the -short unit tier (all packages in parallel, -race) gh start-up occasionally exceeds it, so HostAccounts returns token_lookup_failed (failure time 1.51s in runs 39884640461 and 39833879193). The GitHub Credential Host Tests job runs the same tests uncontended and passed in every one of those runs. Skip them under -short; the dedicated job (no -short, DEVSY_TEST_REAL_GH=1) still requires them.

Summary by CodeRabbit

  • Tests
    • Short-mode test runs now skip tests that require the native GitHub CLI, so those CLI-dependent tests do not run in that mode.
    • In other test runs, the existing check for CLI installation remains unchanged. This update affects test execution only and does not change application behavior or end-user functionality.

@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 1851b16
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6adae24cb812d5bc472d610d

@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 1851b16
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6adae24c74b8ed759b3566d6

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b47dcd63-b520-4c82-8aa1-897ec4158c12
📥 Commits

Reviewing files that changed from the base of the PR and between 2ed6d87 and 1851b16.

📒 Files selected for processing: 1
  • pkg/ghcredentials/host_real_test.go

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

requireRealGH now skips native GitHub CLI tests when Go short-test mode is enabled. Outside short-test mode, the existing CLI availability check remains.

Changes: Native GitHub CLI test skip

Layer / File(s) Summary
Short-mode guard
pkg/ghcredentials/host_real_test.go
requireRealGH skips tests in short-test mode. The existing gh availability check remains for other modes.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: atty303

Merge Risk: ⚪ Minimal · up to 1851b

No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description clearly explains the problem, the cause, the observed failures, and the intended test behavior. It omits the required template sections for change type, AI assistance, testing, checkli… Add the required template sections. Identify the change type, state whether AI assistance was used, document tests and manual verification, complete the checklist, and specify an issue reference or write "Fixes none" or "Refs none".
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title is concise, uses Conventional Commits form, and accurately describes moving real gh tests outside the -short unit tier.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the problem, the cause, the observed failures, and the intended test behavior. It omits the required template sections for change type, AI assistance, testing, checklist items, and issue linkage.

Resolution

Add the required template sections. Identify the change type, state whether AI assistance was used, document tests and manual verification, complete the checklist, and specify an issue reference or write "Fixes none" or "Refs none".

✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@skevetter
skevetter merged commit 43e6320 into main Oct 23, 2026
114 checks passed
@skevetter
skevetter deleted the fix/flake-ghcredentials-real-gh branch October 23, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant