Repository navigation
feat(modules): report remotely-triggered self-update outcome to NetPulse (#549) - #551
Merged
Merged
Conversation
The SSE upgrade command from NetPulse starts NetGrip's own self-update detached, and its failures (download, arch check, install, not enough space) only reached the router log: from the NetPulse UI the action looked like a no-op with no error shown. Arm a one-shot outcome hook before starting the self-update and report the terminal state back to NetPulse (upgrade-progress / upgrade-result with the agent token), so the server can show real progress and the failure reason. Closes #549
borky
pushed a commit
to borky/netgrip
that referenced
this pull request
Oct 25, 2026
Upstream's new upgrade-progress and upgrade-result reports (gnacho#551) used a plain client. Against a NetPulse on its private CA the handshake failed, so a self-update NetPulse triggered never reported back; and the client would have followed a redirect with the agent token. They now use the same pinned client as enrolment, the executor token and backups.
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.
When NetPulse triggers a NetGrip self-update over the agent SSE channel (
upgradeevent), NetGrip ranStartSelfUpdateasynchronously and returned nothing: no progress, no terminal result, no error. Any failure (for example the space pre-check aborting) only reached the router log, so NetPulse showed "update sent" and the button reappeared a few seconds later. From the UI it looked like updates were not allowed.This adds a one-shot outcome hook to the self-update flow:
downloading, install) and the terminal result (okbefore restart, orfailwith the real reason) are POSTed to the NetPulse agent endpoints/api/agents/{slug}/upgrade-progressand/api/agents/{slug}/upgrade-resultwith the agent token as Bearer, same contract as the standalone agent.Tests: one-shot hook consumption, failure path reporting, and the Bearer contract of the reports.
Closes #549