Skip to content

Feature/ifconfig helpers #383

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

StaticRocket
Copy link
Member

Add a new validation wrapper to guard against problematic ifconfig
values. This also allows us to quickly make all conditionally masked
sections visible and play with that logic quickly in a global fashion.
This basically adds an early warning mechanism for config values that
are no longer valid, misspellings, etc.

This is a bit of a hack. The process_ifconfig_nodes in sphinx actually
builds a local namespace for evaluating the Python given in the
directive. As such only builtin functions are carried over.

This means to get anything into that context we need to taint the global
builtins definitions. This is fine so long as we don't collide with
anything.

Add a new validation wrapper to guard against problematic ifconfig
values. This also allows us to quickly make all conditionally masked
sections visible and play with that logic quickly in a global fashion.
This basically adds an early warning mechanism for config values that
are no longer valid, misspellings, etc.

This is a bit of a hack. The process_ifconfig_nodes in sphinx actually
builds a local namespace for evaluating the Python given in the
directive. As such only builtin functions are carried over.

This means to get anything into that context we need to taint the global
builtins definitions. This is fine so long as we don't collide with
anything.

Signed-off-by: Randolph Sapp <[email protected]>
Use the new key_within helper and add a buggy platform entry to see if
it catches it.

Signed-off-by: Randolph Sapp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants