hostagent: unify requirement progress logging with (N/total) counter#4902
Open
mn-ram wants to merge 1 commit intolima-vm:masterfrom
Open
hostagent: unify requirement progress logging with (N/total) counter#4902mn-ram wants to merge 1 commit intolima-vm:masterfrom
mn-ram wants to merge 1 commit intolima-vm:masterfrom
Conversation
Today the hostagent emits three independently-numbered groups of requirement logs (essential X of N, optional X of N, final X of N) plus a separate "Waiting for the guest agent to be running" line, which makes it hard to follow the sequence or build a progress indicator. Pre-compute the total number of steps (essential + optional + guest agent + final) and thread a shared counter through waitForRequirements so each line is prefixed with `(N/total)`. The lead-in becomes the important detail (`Waiting for ssh`), the requirement description is no longer quoted, and the satisfied form drops the per-group label: (1/10) Waiting for ssh (essential) (1/10) Ssh is satisfied (3/10) Waiting for systemd must be available (3/10) Systemd must be available is satisfied (9/10) Waiting for the guest agent to be running (9/10) Guest agent is running Fixes lima-vm#4553. Signed-off-by: mn-ram <235066282+mn-ram@users.noreply.github.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.
Fixes #4553.
Pre-compute the total number of requirement steps (essential + optional + guest-agent wait + final) and thread a shared counter through
waitForRequirementsso each progress line is prefixed with(N/total). The description is no longer quoted, and the satisfied line drops the per-group label.Sample output (k8s template; 10 total steps):
go build ./...,go vet ./pkg/hostagent/...,go test ./pkg/hostagent/...all clean.