Repository navigation
feat(cli): the deploy window names every component, scrolls, and survives Ctrl-C - #508
Merged
Merged
Conversation
…ives Ctrl-C The live deploy window: - names a component before it starts, instead of "◯ Pending..."; - keeps the components pane's content in the model, so the keys scroll it, and follows the component being deployed until a key scrolls it; - polls once at a time, only components that have started, with no extra pod query per workload; - reads a workload's status from its ready count, so a healthy one is Ready, not an amber "Running"; - on Ctrl-C, closes and says the deploy goes on; later lines print to the terminal, and a second Ctrl-C ends kates; - prints the percentage once. The wizard: - prints the platform, how it was told, the Kubernetes version and the account before the first question, admin-less too (detect.Platform); - shows beside each component what is installed, in any namespace; - asks the namespaces on two pages at most; - runs its forms in huh's accessible mode, and the window as plain lines, when TERM=dumb or KATES_ACCESSIBLE=1; - says "Monitoring (Prometheus + Grafana)" where it said "Jaeger (Tracing)".
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.
Why
Three bugs made the live deploy window unreadable once a deploy had more than a screenful of components:
View's copy of the viewport.Ctrl-C closed the window and nothing else. The deploy went on with nowhere to print, and the terminal looked hung until it ended.
This is also PR 3 of
plans/deploy-enhancement.md, the wizard.What
The deploy window (
deploy_dashboard.go):kubectlcalls up. Only components that have started are polled, and the per-workload pod query is gone.DashboardController.closed), and a second Ctrl-C ends kates. Stopping the deploy on the first Ctrl-C would kill Helm mid-install, and deploy has no recovery for a release left pending.The wizard:
detect.Platform). Admin-less runs get this line too, read from what any account may read. The admin-less overlays are unchanged.· kafka-ui-0.3.2 in kafka.TERM=dumborKATES_ACCESSIBLE=1, every deploy form runs in huh's accessible mode, and the window prints plain lines.Deliberately not done
failureHintonly in the final summary.Tests
New:
TestDashboardComponentsPane,TestDashboardPollsOneAtATime,TestDashboardCtrlCClosesWindowOnly,TestInstalledHints,TestPlatform_ReadsOnlyWhatItNeeds.Run locally:
cli:go test -p 1 ./... -race -count=1,go vet ./...,golangci-lint run --new-from-rev=origin/main ./...(0 issues) andgovulncheck ./...;scripts/check-cli-style.shandscripts/check-cli-compat.sh;kates:./mvnw test, which CI runs on CLI changes.Not run: the wizard and the window in a real TTY against a cluster. The window was checked by rendering it in a test.