Repository navigation
20261016 - Push fleet snapshots to retina-server - #12
Open
Volyarosh94 wants to merge 1 commit into
Open
Volyarosh94 wants to merge 1 commit into
Volyarosh94 wants to merge 1 commit into
Conversation
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
mender_snapshot.pyreads the whole fleet from Mender (devauth v2 plus inventory v1, paged at 500, no status filter). It POSTs one snapshot to each target inRETINA_SYNC_TARGETS, following the contract in retina-server'sdocs/mender-snapshot.md.auto_accept.pyonly gains the call aftermain(). Acceptance, deployment andNODE_ID_PREFIXare untouched, and the snapshot itself isn't filtered..env.exampledocumentRETINA_SYNC_TARGETS, with test as an optional third target.MENDER_SOURCEswitch, Fleet page) is Mirror Mender's fleet for registration and the admin Fleet page retina-server#683. This one is safe to merge first, because nothing is pushed untilRETINA_SYNC_TARGETSis set.Calls I made
_record, but fails closed where_recordwould pass junk through. A junk device status (null, empty, not a string), or an accepted set without an id or pubkey, goes out asambiguous. A missing status key still defaults to accepted. A disagreeing device status is passed through, so registration still refuses it.main()even if the pass raises, and never changes the exit code.=, and bad entries are reported by position so a token can't reach the journal. A token or PAT with a space, control or non-ASCII character is refused, so it can't end up in an error line. Redirects are not followed.Z. The source ismender-auto-accept@<short hostname>.node_idis sent as null. Two devices on onenode_idare both sent, with a warning.Tested
pytest: 228 passed (145 new, mocks only), each new rule caught by a broken copy, ruff 0.16.2 and the dead-code hook clean.