Repository navigation
feat(retention): delete prereleases of majors older than the latest stable major - #27
Merged
Merged
Conversation
…table major Retention could cap versions per level, but prereleases made obsolete by a newer stable major stayed until a count limit happened to catch them. - New Retention:DeletePrereleasesOfOlderMajors (default false). When on, every prerelease whose major is below the package's latest stable major is deleted; a package without a stable version keeps its prereleases, and the version being indexed is still never deleted by its own run. - The rule runs on its own, without any Max* limit, and only ever deletes more versions when combined with them. - Per-feed override: Feed.RetentionDeletePrereleasesOfOlderMajors (null uses the global value), with a migration for all four providers, a switch on the admin feed settings page and the field in FeedResponse. - Docs (configuration, feeds) and UI checklist row FS8. Fixes #25
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.
Delete prereleases of majors older than the latest stable major
Retention:DeletePrereleasesOfOlderMajors(defaultfalse, so nothing changes by default). When on, every prerelease whose major is below the package's latest stable major is deleted, e.g.2.1.0-beta.1once3.0.0exists, while3.1.0-beta.1and4.0.0-alpha.1are kept. A package without a stable version keeps all its prereleases.Max*limit needed) and only adds deletions when combined with the limits. The version being indexed is still never deleted by its own run.Feed.RetentionDeletePrereleasesOfOlderMajors(nulluses the global value): migration for Sqlite, SqlServer, PostgreSql and MySql (one nullable column), merged inFeedSettingsResolver, a switch with "Use global default" on the admin feed settings page, and the field inFeedResponse.PackageDeletionServiceTests(on, off, no stable version, indexed old prerelease kept, combined withMaxPrereleaseVersions), an end-to-end case inPackageIndexingServiceInMemoryTests,FeedSettingsResolverTestsandFeedSettingsMirrorTests(save and clear the override).configuration.md, the settings table infeeds.md, and UI checklist row FS8.UI checked in
testenvwith the dev image: FS1, FS2a and FS8 pass. In FS3 the browser's ownmin="0"validation stops the form before it is posted, so the server-side message isn't shown; the stored value stays unchanged. That behavior predates this change.Addresses #25