Skip to content
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

unhide status check and on by default #3792

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cmd/skaffold/app/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ var FlagRegistry = []Flag{
Name: "status-check",
Usage: "Wait for deployed resources to stabilize",
Value: &opts.StatusCheck,
DefValue: false,
DefValue: true,
FlagAddMethod: "BoolVar",
DefinedOn: []string{"dev", "debug", "deploy", "run"},
},
Expand Down Expand Up @@ -302,7 +302,6 @@ func AddFlags(fs *pflag.FlagSet, cmdName string) {
fs.AddFlag(f)
}
}
fs.MarkHidden("status-check")
// this is a temporary solution until we figure out an automated way to detect the
// minikube profile see
// https://github.com/GoogleContainerTools/skaffold/issues/3668
Expand Down
8 changes: 8 additions & 0 deletions docs/content/en/docs/references/cli/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ Options:
--rpc-http-port=50052: tcp port to expose event REST API over HTTP
--rpc-port=50051: tcp port to expose event API
--skip-tests=false: Whether to skip the tests after building
--status-check=true: Wait for deployed resources to stabilize
-t, --tag='': The optional custom tag to use for images which overrides the current Tagger configuration
--tail=true: Stream logs from deployed objects
--toot=false: Emit a terminal beep after the deploy is complete
Expand Down Expand Up @@ -377,6 +378,7 @@ Env vars:
* `SKAFFOLD_RPC_HTTP_PORT` (same as `--rpc-http-port`)
* `SKAFFOLD_RPC_PORT` (same as `--rpc-port`)
* `SKAFFOLD_SKIP_TESTS` (same as `--skip-tests`)
* `SKAFFOLD_STATUS_CHECK` (same as `--status-check`)
* `SKAFFOLD_TAG` (same as `--tag`)
* `SKAFFOLD_TAIL` (same as `--tail`)
* `SKAFFOLD_TOOT` (same as `--toot`)
Expand Down Expand Up @@ -448,6 +450,7 @@ E.g. build.out created by running skaffold build --quiet -o "{{json .}}" > build
-p, --profile=[]: Activate profiles by name
--rpc-http-port=50052: tcp port to expose event REST API over HTTP
--rpc-port=50051: tcp port to expose event API
--status-check=true: Wait for deployed resources to stabilize
--tail=false: Stream logs from deployed objects (default false)
--toot=false: Emit a terminal beep after the deploy is complete

Expand Down Expand Up @@ -475,6 +478,7 @@ Env vars:
* `SKAFFOLD_PROFILE` (same as `--profile`)
* `SKAFFOLD_RPC_HTTP_PORT` (same as `--rpc-http-port`)
* `SKAFFOLD_RPC_PORT` (same as `--rpc-port`)
* `SKAFFOLD_STATUS_CHECK` (same as `--status-check`)
* `SKAFFOLD_TAIL` (same as `--tail`)
* `SKAFFOLD_TOOT` (same as `--toot`)

Expand Down Expand Up @@ -507,6 +511,7 @@ Options:
--rpc-http-port=50052: tcp port to expose event REST API over HTTP
--rpc-port=50051: tcp port to expose event API
--skip-tests=false: Whether to skip the tests after building
--status-check=true: Wait for deployed resources to stabilize
-t, --tag='': The optional custom tag to use for images which overrides the current Tagger configuration
--tail=true: Stream logs from deployed objects
--toot=false: Emit a terminal beep after the deploy is complete
Expand Down Expand Up @@ -544,6 +549,7 @@ Env vars:
* `SKAFFOLD_RPC_HTTP_PORT` (same as `--rpc-http-port`)
* `SKAFFOLD_RPC_PORT` (same as `--rpc-port`)
* `SKAFFOLD_SKIP_TESTS` (same as `--skip-tests`)
* `SKAFFOLD_STATUS_CHECK` (same as `--status-check`)
* `SKAFFOLD_TAG` (same as `--tag`)
* `SKAFFOLD_TAIL` (same as `--tail`)
* `SKAFFOLD_TOOT` (same as `--toot`)
Expand Down Expand Up @@ -713,6 +719,7 @@ Options:
--rpc-http-port=50052: tcp port to expose event REST API over HTTP
--rpc-port=50051: tcp port to expose event API
--skip-tests=false: Whether to skip the tests after building
--status-check=true: Wait for deployed resources to stabilize
-t, --tag='': The optional custom tag to use for images which overrides the current Tagger configuration
--tail=false: Stream logs from deployed objects (default false)
--toot=false: Emit a terminal beep after the deploy is complete
Expand Down Expand Up @@ -747,6 +754,7 @@ Env vars:
* `SKAFFOLD_RPC_HTTP_PORT` (same as `--rpc-http-port`)
* `SKAFFOLD_RPC_PORT` (same as `--rpc-port`)
* `SKAFFOLD_SKIP_TESTS` (same as `--skip-tests`)
* `SKAFFOLD_STATUS_CHECK` (same as `--status-check`)
* `SKAFFOLD_TAG` (same as `--tag`)
* `SKAFFOLD_TAIL` (same as `--tail`)
* `SKAFFOLD_TOOT` (same as `--toot`)
Expand Down
2 changes: 1 addition & 1 deletion integration/dev_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func TestDevPortForward(t *testing.T) {
defer deleteNs()

rpcAddr := randomPort()
stop := skaffold.Dev("--port-forward", "--rpc-port", rpcAddr).InDir("examples/microservices").InNs(ns.Name).RunBackground(t)
stop := skaffold.Dev("--status-check=false", "--port-forward", "--rpc-port", rpcAddr).InDir("examples/microservices").InNs(ns.Name).RunBackground(t)
defer stop()

_, entries, shutdown := apiEvents(t, rpcAddr)
Expand Down
4 changes: 2 additions & 2 deletions integration/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func TestRunUnstableChecked(t *testing.T) {
ns, _, deleteNs := SetupNamespace(t)
defer deleteNs()

output, err := skaffold.Run("--status-check=true").InDir("testdata/unstable-deployment").InNs(ns.Name).RunWithCombinedOutput(t)
output, err := skaffold.Run().InDir("testdata/unstable-deployment").InNs(ns.Name).RunWithCombinedOutput(t)
if err == nil {
t.Errorf("expected to see an error since the deployment is not stable: %s", output)
} else if !strings.Contains(string(output), "unstable-deployment failed") {
Expand All @@ -255,5 +255,5 @@ func TestRunUnstableNotChecked(t *testing.T) {
ns, _, deleteNs := SetupNamespace(t)
defer deleteNs()

skaffold.Run().InDir("testdata/unstable-deployment").InNs(ns.Name).RunOrFail(t)
skaffold.Run("--status-check=false").InDir("testdata/unstable-deployment").InNs(ns.Name).RunOrFail(t)
}