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

(Work-in-progress) Update config file reading and validation #1694

Closed
wants to merge 9 commits into from

Commits on Apr 1, 2024

  1. Fix custom config reference syntax for diff-file

    This replaces the implementation for custom configparser option
    references in the diff-file option. Moves detection and handling for
    the custom syntax into a dedicated submodule. Uses a regular expression
    to preserve text before and after the reference.
    flyinghyrax committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    e4668e1 View commit details
    Browse the repository at this point in the history
  2. Fix diff-file being written unconditionally.

    Restore original behavior where a diff file is only written if
    the 'mirror.diff-file' config option is set to a non-empty value.
    flyinghyrax committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    7784f06 View commit details
    Browse the repository at this point in the history
  3. Add changelog entry

    flyinghyrax committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    b3b23b0 View commit details
    Browse the repository at this point in the history
  4. Refactoring of Storage and Bander...Mirror inits

    Change the Storage base class and the storage plugin loading functions
    to require a ConfigParser instance so the BandersnatchConfig singleton
    is not accessed.
    
    Change the BandersnatchMirror class to require a Storage instance
    instead of a storage backend name since the mirror subcommand already
    loads a storage plugin instance.
    
    The diff in the application code is relatively simple, but both changes
    caused cascading/rippling updates to the unit tests that will require a
    regrettable amount of tedious review. It would be nice to find a way to
    split up this commit.
    flyinghyrax committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    7cdbfe2 View commit details
    Browse the repository at this point in the history
  5. Refactoring of Filter & Mirror initialization

    Change the Filter base class and filter loader to require an external
    ConfigParser instance be passed in.
    
    Change the Mirror/BandersnatchMirror classes to require an external
    instance of LoadedFilters.
    
    op/ed: Remember all that nonsense you told yourself about removing a
    singleton making the tests simpler? Well so far that is not the case.
    flyinghyrax committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    ef2e388 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    eadc324 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2024

  1. Configuration menu
    Copy the full SHA
    9e6244f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0030683 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. Configuration menu
    Copy the full SHA
    df9d88a View commit details
    Browse the repository at this point in the history