Commit 25352a7f authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #46997 from jlowdermilk/no-hr-gcloud

Automatic merge from submit-queue (batch tested with PRs 46997, 47021) Don't parse human-readable output from gcloud in tests This is the reason `[k8s.io] Services should be able to change the type and ports of a service [Slow]` is currently failing on GKE e2e tests. For GKE jobs we run a prerelease version of gcloud, in which the default command output was changed. gcloud's default output for commands is human readable, and is subject to change. Anything scripting against gcloud should always pass `--format=json|yaml|value(...)` so you get standardized output. fixes: #46918
parents 1dc20565 ac1ce7f1
...@@ -48,7 +48,7 @@ func CreateGCEStaticIP(name string) (string, error) { ...@@ -48,7 +48,7 @@ func CreateGCEStaticIP(name string) (string, error) {
for attempts := 0; attempts < 4; attempts++ { for attempts := 0; attempts < 4; attempts++ {
outputBytes, err = exec.Command("gcloud", "compute", "addresses", "create", outputBytes, err = exec.Command("gcloud", "compute", "addresses", "create",
name, "--project", TestContext.CloudConfig.ProjectID, name, "--project", TestContext.CloudConfig.ProjectID,
"--region", region, "-q").CombinedOutput() "--region", region, "-q", "--format=yaml").CombinedOutput()
if err == nil { if err == nil {
break break
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment