Change:
! kubectl create -f hack/testdata/recursive/deployment --recursive "${kube_flags[@]}" kube::test::get_object_assert deployment "{{range.items}}{{$id_field}}:{{end}}" 'nginx0-deployment:nginx1-deployment:' kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_NGINX}:${IMAGE_NGINX}:" <del> ## Rollback to revision 1 - should be no-op </del> <ins> ## Rollback the deployments to revision 1 recursively </ins> output_message=$(! kubectl rollout undo -f hack/testdata/recursive/deployment --recursive --to-revision=1 2>&1 "${kube_flags[@]}") <ins> # Post-condition: nginx0 & nginx1 should be a no-op, and since nginx2 is malformed, it should error </ins> kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_NGINX}:${IMAGE_NGINX}:" kube::test::if_has_string "${output_message}" "Object 'Kind' is missing" <del> ## Pause the deployment output_message=$(! kubectl rollout pause -f hack/testdata/recursive/deployment --recursive 2>&1 "${kube_flags[@]}") </del> <ins> ## Pause the deployments recursively PRESERVE_ERR_FILE=true kubectl-with-retry rollout pause -f hack/testdata/recursive/deployment --recursive "${kube_flags[@]}" output_message=$(cat ${ERROR_FILE}) # Post-condition: nginx0 & nginx1 should both have paused set to true, and since nginx2 is malformed, it should error </ins> kube::test::get_object_assert deployment "{{range.items}}{{.spec.paused}}:{{end}}" "true:true:" kube::test::if_has_string "${output_message}" "Object 'Kind' is missing" <del> ## Resume the deployment output_message=$(! kubectl rollout resume -f hack/testdata/recursive/deployment --recursive 2>&1 "${kube_flags[@]}") </del> <ins> ## Resume the deployments recursively kubectl-with-retry rollout resume -f hack/testdata/recursive/deployment --recursive "${kube_flags[@]}" output_message=$(cat ${ERROR_FILE}) # Post-condition: nginx0 & nginx1 should both have paused set to nothing, and since nginx2 is malformed, it should error </ins> kube::test::get_object_assert deployment "{{range.items}}{{.spec.paused}}:{{end}}" "<no value>:<no value>:" kube::test::if_has_string "${output_message}" "Object 'Kind' is missing" <ins> ## Retrieve the rollout history of the deployments recursively </ins> output_message=$(! kubectl rollout history -f hack/testdata/recursive/deployment --recursive 2>&1 "${kube_flags[@]}") <ins> # Post-condition: nginx0 & nginx1 should both have a history, and since nginx2 is malformed, it should error </ins> kube::test::if_has_string "${output_message}" "nginx0-deployment" kube::test::if_has_string "${output_message}" "nginx1-deployment" kube::test::if_has_string "${output_message}" "Object 'Kind' is missing" # Clean up <ins> unset PRESERVE_ERR_FILE rm "${ERROR_FILE}" </ins> ! kubectl delete -f hack/testdata/recursive/deployment --recursive "${kube_flags[@]}" --grace-period=0 sleep 1 <del> ### Rollback a resource that cannot be rolled back (replication controller) </del> <ins> ### Rollout on multiple replication controllers recursively - these tests ensure that rollouts cannot be performed on resources that don't support it </ins> # Pre-condition: no replication controller exists kube::test::get_object_assert rc "{{range.items}}{{$id_field}}:{{end}}" '' # Command <del> # Create replication controllers (revision 1) recursively from directory of YAML files </del> <ins> # Create replication controllers recursively from directory of YAML files </ins> ! kubectl create -f hack/testdata/recursive/rc --recursive "${kube_flags[@]}" kube::test::get_object_assert rc "{{range.items}}{{$id_field}}:{{end}}" 'busybox0:busybox1:' # Command <del> ## Rollback to revision 1 - should be no-op </del> <ins> ## Attempt to rollback the replication controllers to revision 1 recursively </ins> output_message=$(! kubectl rollout undo -f hack/testdata/recursive/rc --recursive --to-revision=1 2>&1 "${kube_flags[@]}") <ins> # Post-condition: busybox0 & busybox1 should error as they are RC's, and since busybox2 is malformed, it should error </ins> kube::test::if_has_string "${output_message}" 'no rollbacker has been implemented for {"" "ReplicationController"}' kube::test::if_has_string "${output_message}" "Object 'Kind' is missing" <del> ## Pause the deployment </del> <ins> ## Attempt to pause the replication controllers recursively </ins> output_message=$(! kubectl rollout pause -f hack/testdata/recursive/rc --recursive 2>&1 "${kube_flags[@]}") <ins> # Post-condition: busybox0 & busybox1 should error as they are RC's, and since busybox2 is malformed, it should error </ins> kube::test::if_has_string "${output_message}" 'error when pausing "hack/testdata/recursive/rc/busybox.yaml' kube::test::if_has_string "${output_message}" 'error when pausing "hack/testdata/recursive/rc/rc/busybox.yaml' kube::test::if_has_string "${output_message}" "Object 'Kind' is missing" <del> ## Resume the deployment </del> <ins> ## Attempt to resume the replication controllers recursively </ins> output_message=$(! kubectl rollout resume -f hack/testdata/recursive/rc --recursive 2>&1 "${kube_flags[@]}") <ins> # Post-condition: busybox0 & busybox1 should error as they are RC's, and since busybox2 is malformed, it should error </ins> kube::test::if_has_string "${output_message}" 'error when resuming "hack/testdata/recursive/rc/busybox.yaml' kube::test::if_has_string "${output_message}" 'error when resuming "hack/testdata/recursive/rc/rc/busybox.yaml' kube::test::if_has_string "${output_message}" "Object 'Kind' is missing"

Discussion:
cc
Assigning to per test-
Flaked again
The flake actually happened when pausing the deployment. Changing issue title.
When , sometimes one of the deployments isn't paused. cc
I can't access the internal Google logs to examine the cause, nor can I reproduce this issue locally. Is there any additional information that you can provide to help troubleshoot the flake?
I've gone ahead and attempted a fix for this in
We should fix this in eventually
the external links are here ():