Skip to content

statusCheck in the skaffold.yaml is not used without --status-check= flag #7178

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

Closed
johnmanjiro13 opened this issue Mar 10, 2022 · 6 comments
Closed
Labels
area/status-check kind/bug Something isn't working priority/p2 May take a couple of releases

Comments

@johnmanjiro13
Copy link
Contributor

Expected behavior

skaffold run runs without status check only setting the statusCheck field of the deployment config stanza in the skaffold.yaml to false.

Actual behavior

The statusCheck field in the skaffold.yaml is used only when value of the --status-check flag is nil.
https://github.com/GoogleContainerTools/skaffold/blob/v1.36.1/pkg/skaffold/runner/deployer.go#L53-L60

However, the default value of the flag is true. So we have to use --status-check=.
This seems like a strange behavior.

Information

  • Skaffold version: v1.36.1
  • Operating system: MacOS Big Sur (11.6)
  • Installed via: Homebrew
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta27
kind: Config
metadata:
  name: deployment
build:
  artifacts:
    - image: eu.gcr.io/example/push-events
      docker:
        dockerfile: backend/push-events-svc/Dockerfile
deploy:
  helm:
    releases:
      - name: example
        chartPath: ./k8s/chart
        valuesFiles:
          - ./k8s/values/dev.yaml
  statusCheck: false

Steps to reproduce the behavior

  1. use the skaffold.yaml
  2. skaffold run # run with status check
  3. skaffold run --status-check= # run without status check
@tomasmota
Copy link
Contributor

I'll look into this

@tomasmota
Copy link
Contributor

I was not able to replicate your results. Adding statusCheck: false to the examples/buildpacks/skaffold.yaml worked as expected. Can you try that example too?

@johnmanjiro13
Copy link
Contributor Author

johnmanjiro13 commented Mar 11, 2022

I tried to add statusCheck: false to that file and happened this issue.
Result of the original examples/buildpacks/skaffold.yaml (skaffold run):

Build [skaffold-buildpacks] succeeded
Starting test...
Tags used in deployment:
 - skaffold-buildpacks -> skaffold-buildpacks:dc728b3f51093e55e9a6b7d4edb5031aacc05ce13b93597a950884db0e57bab2
Starting deploy...
 - service/web created
 - deployment.apps/web created
Waiting for deployments to stabilize...
 - deployment/web is ready.
Deployments stabilized in 2.166 seconds
You can also run [skaffold run --tail] to get the logs

Result of adding statusCheck: false (skaffold run):

Build [skaffold-buildpacks] succeeded
Starting test...
Tags used in deployment:
 - skaffold-buildpacks -> skaffold-buildpacks:c09d11b2afa3b83d5865f52d083c1dfd72754351af2668ce563deaebdd97febf
Starting deploy...
 - service/web configured
 - deployment.apps/web configured
Waiting for deployments to stabilize...
 - deployment/web is ready.
Deployments stabilized in 2.174 seconds

Waiting for deployments to stabilize... is displayed in both. I think this means a status check is being performed.

And, result of adding statusCheck: false and --status-check= (skaffold run --status-check=):

Build [skaffold-buildpacks] succeeded
Starting test...
Tags used in deployment:
 - skaffold-buildpacks -> skaffold-buildpacks:c09d11b2afa3b83d5865f52d083c1dfd72754351af2668ce563deaebdd97febf
Starting deploy...
 - service/web created
 - deployment.apps/web created
You can also run [skaffold run --tail] to get the logs

Waiting for deployments to stabilize... isn't displayed.

@tomasmota
Copy link
Contributor

I have tried cloning the repo from scratch, building and running the example with no statuscheck and it works fine for me. Are you sure that you don't have some global configuration messing things up? Perhaps try clearing out your config.

@johnmanjiro13
Copy link
Contributor Author

johnmanjiro13 commented Mar 14, 2022

I checked default value of the status-check flag in the main branch and it is nil.
This issue appears to be fixed in #7089 but it is not included in the v1.36.1.

I'll wait to release new version. Thank you!

@aaron-prindle aaron-prindle added kind/bug Something isn't working priority/p2 May take a couple of releases area/status-check labels Mar 15, 2022
@johnmanjiro13
Copy link
Contributor Author

This issue has been fixed in the v1.37.0 release.
So I close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/status-check kind/bug Something isn't working priority/p2 May take a couple of releases
Projects
None yet
Development

No branches or pull requests

3 participants