-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add CI check for variable/dictionary keys/filenames compliance #209
Comments
Hi there! |
@tyll I don't think this issue is entirely valid anymore - can we close it or substantially change it? |
So all of these are still valid? Then the only change I would propose to the requirements is that the |
Role argument validation might help, e.g. for string variables that expect specific values. |
The naming rules are a requirement that came from the system roles team, so you would need to tell me.
I removed the "yaml" suffix. The places to check still look valid. The general problem that this is supposed to solve is to codify code policies (such as the variable naming) into CI checks so they are immediately found and it does not depend on the right person doing the review. If we have some other tool that does this check already, then this would be invalid. In general the CI task might be useful for other system roles as well, except they might have a different architecture (no custom module), which would make it more complex. |
Seems like ansible-lint and ansible-test should check for anything/everything that Ansible considers to be invalid. I don't think they check for all of these, so having someone see what ansible-lint/ansible-test check for, then adding another check to cover the gaps would be useful.
The CI task would be useful for all system roles. @Precious000 thank you for your interest in this issue - you do not have to be assigned in order to work on the issue, as I don't think anyone else will be working on it. You can submit a pull request. If you still want to be assigned, please let me know. You have offered to work on other issues, so perhaps you should decide on which one you would like to work on first, then you can be assigned to one of them. |
I just realized the background here was that the network role module accepted a dictionary key in
|
As reported in #189, dictionary keys and variables should be named according to the following rules:
The CI check should check the following:
parse_validator
fromscripts/print_all_options.py
) (to be merged in Add script to print all options the role accepts #208)The text was updated successfully, but these errors were encountered: