Skip to content

[3006.x] Rework pillar/renderers/encryption documentation#69560

Draft
dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:dwoz/docs/pr5-pillar-3006
Draft

[3006.x] Rework pillar/renderers/encryption documentation#69560
dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:dwoz/docs/pr5-pillar-3006

Conversation

@dwoz

@dwoz dwoz commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

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

Where

Doc / docstring changes:

  • doc/topics/pillar/index.rst: new "Pillar Data Structure" section
    with worked merge example, GPG-terminology note, per-file shebang
    renderer subsection, include: key: separator note, custom modules
    subsection.
  • doc/topics/targeting/pillar.rst: new "Targeting against a specific
    pillarenv" 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, highstate
    return shape).
  • salt/renderers/pyobjects.py: new subsection for Module.run with
    dotted function names via **kwargs.
  • salt/pillar/git_pillar.py: new "Per-saltenv root" section before
    all_saltenvs.

Tests:

  • tests/pytests/functional/pillar/test_documented_examples.py
  • tests/pytests/functional/pillar/test_gpg_encryption_documented.py
  • tests/pytests/unit/renderers/test_pyobjects_documented.py
  • tests/pytests/unit/renderers/test_py_renderer_documented.py

Test plan

  • sphinx-build -W -b html doc/ doc/_build/html -- clean.
  • pre-commit run on every touched file -- Lint Salt + Lint Tests
    pass.
  • pytest --run-slow over the four new test modules -- 11/11
    pass on 3006.x, 3007.x, 3008.x, master.
  • GPG round-trip generates a fresh keypair in a tmp --homedir,
    uses the documented encrypt command line, and decrypts via the
    pillar gpg renderer (both decrypt_pillar and #!yaml|gpg
    shebang variants).

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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant