-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: enable skaffold render to track telemetry #9020
feat: enable skaffold render to track telemetry #9020
Conversation
b0fc468
to
337f97c
Compare
Codecov Report
@@ Coverage Diff @@
## main #9020 +/- ##
==========================================
- Coverage 70.48% 63.62% -6.86%
==========================================
Files 515 624 +109
Lines 23150 31934 +8784
==========================================
+ Hits 16317 20318 +4001
- Misses 5776 10084 +4308
- Partials 1057 1532 +475
... and 419 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…oloreable to keep same behaviour as stdin
a30634b
to
43278b8
Compare
@@ -53,9 +52,6 @@ func ShouldDisplayMetricsPrompt(configfile string) bool { | |||
} | |||
|
|||
func DisplayMetricsPrompt(configFile string, out io.Writer) error { | |||
if isStdOut(out) { |
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.
I was checking the idea behind this condition, it was checking if the given io.Writer was a stdout
, but from my understanding in the code, we were always sending an stdout
, so it was always true, and I didn't see other place where we were using this function or sending other type of io.Writer, so I removed the condition + function completely 😅 . Let me know if you see a case I'm not taking into account where this condition can be false.
* feat: making survey, update, and tracking messages to print to stderr instead of stdout * feat: enable `skaffold render` to track telemetry * feat: remove tests checking if a stadout is set, now we are using stderr * feat: make stderr used to print survey, update, and metricts promp, coloreable to keep same behaviour as stdin * feat: removing IsStdout function and related tests
* feat: configure verify and exec commands to emit metrics (#9013) * feat: configure render, verify, and exec commands to emit metrics * fix: remove render command from tracking due to corrupted output data * feat: enable skaffold render to track telemetry (#9020) * feat: making survey, update, and tracking messages to print to stderr instead of stdout * feat: enable `skaffold render` to track telemetry * feat: remove tests checking if a stadout is set, now we are using stderr * feat: make stderr used to print survey, update, and metricts promp, coloreable to keep same behaviour as stdin * feat: removing IsStdout function and related tests * fix: change baseRef to point to v2.6 release
Related: #9013
Description
This PR configures the
skaffold render
command to start tracking telemetry data when it is used. Currently the logic for emitting metrics is related to the logic for displaying the Skaffold survey URL, the opt-out message, and the version upgrade. These messages were corrupting the output when used, e.g, likeskaffold render > manifest.yaml
, due to everything was printed using stdout. Now we are changing from stdout to stderr to print those messages.