Implement machines signal / exec / ps — clear the roadmap#57
Merged
Conversation
The last three roadmap endpoints move from 501 to implemented, so the /_mudflaps/health unimplemented list is now empty. - POST .../signal — validate the signal against the Machines API enum (400 on an invalid name), 404 for an unknown machine; like stop, the signal is not really delivered (SignalRequest). - POST .../exec — return a deterministic ExecResponse (exit 0, stdout echoes the command); 400 with no command, 404 for an unknown machine. mudflaps runs no real command (MachineExecRequest / ExecResponse). - GET .../ps — return a deterministic process list (a pid-1 init); 404 for an unknown machine (ProcessStat / ListenSocket). Moves the three paths from unimplementedPaths to implementedPaths (the former is now empty). Updates the health test, adds positive tests for each endpoint, and refreshes the README + api-coverage docs (which also stops overstating volumes/secrets/certs/IP as 501 — those already ship). Closes #54, closes #55, closes #56.
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.
Closes #54, closes #55, closes #56.
What
Implements the last three roadmap endpoints, moving them from
501to fully implemented — so/_mudflaps/healthnow reports an emptyunimplementedlist.POST /v1/apps/{app}/machines/{id}/signal— validates the signal name against the Machines API enum (400on invalid,404unknown machine). Like stop, mudflaps doesn't model real signal delivery.POST /v1/apps/{app}/machines/{id}/exec— returns a deterministicExecResponse(exit 0, stdout echoes the command;400with no command,404unknown). mudflaps runs no real command.GET /v1/apps/{app}/machines/{id}/ps— returns a deterministic process list (a pid-1 init;404unknown).New wire types:
SignalRequest,MachineExecRequest,ExecResponse,ProcessStat,ListenSocket— hand-mirrored against the Machines OpenAPI.Also
unimplementedPathsis now empty (retained for staging future endpoints).docs/api-coverage.mdrefreshed — and corrected: they no longer overstate volumes/secrets/certs/IP as501(those already shipped in 0.3.0).Release
Cutting
v0.4.0after merge (minor — new endpoints).go test ./...,go vet,gofmtall clean.