Skip to content

UI: make fatal/conflict and failures red color#22511

Open
medyagh wants to merge 6 commits intokubernetes:masterfrom
medyagh:red-warning
Open

UI: make fatal/conflict and failures red color#22511
medyagh wants to merge 6 commits intokubernetes:masterfrom
medyagh:red-warning

Conversation

@medyagh
Copy link
Member

@medyagh medyagh commented Jan 21, 2026

Screenshot 2026-01-20 at 9 29 35 PM

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 21, 2026
@k8s-ci-robot k8s-ci-robot requested review from nirs and prezha January 21, 2026 05:29
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 21, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2026
@medyagh medyagh requested a review from Copilot January 22, 2026 06:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for applying ANSI color codes to stylized console output, enabling red-highlighted warning messages.

Changes:

  • Extend style.Options with a Color field to support style-level coloring.
  • Add a per-call color override path via out.Color(...) and stylized/applyStyle updates.
  • Update minikube start to print the Docker-runtime warning in red.

Reviewed changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/minikube/style/style.go Adds Color field to style options for default style coloring.
pkg/minikube/out/out_style.go Adds color application logic and supports per-call override color.
pkg/minikube/out/out.go Introduces out.Color(...) helper for passing a color override through templating args.
pkg/minikube/out/out_style_test.go Updates tests for the new applyStyle signature.
cmd/minikube/cmd/start.go Applies red coloring to a specific runtime warning output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 45 to +47
ShouldSpin bool
HideAfterSpin bool // Hide the prefix after spinning
HideAfterSpin bool // Hide the prefix after spinning
Color string // Color to apply to the message
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Options.Color is introduced and applyStyle supports it, but nothing in style.Config sets Color yet (so the branch is effectively dead unless every call uses an override). If the goal is “red warnings”, consider setting style.Config[style.Warning].Color (and similar styles) instead of leaving defaults empty, or remove the field until it’s actually used.

Copilot uses AI. Check for mistakes.
rtime := getContainerRuntime(existing)
if rtime == constants.Docker && (existing == nil || viper.IsSet(containerRuntime)) {
out.WarningT(`Starting v1.39.0, minikube will default to "containerd" container runtime. See #21973 for more info.`)
out.WarningT(`Starting v1.39.0, minikube will default to "containerd" container runtime. See #21973 for more info.`, out.Color(style.Red))
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call-site uses a per-message color override for a warning. If warnings are intended to be red globally, using the new style.Options.Color for style.Warning would avoid having to thread out.Color(...) through each warning call and keeps styling concerns centralized.

Suggested change
out.WarningT(`Starting v1.39.0, minikube will default to "containerd" container runtime. See #21973 for more info.`, out.Color(style.Red))
out.WarningT(`Starting v1.39.0, minikube will default to "containerd" container runtime. See #21973 for more info.`)

Copilot uses AI. Check for mistakes.
@medyagh medyagh changed the title UI: Add option to make output colorful (red warnings) UI: make fatal/conflict and failures red color Jan 25, 2026
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 26, 2026
@k8s-ci-robot
Copy link
Contributor

@medyagh: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
integration-vfkit-docker-macos-arm 49c218b link false /test integration-vfkit-docker-macos-arm
integration-docker-docker-linux-arm 7fc33bb link true /test integration-docker-docker-linux-arm
integration-docker-docker-linux-x86 7fc33bb link true /test integration-docker-docker-linux-x86
integration-kvm-docker-linux-x86 7fc33bb link true /test integration-kvm-docker-linux-x86
integration-docker-crio-linux-x86 7fc33bb link false /test integration-docker-crio-linux-x86
pull-minikube-docker-docker-linux-arm 7fc33bb link true /test pull-minikube-docker-docker-linux-arm
pull-minikube-docker-docker-linux-x86 7fc33bb link true /test pull-minikube-docker-docker-linux-x86

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 2, 2026
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants