Skip to content

fix(e2e): authenticate self-update dry-run to avoid GitHub rate limit - #1667

Merged
skevetter merged 1 commit into
mainfrom
fix/flake-ubuntu-e2e-sudo
Oct 23, 2026
Merged

skevetter merged 1 commit into
mainfrom
fix/flake-ubuntu-e2e-sudo

Conversation

@skevetter

@skevetter skevetter commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

The self-update e2e spec runs devsy update --dry-run, which calls the GitHub releases API. pkg/selfupdate/source.go authenticates only from GITHUB_TOKEN, but the e2e job exports GH_ACCESS_TOKEN, so the call is unauthenticated and hits the shared-IP rate limit (RATE_LIMITED in 0.15s on runs 39700556559 and 39388152441, both first-attempt failures on main).

The spec now forwards GH_ACCESS_TOKEN as GITHUB_TOKEN for its own process only, so other specs and the gh-forwarding fixture still see the environment unchanged.

Verified locally: valid token passes; GH_ACCESS_TOKEN=bogus fails with "401 Bad credentials", showing the token reaches the update client.

Summary by CodeRabbit

  • Tests
    • Updated the self-update dry-run test to handle an existing access token without changing other token settings.
  • User Impact
    • No end-user-facing changes.

@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 746bcb3
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6adae3dc86e4d08d5d17d10a

@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: a9f0040c-58f9-4619-9c42-86c289cc966d
📥 Commits

Reviewing files that changed from the base of the PR and between 2ed6d87 and 746bcb3.

📒 Files selected for processing: 1
  • e2e/tests/self/self.go

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

📝 Walkthrough

The self-update dry-run test now copies a nonempty GH_ACCESS_TOKEN value to GITHUB_TOKEN. If GH_ACCESS_TOKEN is empty, the test leaves GITHUB_TOKEN unchanged.

Changes: Self-update token setup

Layer / File(s) Summary
Configure the test token
e2e/tests/self/self.go
When GH_ACCESS_TOKEN is nonempty, the test sets GITHUB_TOKEN to that value using Ginkgo’s test-scoped environment setter.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 746bc

The self-update dry-run token setup is mergeable as reviewed.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description clearly explains the problem, the cause, the scope of the fix, and local verification. However, it omits the required template sections for issue tracking, change type, AI assistance, … Complete the required pull request template. Add the Fixes or Refs line, select the change type, disclose AI assistance, document the e2e test suite and commands, complete the checklist, and include any applicable reviewer notes.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: authenticating the self-update dry-run to avoid GitHub rate limits. It follows the expected Conventional Commits format.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

Full details: Description check

Explanation

The description clearly explains the problem, the cause, the scope of the fix, and local verification. However, it omits the required template sections for issue tracking, change type, AI assistance, testing details, checklist items, and reviewer notes.

Resolution

Complete the required pull request template. Add the Fixes or Refs line, select the change type, disclose AI assistance, document the e2e test suite and commands, complete the checklist, and include any applicable reviewer notes.

✨ 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.

@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 746bcb3
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6adae3dcf8430aa60a0eed8f

@skevetter
skevetter marked this pull request as ready for review October 23, 2026 05:24
@skevetter

Copy link
Copy Markdown
Contributor Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

The self-update test now copies a nonempty GH_ACCESS_TOKEN into GITHUB_TOKEN before running update --dry-run.

  • The self-update check passes its GitHub token to the update command.

Reviews (1) · Last reviewed commit: "fix(e2e): authenticate self-update dry-r..." · Reviewed by Greptile

@mergify

mergify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@skevetter
skevetter merged commit 19160da into main Oct 23, 2026
115 checks passed
@skevetter
skevetter deleted the fix/flake-ubuntu-e2e-sudo branch October 23, 2026 05:29
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