Repository navigation
Ignore unlisted versions when choosing the release to compare with - #113
Merged
Merged
Conversation
The flat container lists every version of a package, unlisted ones too, so an unlisted 8.0.1 of Elastic.Transport became the baseline for every build and made unchanged code a major change. PreviousRelease now reads the registration, which says which versions are listed, and falls back to the flat container for a feed that has none. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.
The tool no longer picks an unlisted package version as the release to compare with, so a version its owner took off the feed cannot turn unchanged code into a major change.
Prompt summary: Onboard Elastic.Transport to the assembly-differ GitHub Action. On unchanged main the tool reported a major change against an unlisted 8.0.1, so the owner asked for the tool to ignore unlisted packages and for a bug-fix PR here.
Why
PreviousRelease.Findreads versions from NuGet's flat container, which lists every version, unlisted ones too.Elastic.Transport8.0.1 is unlisted on nuget.org (its registration sayslisted: false), yet it was the newest version, soprojectsandnugetcompared unchanged 1.1.x code with it and suggested Major. Thereleasecommand only avoided it because 8.0.1 is above the packed version.What
Baseline from the registration
Findnow lists versions throughPackageMetadataResourcewithincludeUnlisted: false, so only listed, stable versions below the given one are candidates. The rule for stable and lower versions is unchanged.Feeds without a registration
A v3 feed that offers no registration resource makes NuGet throw.
Findcatches that and lists the flat container as before, so such a feed keeps working. Local folder feeds have no unlisted state and are unaffected.Test feed
FakeNuGetFeedserves a v3 service index, flat container, registration and.nupkgfiles on localhost, with a per-versionlistedflag.UnlistedReleaseTestspublishes a listed 1.0.0 and an unlisted 8.0.1 and expectsreleasefor 9.0.0 to compare with 1.0.0.Out of scope: the other
FindPackageByIdResourceuses (nugetprovider downloads) still read the flat container; they fetch a version the user names, not a baseline.Verify
Put the old
PreviousRelease.csback and the test fails withComparing with ... 8.0.1. On a checkout ofelastic/elastic-transport-netafterdotnet build -c Release,assembly-differ projectsnow saysComparing Elastic.Transport ... with Elastic.Transport 1.1.0andSuggested version change: None; before it said8.0.1andMajor. The native-AOT binary resolves Proc 0.18.0's previous release as 0.17.0 (thesmokeaotcommand, run by hand).🤖 Generated with Claude Code