Skip to content

Many options do not have a configured fallback value even if the documentation says so #990

@ichard26

Description

@ichard26

What's the issue:

Some of the configurable knobs don't actually have a fallback value defined even though the documentation explicitly states these values do have a default. Case in point, let's take a gander at the [mirror].timeout value -- it's documented as having a default of 10 seconds:

The default value for this setting is 10 seconds.
https://bandersnatch.readthedocs.io/en/latest/mirror_configuration.html#timeout

buttt looking at the source code it actually doesn't have one:

mirror_url = config.get("mirror", "master")
timeout = config.getfloat("mirror", "timeout")
global_timeout = config.getfloat("mirror", "global-timeout", fallback=None)

Potential solutions:

  • Fix the lack of fallback=$val for all of the options that are documented having a default
  • Fix the documentation to avoid stating these options have a default

I personally prefer the first one since having defaults makes sense so fixing the code to actually implement them is a good idea ... although this is a good opportunity to do a configuration adiut and see if any options shouldn't exist / or have a default / should have their default changed.

Additional context:

I was notified of this issue from a quick exchange in the Python Discord server: https://discord.com/channels/267624335836053506/463035462760792066/877942046952947722

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationBandersnatch Documentation Related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions