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

[WIP] fix deploy logging #2987

Closed

Conversation

balopat
Copy link
Contributor

@balopat balopat commented Oct 4, 2019

Fixes #2981.

Description

skaffold deploy --tail is broken, this fixes it: the reason is that we don't add the image names to the podSelector (runner.imageList).

TODO:

  • fix unit tests - have to find a way to mock out *kubernetes.LogAggregator
  • split PR to 2 refactors + the fix: rename to podSelector, adding unit test for logging + unit test & fix for deploy-only change

User facing changes

Before

skaffold deploy --tail is not logging.

After

skaffold deploy --tail will log again!
Also added some TRACE level logs for debugging.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Mentions any output changes.
  • Adds documentation as needed: user docs, YAML reference, CLI reference.
  • n/a Adds integration tests if needed.

Reviewer Notes

  • The code flow looks good.
  • Unit test added.
  • User facing changes look good.

Release Notes

Due to a bug, `skaffold deploy --tail` was not working. This release fixes the issue. Thank you @cliffburdick for filing #2981! 

@@ -92,6 +92,7 @@ func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifa
var imageNames []string
for _, artifact := range artifacts {
imageNames = append(imageNames, artifact.ImageName)
r.podSelector.Add(artifact.Tag)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the fix, it's a one line change. Testing it is a bit more involved, hence the rest of the PR.

@balopat balopat mentioned this pull request Oct 4, 2019
4 tasks
@balopat balopat force-pushed the fix_deploy_logging branch from 5c831e9 to f405b25 Compare October 10, 2019 22:22
@balopat
Copy link
Contributor Author

balopat commented Oct 14, 2019

@dgageot finished this, yay.

@balopat balopat closed this Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--tail No Longer Works in Deploy Mode
2 participants