Remove dead org auto-upgrade code#2057
Open
tyrielv wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The in-product org auto-upgrade mechanism (OrgInfo server → upgrade ring → NuGet feed) has been dead code for years.
gvfs upgradeis 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 upgradeverb 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 byOrgInfoApiClient; also removed itsGVFSJsonContext[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.LocalGVFSConfigkeys inGVFSConstants.cs:upgrade.ring,upgrade.feedpackagename,upgrade.feedurl,upgrade.orgInfoServerUrl. (usn.updateDirectorieskept — 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.OrgInfoApiClientTests.cs,AzDevOpsOrgFromNuGetFeedTests.cs.Setup.iss) ring→NuGet-feed plumbing:SetNuGetFeedIfNecessary(and its call site inPrepareToInstall),GetConfiguredUpgradeRing,IsConfigured,SetIfNotConfigured, and theUpgradeRingtype. These existed solely to writeupgrade.feedurl/upgrade.feedpackagenamefor the now-dead upgrader;IsConfigured/SetIfNotConfiguredwere only used bySetNuGetFeedIfNecessary.Deliberately left untouched (live / unrelated)
gvfs upgradeverb (UpgradeVerb.cs) — kept as the no-op stub and still registered in the CLI.GVFS.Service/PendingUpgradeHandler.cs,PendingUpgradeMonitor.cs, versioned-install layout) — this is the live 2.0 staged-install feature, not org auto-upgrade.DiskLayoutUpgrades/,RepoMetadataversion bumps) — unrelated, live.usn.updateDirectoriesconfig key — live.Validation
dotnet build src\GVFS\GVFS.UnitTests\GVFS.UnitTests.csproj -c Debug→ succeeded, 0 warnings, 0 errors.Build.batincluding the Inno Setup installer → compiled successfully (only pre-existing, unrelated Inno Setup deprecation warnings).