remove the repository feature flags mechanism - #10374
Open
ThomasWaldmann wants to merge 2 commits into
Open
ThomasWaldmann wants to merge 2 commits into
ThomasWaldmann wants to merge 2 commits into
Conversation
The manifest could carry per-operation "mandatory feature" sets that lock out borg versions not supporting them, mirrored into the cache config as ignored_features / mandatory_features to force cache rebuilds. No feature was ever defined (SUPPORTED_REPO_FEATURES was empty) and nothing ever wrote feature flags, so the whole mechanism was dead code: the compatibility checks in Manifest.load(), the cache compatibility check/wipe/update, the ManifestItem validation of config["feature_flags"] and the docs. The manifest's config dict stays (general purpose, preserved by all borg versions), but borg does not store anything in it now. MandatoryFeatureUnsupported is kept (never raised) so that its return code 25 stays reserved. The Manifest.Operation names and the compatibility= argument of the with_repository decorators are left in place as inert placeholders, they are removed in the next commit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Leftovers of the feature flags mechanism removed in the previous commit: the Manifest.Operation enum, NO_OPERATION_CHECK, the operations parameter of Manifest.load(), compat_check() and the compatibility= argument of the with_repository / with_other_repository decorators, plus all their call sites in the archiver command modules and the tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10374 +/- ##
==========================================
+ Coverage 88.08% 88.10% +0.01%
==========================================
Files 103 103
Lines 18887 18796 -91
Branches 2919 2905 -14
==========================================
- Hits 16637 16560 -77
+ Misses 1558 1550 -8
+ Partials 692 686 -6 ☔ View full report in Codecov by Harness. |
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.
Follow-up to #10371, #10372 and #10373: the last content the manifest could carry.
What feature flags were. The manifest's
configcould hold per-operation (read / check / write / delete) sets of "mandatory" feature names; a borg not supporting one of them refused the operation withMandatoryFeatureUnsupported. The cache config mirrored them asignored_features/mandatory_featuresto force a cache rebuild when a version with a different feature set came along.Why it goes. No feature was ever defined (
SUPPORTED_REPO_FEATURESwas empty) and nothing ever wrote feature flags, so all of it was dead code: the checks inManifest.load(), the cache compatibility check / wipe / update, theManifestItemvalidation ofconfig["feature_flags"], thecompatibility=argument every command decorator had to carry, and a page of docs.Two commits:
data-structures.rst, the cache config example) and the tests that set an unknown feature.Manifest.Operationand the decorator argument stay as inert placeholders so the commit is green on its own.Manifest.Operation,NO_OPERATION_CHECK, theoperationsparameter ofManifest.load(),compat_check(), thecompatibility=argument ofwith_repository/with_other_repository, and all call sites (39 files, mechanical).Kept:
MandatoryFeatureUnsupportedstays defined, never raised, so rc 25 stays reserved.configdict stays as a general-purpose, preserved-by-all-versions slot; borg currently stores nothing in it. The manifest is now{"version": 2, "archives": {}, "config": {}}.Full suite passes locally (FUSE mount tests deselected: macFUSE is unavailable on this machine after an OS update, they fail identically on master).
🤖 Generated with Claude Code