docs: returners, beacons, reactors, mine, Thorium cleanup#69564
Draft
dwoz wants to merge 3 commits into
Draft
Conversation
The reactor docs claimed that beacon-fired events arrive wrapped in data['data'], but the master's _minion_event handler unwraps each event before firing it on the bus. Reactors see the beacon payload directly at data['id']. Document both paths and pin the shapes with unit tests. Closes saltstack#61616
Sphinx flagged 'Title underline too short' on the three worked examples added for saltstack#61921. Shorten the titles so the underline matches. Closes saltstack#61921
Issues addressed: saltstack#62017 (returner context table), saltstack#63367 (rolled into the same returner-context section), saltstack#63693 + saltstack#65019 (inotify install), saltstack#61332 (network_settings pyroute2 dep), saltstack#47675 (mine.update in module.run footgun), saltstack#39959 (rawfile_json cache-context note), saltstack#58130 (hashutil.github_signature quoting note). Closes saltstack#62017 saltstack#63367 saltstack#63693 saltstack#65019 saltstack#61332 saltstack#47675 saltstack#39959 saltstack#58130
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.
Summary
Documentation cleanup for the event subsystem — returners, beacons, reactors, mine, Thorium. Ten open issues from the docs backlog, addressed at the source files and pinned by unit tests so future drift is loud.
Issues closed
--return,master_job_cache,ext_job_cache,event_return) now have a side-by-side table indoc/ref/returners/index.rstcovering which side runs the returner, which config file each context reads, and which returner functions are required.doc/topics/reactor/index.rstno longer wrongly mandatesdata['data']for beacon-fired events. The master's_minion_eventunwraps beacon events before re-firing, so reactors see the beacon payload directly atdata['id']. Both shapes (beacons vsevent.send) are now distinguished with worked snippets.doc/topics/beacons/index.rstandsalt/beacons/inotify.pyno longer recommend the non-existentpython-inotifypackage. Onedir vs system-Python install paths are documented.salt/beacons/network_settings.pynow listspyroute2as a dependency with install guidance for both onedir and system-Python.doc/topics/thorium/index.rst. Each one is parsed by a unit test that also asserts every<module>.<function>reference resolves to a real Thorium function.doc/topics/mine/index.rstnow has an "Updating the Mine From a State" section explaining whymine.updateinsidemodule.runsilently drops the refresh, with three correct alternatives.salt/returners/rawfile_json.pydocstring now notes that it only implementsreturnerandevent_return, so it cannot be used as amaster_job_cacheorext_job_cachebackend. Code fix is left for the upstream bug.hashutil.github_signaturedocstring now explains thatchallenge_hmacis a single positional<hash>=<hex>string and must be quoted on the CLI. Code fix is left for the upstream bug.Test plan
pytest tests/pytests/unit/thorium/test_documented_examples.py tests/pytests/unit/beacons/test_documented_configs.py— 9 passed locally (3 Thorium SLS YAML parses, 3 Thorium module/function existence checks, 1 inotify example validation, 2 beacon-vs-event.senddata dict shape pins).sphinx -W --keep-going -b htmlclean on a fresh build (no new warnings).sphinx -W --keep-going -b manclean.pre-commitclean across every changed file.Strategy
Branch matrix: oldest-first (
3006.x). Merge-forward to3007.x,3008.x,master. Event subsystem interface is stable across all four branches; no code logic changes.Out of scope
rawfile_jsoncannot act as a job cache) and hashutil.github_signature does not recognize sha argument #58130 (hashutil.github_signaturekeyword-arg ambiguity). Documented as known issues with links to the open bugs.