Skip to content

[awf] extension upgrade: GHE mixed-host falsely reports "already up to date" #3246

@lpcox

Description

@lpcox

Problem

gh extension upgrade aw reports already up to date in GHE-authenticated environments while a newer version exists on github.com. Users remain on stale versions unless they know to manually pin with GH_HOST=github.com.

Context

Original report: github/gh-aw#32479

Reporter on macOS/Apple Silicon, gh v2.92.0, authenticated to ghe.example.com. Extension installed from github.com (v0.72.1), newer release v0.74.0 available, but upgrade check resolves against active GHE host and finds nothing newer.

Root Cause

gh extension upgrade resolves update metadata against the currently active auth host rather than the extension's canonical origin (github.com). When GHE is the active host, the update check queries the GHE instance, which has no record of newer github.com releases, so it returns "already up to date."

Proposed Solution

  1. Track canonical origin at install time — store the source registry/host in extension metadata so upgrade checks always query the correct host regardless of active auth context.
  2. Surface host context in upgrade output — print which host is being queried (e.g., checking updates from github.com) so users can diagnose mismatches.
  3. Fallback to github.com — if the active host has no record of the extension, retry against github.com as the canonical source.

Relevant code: gh CLI extension upgrade logic and gh extension install metadata storage.

Generated by Firewall Issue Dispatcher · ● 10.7M ·

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions