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

Log when values are taken from global config file #4566

Merged
merged 2 commits into from
Jul 30, 2020

Conversation

briandealwis
Copy link
Member

Log when values are resolved from the Skaffold global config file (typically ~/.skaffold/config). At least simplifies diagnosing situations like the motivation for #4554.

$ skaffold dev -v info
WARN[0000] starting gRPC server on port 50053. (50051 is already in use) 
WARN[0000] starting gRPC HTTP server on port 50054. (50052 is already in use) 
INFO[0000] Skaffold &{Version: ConfigVersion:skaffold/v2beta6 GitVersion: GitCommit: GitTreeState: BuildDate: GoVersion:go1.14.3 Compiler:gc Platform:darwin/amd64} 
INFO[0000] Loaded Skaffold defaults from "/Users/bdealwis/.skaffold/config"
INFO[0000] Using kubectl context: docker-desktop        
INFO[0000] Using local-cluster=false from config        
...

@briandealwis briandealwis requested a review from a team as a code owner July 24, 2020 15:02
@briandealwis briandealwis requested a review from dgageot July 24, 2020 15:02
@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #4566 into master will decrease coverage by 0.02%.
The diff coverage is 45.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4566      +/-   ##
==========================================
- Coverage   72.61%   72.59%   -0.03%     
==========================================
  Files         335      335              
  Lines       12964    12971       +7     
==========================================
+ Hits         9414     9416       +2     
- Misses       2957     2960       +3     
- Partials      593      595       +2     
Impacted Files Coverage Δ
pkg/skaffold/config/util.go 69.31% <45.45%> (-1.41%) ⬇️
pkg/skaffold/deploy/kustomize.go 78.61% <0.00%> (-0.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82b9aad...2df7322. Read the comment docs.

@@ -73,6 +73,9 @@ func readConfigFileCached(filename string) (*GlobalConfig, error) {
return
}
configFile, configFileErr = ReadConfigFileNoCache(filenameOrDefault)
if configFileErr == nil {
logrus.Infof("Loaded Skaffold defaults from %q", filenameOrDefault)
Copy link
Contributor

Choose a reason for hiding this comment

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

shd we move this to debug? I usually set my default-repo etc in global config when demoing so that the command line is as simple as skaffold dev on examples.
This will add more logs statements.

Copy link
Member Author

Choose a reason for hiding this comment

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

Skaffold's default log-level is warning, so this will only appear if run with -v info.

@briandealwis briandealwis merged commit 02a6817 into GoogleContainerTools:master Jul 30, 2020
@briandealwis briandealwis deleted the logconfig branch July 30, 2020 18:53
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.

4 participants