chart-testing
chart-testing copied to clipboard
Fix parsing kubectl output with warnings
Exclude stderr (e.g. deprecation warnings) when parsing command output.
Signed-off-by: Usman [email protected]
What this PR does / why we need it: It ensures that warnings or other output that goes to stderr won't be parsed when trying to list deployments, pods, etc. Today, this is not the case, and many ct
subcommands will fail in such situations (e.g. when the gke-gcloud-auth-plugin isn't yet installed).
Special notes for your reviewer: It's possible that the original implementation wanted to include stderr in the output for these commands for a reason, but this feels like a simple oversight.
It's also possible that there are other similar places in the code that require the same modification, so please feel free to update the PR or request these changes, which I will then apply. Thanks!