-
Notifications
You must be signed in to change notification settings - Fork 5.2k
ui: fix correct formatting in tunnel service output #22400
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
base: master
Are you sure you want to change the base?
ui: fix correct formatting in tunnel service output #22400
Conversation
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: XiaWuSharve The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @XiaWuSharve! |
|
Hi @XiaWuSharve. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
Can one of the admins verify this patch? |
29fb287 to
dd31dcd
Compare
- Replace `style.Running` with `style.StartingSSH` in `startAndWait` function. - This prevents the spinner animation from clashing with the subsequent table output, fixing the missing newline issue.
dd31dcd to
db8ea87
Compare
|
@XiaWuSharve can you please put Before This PR as well as after to see the difference? |
medyagh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@XiaWuSharve please put before/After this PR to compare
|
Hi @medyagh , Thank you for the feedback. I have updated the PR description as suggested, adding a clear “Before” and “After” output comparison to showcase the fix for the formatting issue. Please take a look when you have a moment. |
Fix formatting issue in
minikube servicetunnel outputfixes #22133
Problem Description
When running
minikube service <service-name>, as reported in issue #22133, before this fix, the outputStarting tunnel for service <service-name>.was incorrectly followed by a/character without a line break. The table would start printing immediately on the same line. Furthermore, an extra duplicate lineStarting tunnel for service <service-name>.would appear after the table. The root cause was a race condition: the spinner attached to the status message viastyle.Runningused inpkg/minikube/tunnel/kic/ssh_conn.goattempted to refresh in place, but the concurrent output of the table moved the cursor, preventing the spinner from overwriting itself. This resulted in the spinner's final state being appended to the end of the output stream.Solution in This PR
This PR removes the unintended
/character and ensures proper line breaks. The fix works by changing the output style to one without a spinner (style.StartingSSH). This guarantees that the status message is printed completely (ending with a newline\n) before the table is rendered, eliminating the cursor conflict and the duplicate line. This directly resolves the readability issue described in #22133.Verification
out/minikube service hello-nodemake testpassed.Notes on Future UI Considerations
While this PR is aiming at closing #22133 by fixing the immediate formatting bug, it highlights a potential deeper UI concern: printing the final table while tunnels are still starting (a process that can sometimes take over a second) might be suboptimal. A more robust approach could involve either:
These enhancements are noted here for future consideration but are outside the scope of this specific formatting fix.
Note to Reviewers
Hi, this is my first PR to the minikube project. I've tried to follow the contribution guidelines, but I'm sure there might be areas I've overlooked or conventions I'm not yet familiar with. I'd be very grateful for any feedback on the fix itself, the code style, or the PR process. Please don't hesitate to point out anything that could be improved. Thank you!