-
Notifications
You must be signed in to change notification settings - Fork 141
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
configparser.NoOptionError: No option 'storage-backend' in section: 'mirror' #1702
Labels
Comments
Thanks for the report. @flyinghyrax is working on making our defaults better as there are some gaps. This is one. #1694 is part of it. |
cooperlees
added
bug
Something isn't working
help wanted
Extra attention is needed
labels
Apr 12, 2024
Indeed! I'm hoping to work more on it this weekend. |
flyinghyrax
added a commit
to flyinghyrax/bandersnatch
that referenced
this issue
May 27, 2024
This splits the existing 'default.conf' config file shipped with the package into two similar files: "defaults.conf" and "example.conf". "example.conf" is an exact copy of the previous "default.conf". The new "defaults.conf" is a stripped-down version containing only default values for all mirror configuration options except "mirror.directory". BandersnatchConfig is changed to *always* read defaults.conf, then read the user config file if one is specified. This leaves the ConfigParser populated with default values for any mirror options that aren't set by the user (except mirror.directory). Notable ripple effects for this include: - It is no longer meaningful to check ConfigParser.has_option with the 'mirror' section. Instead, you have to check whether the options value is empty or None. - Specifying a default/fallback value when calling .get on the 'mirror' section will have no effect, because the option will already be present in the ConfigParser mappings. As (mostly) an implementation detail, BandersnatchConfig is changed to be a subclass of ConfigParser. The BandersnatchConfig singleton can be used anywhere a ConfigParser instance is expected without having to use '.config' to access a nested ConfigParser. Fixes pypa#1702 Fixes pypa#990
flyinghyrax
added a commit
to flyinghyrax/bandersnatch
that referenced
this issue
May 28, 2024
This splits the existing 'default.conf' config file shipped with the package into two similar files: "defaults.conf" and "example.conf". "example.conf" is an exact copy of the previous "default.conf". The new "defaults.conf" is a stripped-down version containing only default values for all mirror configuration options except "mirror.directory". BandersnatchConfig is changed to *always* read defaults.conf, then read the user config file if one is specified. This leaves the ConfigParser populated with default values for any mirror options that aren't set by the user (except mirror.directory). Notable ripple effects for this include: - It is no longer meaningful to check ConfigParser.has_option with the 'mirror' section. Instead, you have to check whether the options value is empty or None. - Specifying a default/fallback value when calling .get on the 'mirror' section will have no effect, because the option will already be present in the ConfigParser mappings. As (mostly) an implementation detail, BandersnatchConfig is changed to be a subclass of ConfigParser. The BandersnatchConfig singleton can be used anywhere a ConfigParser instance is expected without having to use '.config' to access a nested ConfigParser. Fixes pypa#1702 Fixes pypa#990
cooperlees
added a commit
that referenced
this issue
May 29, 2024
* Provide default values for mirror config options This splits the existing 'default.conf' config file shipped with the package into two similar files: "defaults.conf" and "example.conf". "example.conf" is an exact copy of the previous "default.conf". The new "defaults.conf" is a stripped-down version containing only default values for all mirror configuration options except "mirror.directory". BandersnatchConfig is changed to *always* read defaults.conf, then read the user config file if one is specified. This leaves the ConfigParser populated with default values for any mirror options that aren't set by the user (except mirror.directory). Notable ripple effects for this include: - It is no longer meaningful to check ConfigParser.has_option with the 'mirror' section. Instead, you have to check whether the options value is empty or None. - Specifying a default/fallback value when calling .get on the 'mirror' section will have no effect, because the option will already be present in the ConfigParser mappings. As (mostly) an implementation detail, BandersnatchConfig is changed to be a subclass of ConfigParser. The BandersnatchConfig singleton can be used anywhere a ConfigParser instance is expected without having to use '.config' to access a nested ConfigParser. Fixes #1702 Fixes #990 * Update mirror configuration documentation page Add default values for options that are no longer required. * Fix unnecessary concatenation in a string literal Co-authored-by: Cooper Lees <[email protected]> --------- Co-authored-by: Cooper Lees <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm using v6.5.0 and when I attempt to use
bandersnatch verify --delete
I get a key error.I read the docs, and from what I understand, storage-backend defaults to filesystem, so I didn't think it would be required to add it into the configuration file.
https://bandersnatch.readthedocs.io/en/latest/mirror_configuration.html#storage-backend
The mirror section looks like this:
The text was updated successfully, but these errors were encountered: