-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Module to list arguments to salt modules without loading #56685
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome approach!
Just found a nitpick on a comment.
Windows test failures are related and look problematic. |
The windows failures seems to be with saltutils.sync* functions, which should not be impacted by the addition of this module. I am also unable to replicate the errors locally. Any thoughts? |
all tests for master currently appear to be dependent on #56700 |
What does this PR do?
This is a rewrite of the baredoc module first merged in #52044 and to be merged into master in #54570
The original baredoc used regex parsing to find functions and attributes. This PR rewrites baredoc to use python ast as a less brittle parser.
There are occasional use-cases for listing state functions. It might not be common, but in order to generate autocomplete listings for vscode, I needed to know what possible state functions might exist. I tried installing a bunch of dependencies and run on linux and windows to use sys.list_state_functions. That was pretty good, but probably missed lots of states which won't load due to dependencies.
The reasoning for baredoc's existence was listed as:
What issues does this PR fix or reference?
Possibly superseeds: #54570
New Behavior
Provides a listing of salt execution and state modules functions and default arguments by reading files from the filesystem rather than having to local code requiring dependencies. Support custom modules (anything synced with saltutil.sync_{states,modules} as well as func_alias
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
No