Skip to content

Remove dead org auto-upgrade code#2057

Open
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/remove-dead-org-upgrader
Open

Remove dead org auto-upgrade code#2057
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/remove-dead-org-upgrader

Conversation

@tyrielv

@tyrielv tyrielv commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The in-product org auto-upgrade mechanism (OrgInfo server → upgrade ring → NuGet feed) has been dead code for years. gvfs upgrade is already a no-op stub that just prints "no longer supported", and nothing in the product consumes these paths. Fleet upgrades are driven externally (from GitHub Releases), not by this code.

This PR removes that dead code while keeping the gvfs upgrade verb in its current no-op stub state (the CLI surface and the friendly "no longer supported" message are unchanged). Each removed symbol was confirmed to have zero live callers before removal.

Removed (proven dead)

  • GVFS.Common/OrgInfoApiClient.cs — queried an OrgInfo server by Organization/Platform/Ring. Only caller was its own unit test.
  • GVFS.Common/VersionResponse.cs — only used by OrgInfoApiClient; also removed its GVFSJsonContext [JsonSerializable] registration.
  • GVFS.Common/AzDevOpsOrgFromNuGetFeed.cs — NuGet-feed → AzDO-org parser used only by the dead NuGet upgrader path; only referenced by its own unit test.
  • LocalGVFSConfig keys in GVFSConstants.cs: upgrade.ring, upgrade.feedpackagename, upgrade.feedurl, upgrade.orgInfoServerUrl. (usn.updateDirectories kept — it's live.)
  • GVFSConstants.UpgradeVerbMessages — the entire class (ring alerts + related strings) was unreferenced once the verb body became a no-op stub.
  • GVFS.UnitTests/Mock/Common/MockLocalGVFSConfigBuilder.cs — test helper for the ring/feed config; no callers.
  • Unit tests for the removed types: OrgInfoApiClientTests.cs, AzDevOpsOrgFromNuGetFeedTests.cs.
  • Installer (Setup.iss) ring→NuGet-feed plumbing: SetNuGetFeedIfNecessary (and its call site in PrepareToInstall), GetConfiguredUpgradeRing, IsConfigured, SetIfNotConfigured, and the UpgradeRing type. These existed solely to write upgrade.feedurl/upgrade.feedpackagename for the now-dead upgrader; IsConfigured/SetIfNotConfigured were only used by SetNuGetFeedIfNecessary.

Deliberately left untouched (live / unrelated)

  • gvfs upgrade verb (UpgradeVerb.cs) — kept as the no-op stub and still registered in the CLI.
  • Non-disruptive staged upgrade (GVFS.Service/PendingUpgradeHandler.cs, PendingUpgradeMonitor.cs, versioned-install layout) — this is the live 2.0 staged-install feature, not org auto-upgrade.
  • Disk-layout / on-disk format upgrades (DiskLayoutUpgrades/, RepoMetadata version bumps) — unrelated, live.
  • usn.updateDirectories config key — live.

Validation

  • dotnet build src\GVFS\GVFS.UnitTests\GVFS.UnitTests.csproj -c Debugsucceeded, 0 warnings, 0 errors.
  • Full unit-test suite → 864 passed, 0 failed, 11 skipped.
  • Full Build.bat including the Inno Setup installer → compiled successfully (only pre-existing, unrelated Inno Setup deprecation warnings).

The in-product org auto-upgrade mechanism (OrgInfo server + upgrade ring +
NuGet feed) has been dead for years: `gvfs upgrade` is already a no-op stub
and nothing consumes these paths. Fleet upgrades are driven externally from
GitHub Releases.

Remove the dead code while keeping the `gvfs upgrade` verb in its current
no-op stub state:

- OrgInfoApiClient / VersionResponse (and its GVFSJsonContext registration)
- AzDevOpsOrgFromNuGetFeed (NuGet-feed org-parse helper, only referenced by
  the dead upgrader path and its own test)
- LocalGVFSConfig keys upgrade.ring / upgrade.feedpackagename /
  upgrade.feedurl / upgrade.orgInfoServerUrl
- the now-unreferenced GVFSConstants.UpgradeVerbMessages class
- MockLocalGVFSConfigBuilder and the removed types' unit tests
- installer ring->NuGet-feed plumbing (SetNuGetFeedIfNecessary,
  GetConfiguredUpgradeRing, IsConfigured, SetIfNotConfigured, UpgradeRing)

Build (including the Inno Setup installer) and all unit tests pass.

Assisted-by: Claude Opus 4.8
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv tyrielv marked this pull request as ready for review July 9, 2026 23:21
@tyrielv tyrielv enabled auto-merge July 9, 2026 23:21
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.

1 participant