feat: show kubectl context by default on startup - #10069
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the GetRunContext function in pkg/skaffold/runner/runcontext/context.go to output the current kubectl context using output.Default.Fprintf instead of a log entry. A review comment points out that using os.Stdout for this message can interfere with machine-readable output from commands like skaffold render and suggests redirecting the output to os.Stderr instead.
09e9ad6 to
8e37a8c
Compare
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Hi @GoogleContainerTools/skaffold-team, I have updated the PR to use os.Stderr for the kubectl context output. This ensures the change remains non-breaking for machine-readable workflows (like skaffold render) while still addressing the visibility issue in #6861. All CI prerequisites, including the CLA, are complete. Ready for a maintainer to trigger the workflows and review. Best regards |
Fixes: #6861
Related: N/A
Merge before/after: N/A
Description
This PR addresses issue #6861 by making the kubectl context and cluster information visible by default during startup. Previously, this information was only logged at the INFO level, requiring users to use -v info to see it.
The change ensures that users immediately know which context they are working with when running commands like skaffold dev or skaffold run, improving the overall developer experience.
User facing changes (remove if N/A)
The startup output now includes the current Kubernetes context:
Before: No context information was printed at the default log level.
After: Prints Using kubectl context: using the standard Skaffold output package.
Follow-up Work (remove if N/A)
N/A