Make fuzzy plugin matching deterministic.

pull/78000/head
Matt Clay 2 years ago
parent e059dde9fb
commit 5a0b230e24

@ -0,0 +1,2 @@
bugfixes:
- plugin loader - Sort results when fuzzy matching plugin names (https://github.com/ansible/ansible/issues/77966).

@ -543,6 +543,8 @@ class PluginLoader:
if not found_files:
return plugin_load_context.nope('failed fuzzy extension match for {0} in {1}'.format(full_name, acr.collection))
found_files = sorted(found_files) # sort to ensure deterministic results, with the shortest match first
if len(found_files) > 1:
# TODO: warn?
pass

Loading…
Cancel
Save