-
Notifications
You must be signed in to change notification settings - Fork 23.9k
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
validate-modules for plugins: for callback plugins, type vs. callback_type #71798
Comments
Files identified in the description: If these files are incorrect, please update the |
Per discussion today, we would like to standardize on |
callback_type -> type (ansible/ansible#71798).
Files identified in the description:
If these files are incorrect, please update the |
Files identified in the description:
If these files are incorrect, please update the |
@felixfontein is there still action to be done on this issue? |
I don't think so, it's basically documenting a decision which is now part of the schema of the validate-modules test. I'll close it. |
SUMMARY
This is not a bug, but a discussion issue for one aspect of #71734 ([WIP] Extend validate-modules to also validate plugins). It provides details on one of the points in ansible/community#560 (comment).
Callback plugins have a type. In the plugin class, it can be set as the class attribute
CALLBACK_TYPE
.For documentation, there are two versions:
callback_type: <type>
ansible/lib/ansible/plugins/callback/tree.py
Line 10 in d63d880
type: <type>
ansible/lib/ansible/plugins/callback/default.py
Line 10 in d63d880
In ansible/ansible,
type
is much more common (there's only one callback usingcallback_type
). In community.general, 1/3 of the callback plugins usescallback_type
.I would suggest that we use only one of these two. My personal suggestion would be
callback_type
, since it is close to theCALLBACK_TYPE
attribute of the plugin class. On the other hand, @abadger chosetype
in the antsibull-docs schemas (https://github.com/ansible-community/antsibull/blob/main/antsibull/schemas/callback.py#L23).ISSUE TYPE
COMPONENT NAME
test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py
ANSIBLE VERSION
2.11
bot_skip
The text was updated successfully, but these errors were encountered: