Skip to content

Commit

Permalink
Temporary disable support for external drivers (#3961)
Browse files Browse the repository at this point in the history
In order to avoid breaking molecule v6 due to 3rd drivers that
were not updated to the new API, we change the entry-points
so we would ignore them.
  • Loading branch information
ssbarnea authored Jul 10, 2023
1 parent 21dcd2b commit 480c6dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ changelog = "https://github.com/ansible-community/molecule/releases"
[project.scripts]
molecule = "molecule.__main__:main"

[project.entry-points."molecule.driver"]
[project.entry-points."molecule.driver.next"]
delegated = "molecule.driver.delegated:Delegated"

[project.entry-points."molecule.verifier"]
[project.entry-points."molecule.verifier.next"]
testinfra = "molecule.verifier.testinfra:Testinfra"
ansible = "molecule.verifier.ansible:Ansible"

Expand Down
8 changes: 4 additions & 4 deletions src/molecule/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class IncompatibleMoleculeRuntimeWarning(MoleculeRuntimeWarning):
def drivers(config=None) -> UserListMap:
"""Return list of active drivers."""
plugins = UserListMap()
pm = pluggy.PluginManager("molecule.driver")
pm = pluggy.PluginManager("molecule.driver.next")
try:
pm.load_setuptools_entrypoints("molecule.driver")
pm.load_setuptools_entrypoints("molecule.driver.next")
except (Exception, SystemExit):
# These are not fatal because a broken driver should not make the entire
# tool unusable.
Expand All @@ -68,9 +68,9 @@ def drivers(config=None) -> UserListMap:
def verifiers(config=None) -> UserListMap:
"""Return list of active verifiers."""
plugins = UserListMap()
pm = pluggy.PluginManager("molecule.verifier")
pm = pluggy.PluginManager("molecule.verifier.next")
try:
pm.load_setuptools_entrypoints("molecule.verifier")
pm.load_setuptools_entrypoints("molecule.verifier.next")
except Exception:
# These are not fatal because a broken verifier should not make the entire
# tool unusable.
Expand Down

0 comments on commit 480c6dc

Please sign in to comment.