Skip to content

--tail No Longer Works in Deploy Mode #2981

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
cliffburdick opened this issue Oct 3, 2019 · 7 comments · Fixed by #3049
Closed

--tail No Longer Works in Deploy Mode #2981

cliffburdick opened this issue Oct 3, 2019 · 7 comments · Fixed by #3049
Assignees
Labels
area/deploy area/logging kind/bug Something isn't working priority/p2 May take a couple of releases

Comments

@cliffburdick
Copy link
Contributor

I was previously running v0.20.0, and running the following command:

skaffold-0.20.0 deploy --tail -f skaffold-96eb58.yaml --images myimage:1.0

This worked fine, and the logs would tail properly, except for this bug: #1753

In that thread it was mentioned that 0.39.0 fixes this, so I tried it. Now, --tail no longer gives any output, even though I can see it in kubectl log. I'm also not sure if I should see a kubectl process showing the tailed logs, but I don't see those.

Expected behavior

Logs are tailed

Actual behavior

No logs visible

Information

  • Skaffold version: 0.39.0
  • Operating system: Ubuntu 18.04
  • Contents of skaffold.yaml:
apiVersion: skaffold/v1beta15
build:
  tagPolicy:
    envTemplate:
      template: '{{.IMAGE_NAME}}:{{.SALT}}'
deploy:
  kubectl:
    manifests:
    - depman-96eb58.yaml*
kind: Config

Steps to reproduce the behavior

  1. Use skaffold deploy --tail with any image.
@balopat
Copy link
Contributor

balopat commented Oct 4, 2019

I found the bug - here's a sketch of the solution: #2987
If anybody wants to help out finishing it, I'm more than happy to have them add to the branch or reuse it in some shape or form. I'm a bit swamped currently so not sure when I'll get to finish it.
If it is really getting in the way, you can recompile skaffold with a one-liner patch (minus the rename, it would be r.imageList.Add(artifact.Tag)):
https://github.com/GoogleContainerTools/skaffold/pull/2987/files#r331605683

@cliffburdick
Copy link
Contributor Author

@balopat would you still like me to compile a custom version and test this? It seems like you already wrote the tests and merged it.

@dgageot dgageot self-assigned this Oct 14, 2019
dgageot added a commit to dgageot/skaffold that referenced this issue Oct 14, 2019
@dgageot
Copy link
Contributor

dgageot commented Oct 14, 2019

@cliffburdick I've just built this one from commit 3907a07:
https://storage.googleapis.com/skaffold-debug/skaffold-linux-amd64

sha256: aa46eb3d4e625618e7165f8135540421449f76a97f279597cc35957aacd94231

@cliffburdick
Copy link
Contributor Author

@balopat @dgageot this problem appears to have come back for skaffold run --tail in 1.11.0. Is it possible the fix was only applied to deploy mode and run still has it?

@dgageot
Copy link
Contributor

dgageot commented Jun 12, 2020

@cliffburdick we had to revert the fix for #1753 because it created other bigger issues

@dgageot dgageot reopened this Jun 12, 2020
@cliffburdick
Copy link
Contributor Author

@dgageot thanks for the update

@tejal29 tejal29 closed this as completed Jun 17, 2020
@tejal29 tejal29 reopened this Jun 17, 2020
@tejal29
Copy link
Contributor

tejal29 commented Jun 17, 2020

This is now working on master

../../out/skaffold deploy --tail -d gcr.io/tejal-test --build-artifacts build.out 
Tags used in deployment:
 - leeroy-web -> gcr.io/tejal-test/leeroy-web:85b7c5bc88d75ce4f42b529affea1a405ab17db5f49b6b6de7880592fd320092
 - leeroy-app -> gcr.io/tejal-test/leeroy-app:6abbe01a027a4e9ffb07a3ebe49a9d6db335a3f61f6b3107ae4b92c7aa82435e
Starting deploy...
 - deployment.apps/leeroy-web configured
 - service/leeroy-app configured
 - deployment.apps/leeroy-app configured
Waiting for deployments to stabilize...
 - deployment/leeroy-app: waiting for rollout to finish: 1 old replicas are pending termination...
    - pod/leeroy-app-d8bbf896f-hzzlp: creating container leeroy-app
 - deployment/leeroy-web: waiting for rollout to finish: 1 old replicas are pending termination...
    - pod/leeroy-web-599474c454-28j99: creating container leeroy-web
 - deployment/leeroy-app is ready. [1/2 deployment(s) still pending]
 - deployment/leeroy-web is ready.
Deployments stabilized in 2.444877437s
Press Ctrl+C to exit
[leeroy-app-d8bbf896f-hzzlp leeroy-app] 2020/06/17 23:08:47 leeroy app server ready
[leeroy-web-599474c454-28j99 leeroy-web] 2020/06/17 23:08:47 leeroy web server ready

@tejal29 tejal29 closed this as completed Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy area/logging kind/bug Something isn't working priority/p2 May take a couple of releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants