[3006.x] Rework pillar/renderers/encryption documentation#69560
Draft
dwoz wants to merge 1 commit into
Draft
Conversation
Address twelve doc issues: - 56239, 61283: Pillar Data Structure section with worked merge example - 58929: per-saltenv root example in git_pillar - 59539: GPG terminology note in encryption section - 60378: clarify default=<class 'KeyError'> in pillar.get docstring - 61828: Module.run **kwargs workaround for dotted function names - 62733: per-file #!yaml|gpg shebang renderer for pillar - 62802: custom modules in pillar must be synced master-side - 63110: targeting -I against a specific pillarenv - 63698: py renderer expanded examples + highstate return shape - 65682: --homedir required on every documented gpg encrypt command - 66622: key: subkey separator on pillar include:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Rewrites the pillar / renderers / encryption documentation to close
twelve open documentation issues in one pass. Each documented example
is also pinned by a regression test so future edits cannot silently
break the snippet a user copy-pastes from the docs.
Issues addressed
pillar.getdefault=<class 'KeyError'>)Module.runwith pyobjects + dotted function names)-Iagainst a specific pillarenv)--homedirmissing from documented gpg encrypt examples)include:subkey separator)Where
Doc / docstring changes:
doc/topics/pillar/index.rst: new "Pillar Data Structure" sectionwith worked merge example, GPG-terminology note, per-file shebang
renderer subsection,
include: key:separator note,custom modulessubsection.
doc/topics/targeting/pillar.rst: new "Targeting against a specificpillarenv" section.
salt/modules/pillar.py:get()docstring explains the<class 'KeyError'>rendering of the internal sentinel.salt/renderers/gpg.py: all encrypt examples now pass--homedir /etc/salt/gpgkeys.salt/renderers/py.py: three new worked examples(
__salt__["http.query"], result-based control flow, highstatereturn shape).
salt/renderers/pyobjects.py: new subsection forModule.runwithdotted function names via
**kwargs.salt/pillar/git_pillar.py: new "Per-saltenv root" section beforeall_saltenvs.Tests:
tests/pytests/functional/pillar/test_documented_examples.pytests/pytests/functional/pillar/test_gpg_encryption_documented.pytests/pytests/unit/renderers/test_pyobjects_documented.pytests/pytests/unit/renderers/test_py_renderer_documented.pyTest plan
sphinx-build -W -b html doc/ doc/_build/html-- clean.pre-commit runon every touched file -- Lint Salt + Lint Testspass.
pytest --run-slowover the four new test modules -- 11/11pass on 3006.x, 3007.x, 3008.x, master.
--homedir,uses the documented encrypt command line, and decrypts via the
pillar gpg renderer (both
decrypt_pillarand#!yaml|gpgshebang variants).