Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
ui: remove the shared Banner method (no intro banner on any command)#375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
3b40fb6
ui: remove the shared Banner method — no intro banner on any command
LukasWodka 6afdd70
fix(resources): drop the double blank before the set confirm hint (Bu…
LukasWodka 5c24c7b
resources show: pin the single-blank opening with a test (Asad review…
LukasWodka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -131,8 +131,6 @@ Exit codes: | ||
| // clientset + fake helm Runner without the real kubeconfig path (the seam | ||
| // renderResources / ingestion_run_test already use). | ||
| func runResourcesSet(ctx context.Context, p *ui.Printer, pr prompter, opts cluster.KubeconfigOptions, req setReq) error { | ||
| p.Banner("tracebloc", "machine resources") | ||
LukasWodka marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| // Pure request checks first — no cluster needed, so a bad invocation fails | ||
| // fast with exit 2 (never touching a live cluster). | ||
| if err := validateRequestShape(req, pr != nil); err != nil { | ||
| @@ -234,6 +232,7 @@ func applyResourcesSet(ctx context.Context, p *ui.Printer, pr prompter, target * | ||
| // is still validated below, before anything mutates. | ||
| ceilingUnchanged := sameCeiling(desired, current) | ||
| if ceilingUnchanged && !phantomGPU { | ||
| p.Newline() | ||
| p.Successf("Each training run already uses up to %s — nothing to change.", perRunSize(desired)) | ||
| return nil | ||
| } | ||
| @@ -243,6 +242,7 @@ func applyResourcesSet(ctx context.Context, p *ui.Printer, pr prompter, target * | ||
| // clean no-op — fall through to persist so BuildEnvSpec's explicit-empty | ||
| // GPU override lands and clears it; otherwise runs stay unschedulable / | ||
| // fall back to CPU while the heartbeat keeps advertising a GPU. | ||
| p.Newline() | ||
cursor[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| p.Infof("Your CPU and memory budget is unchanged — but this machine has no GPU while the cluster still requests one, so I'll clear that stale GPU setting so runs can schedule.") | ||
| } | ||
| @@ -266,7 +266,10 @@ func applyResourcesSet(ctx context.Context, p *ui.Printer, pr prompter, target * | ||
| return &exitError{code: exitFailure, err: fmt.Errorf( | ||
| "refusing to change the ceiling without confirmation: pass --yes, or run on a terminal")} | ||
| } | ||
| p.Newline() | ||
| // PromptHint self-leads with a blank line, so this opens with a single | ||
| // blank — no preceding Newline() (that stacked two: the #375 banner- | ||
| // removal regression Bugbot caught). Mirrors the dry-run path, which | ||
| // leans on Section's own leading newline. | ||
| p.PromptHint("tracebloc keeps about 1 core and 3 GiB for itself on top of this — it fits on this machine.") | ||
| proceed, cerr := pr.Confirm(fmt.Sprintf("Let each training run use up to %s?", perRunSize(desired)), true) | ||
| if cerr != nil { | ||
| @@ -535,7 +538,6 @@ func persistCeiling(ctx context.Context, p *ui.Printer, target *clusterTarget, o | ||
| } | ||
| if dryRun { | ||
| p.Newline() | ||
| p.Section("Dry run — nothing was changed") | ||
| p.Field("would set each run to", perRunSize(d)) | ||
| if gpuRemoved { | ||
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
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
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
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
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.