Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smarter cleaning rules for packages with SemVer #184

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

ErikApption
Copy link

Smarter cleaning rules for packages

  • MaxHistoryPerMajorVersion: Maximum number of major versions
  • MaxHistoryPerMinorVersion: Maximum number of minor versions for each major version
  • MaxHistoryPerPatch: Maximum number of patch versions for each major + minor version
  • MaxHistoryPerPrerelease: Maximum number of prerelease versions for each major + minor + patch version and prerelease type. if you have beta and alpha this will keep MaxHistoryPerPrerelease versions for both beta and alpha.

@ErikApption
Copy link
Author

@robford123 Hey Rob, any chances you could look at integrating the PR?

Copy link

@seriouz seriouz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thing are on the todo before we can merge this.
Why did you remove so many lines in the tests? Better would be to create a complete new test file for the smart cleaning only.

src/BaGetter.Core/Indexing/PackageDeletionService.cs Outdated Show resolved Hide resolved
/// If this is set to a value, it will limit the number of versions that can be pushed for a package.
/// the older versions will be deleted.
/// </summary>
public uint? MaxVersionsPerPackage { get; set; } = null;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about people, who are currently using this setting? You must set it deprecated/obsolete.
If they are using it currently you should fill the new RetentionOptions with the value of MaxVersionsPerPackage. A message in the console should point them to the problem so they can move to the new configuration.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree - I was hoping this PR would be rolled in release before my other one that had the MaxVersionsPerPackage

src/BaGetter.Core/Indexing/PackageDeletionService.cs Outdated Show resolved Hide resolved
src/BaGetter.Core/Indexing/PackageDeletionService.cs Outdated Show resolved Hide resolved
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.

3 participants