add a local-setup phase that can be run from the creating system#16
Open
rjbs wants to merge 7 commits into
Open
add a local-setup phase that can be run from the creating system#16rjbs wants to merge 7 commits into
rjbs wants to merge 7 commits into
Conversation
Don't require that something be passed in. If we get neither taskstream_cb nor logsnippet_cb, create a TaskStream callback just in time. I want this because I want to add a second use of the callback, and we can't reuse one that's been finalized. This is a bit of a cop out. The correct refactoring would change BoxManager to expect a callback factory, not a callback. This one just lets it act like one if we got no specific callback. Something to fix later... This also corrects a bug in the verbose_setup callback. It wasn't returning a Future, so couldn't be properly awaited.
First, only log the process status of the ssh process if it wasn't 0. All zeroes are alike. Then, stop saying a box is all done, because it might go on to need locally-run setup (see the next commit).
A local setup program is run after the box is created, up, and has had its remote custom setup run. This is useful for copying elements to the box that can only be retrieved from the local operator's environment.
Threads an optional env hash through _run_process_streaming via IO::Async::Process's setup parameter, then uses it on the local setup invocation to (a) signal FM_TASKSTREAM=1 like the remote ssh path does, and (b) replace the NAME:/LABEL:/USERNAME: argv entries with BOX_NAME, BOX_LABEL, BOX_USERNAME env vars -- which is what the original never-committed design was using. Co-authored-by: Claude <noreply@anthropic.com>
_mk_taskstream references Dobby::Boxmate::TaskStream, but the class wasn't loaded by BoxManager itself; in production it worked only because Dobby::Boxmate::App happens to load TaskStream first. Add an explicit use so BoxManager is self-sufficient. Co-authored-by: Claude <noreply@anthropic.com>
After the BUILD constraint was relaxed to allow neither cb, the no-cb-given case (where _mk_taskstream synthesizes a fresh TaskStream) had no test coverage. Add one. Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
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.
No description provided.