GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Retry version check on transient proxy failures by jojinkb · Pull Request #195 · bootdotdev/bootdev

Conversation

@jojinkb

@jojinkb jojinkb commented Jun 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Fixes #196

Problem

bootdev status — and the background update check that runs on every command via version.FetchUpdateInfo — intermittently fails with:

Unable to check version status
Error: failed to fetch latest version

The failure is transient (reproduces ~1 in 4 runs on my network). Instrumenting getLatestVersion shows the real cause is a dropped connection to the Go module proxy:

Get "https://proxy.golang.org/github.com/bootdotdev/bootdev/@latest": read tcp ...:443: read: connection reset by peer

getLatestVersion has no resilience to this:

  • No retry — a single connection reset fails the whole check.
  • No effective fallback — the proxy list is [proxy.golang.org, direct], but direct is (correctly) skipped since @latest can't be fetched from it over HTTP, so proxy.golang.org is effectively the only source.
  • No timeout on http.Get, so a stalled connection can hang.
  • The underlying error is swallowed and the HTTP status is never checked, so a non-200 body (or a 200 without a Version field) is indistinguishable from a real failure, and the user only ever sees the generic message.

Fix

  • Retry each proxy up to 3 times with a short backoff before giving up — directly addresses the transient connection resets.
  • Use an http.Client with a 10s timeout instead of bare http.Get.
  • Check for HTTP 200 and reject empty-version responses.
  • Wrap the underlying error into the returned one so bootdev status surfaces the real cause instead of an opaque message.

No change in behavior on the happy path; the version string returned is identical.

Tests

Added version/version_test.go (httptest-based, no network) covering:

  • fetchLatestFromProxy: success, non-200, invalid JSON, empty version
  • fetchLatestWithRetry: recovery after a transient dropped connection

go test ./... passes locally.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jojinkb
retry version check on transient proxy failures
960ab30
@jojinkb
jojinkb force-pushed the fix/version-check-retry branch from bc8dc45 to 960ab30 Compare June 15, 2026 18:01
@jojinkb jojinkb mentioned this pull request Jun 15, 2026
bootdev status intermittently fails: "failed to fetch latest version" #196
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

bootdev status intermittently fails: "failed to fetch latest version"

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@jojinkb
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.