Skip to content

remove the repository feature flags mechanism - #10374

Open
ThomasWaldmann wants to merge 2 commits into
borgbackup:masterfrom
ThomasWaldmann:drop-feature-flags
Open

ThomasWaldmann wants to merge 2 commits into
borgbackup:masterfrom
ThomasWaldmann:drop-feature-flags

Conversation

@ThomasWaldmann

Copy link
Copy Markdown
Member

Follow-up to #10371, #10372 and #10373: the last content the manifest could carry.

What feature flags were. The manifest's config could hold per-operation (read / check / write / delete) sets of "mandatory" feature names; a borg not supporting one of them refused the operation with MandatoryFeatureUnsupported. The cache config mirrored them as ignored_features / mandatory_features to force a cache rebuild when a version with a different feature set came along.

Why it goes. No feature was ever defined (SUPPORTED_REPO_FEATURES was empty) and nothing ever wrote feature flags, so all of it was dead code: the checks in Manifest.load(), the cache compatibility check / wipe / update, the ManifestItem validation of config["feature_flags"], the compatibility= argument every command decorator had to carry, and a page of docs.

Two commits:

  1. Remove the mechanism: manifest checks, cache bookkeeping, item validation, docs (the whole "Feature flags" section of data-structures.rst, the cache config example) and the tests that set an unknown feature. Manifest.Operation and the decorator argument stay as inert placeholders so the commit is green on its own.
  2. Remove the placeholders: Manifest.Operation, NO_OPERATION_CHECK, the operations parameter of Manifest.load(), compat_check(), the compatibility= argument of with_repository / with_other_repository, and all call sites (39 files, mechanical).

Kept:

  • MandatoryFeatureUnsupported stays defined, never raised, so rc 25 stays reserved.
  • The manifest's config dict stays as a general-purpose, preserved-by-all-versions slot; borg currently stores nothing in it. The manifest is now {"version": 2, "archives": {}, "config": {}}.
  • Cache config files that still contain the two feature keys load fine (configparser ignores keys nobody reads) and lose them on the next save.

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

ThomasWaldmann and others added 2 commits September 15, 2026 01:28
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

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.10%. Comparing base (2b5eeea) to head (62c7a99).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

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.

1 participant