Skip to content

doctor: warn when an enabled plugin isn't installed #719

Description

@fu351

doberman plugins enable no_such_plugin succeeds, since plugin_config.enable (src/doberman/engine/plugin_config.py:130) only checks the name's format. After that nothing mentions that no installed package provides it, and doberman doctor has no plugin row (src/doberman/cli/doctor.py:584-601).

What to do: add a non-critical "Plugins" check to run_checks that compares the enabled names with the installed entry points and shows [warn] enabled but not installed: <name>. Find installed names through _iter_entry_points only. The check must never import or load a plugin.

Test (tests/unit/test_cli_doctor.py): enable a made-up name (point DOBERMAN_PLUGINS_FILE at tmp_path so the real config isn't touched) and assert the warn row. With nothing enabled the row passes.

Stretch: plugins enable prints the same warning to stderr when the name matches nothing installed.

This is separate from #638, which is about the allowlist trusting a name under every entry-point group.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomerslevel-3Write a self-contained test, or add a flag following an existing sibling pattern.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions