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

fix: make iterateTLSConfig only work for TLS config #2057

Merged
merged 1 commit into from
Aug 17, 2018
Merged

fix: make iterateTLSConfig only work for TLS config #2057

merged 1 commit into from
Aug 17, 2018

Conversation

Ace-Tang
Copy link
Contributor

@Ace-Tang Ace-Tang commented Aug 7, 2018

Signed-off-by: Ace-Tang [email protected]

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@pouchrobot pouchrobot added kind/bug This is bug report for project size/M labels Aug 7, 2018
@Ace-Tang
Copy link
Contributor Author

Ace-Tang commented Aug 7, 2018

iterateConfig want to solve TLS config at first, but ignore other map kind config like Runtime or something, it makes these types of config always be recognized as a unknow flag, to make it compatible, I wanna to make the funtion only work for TLS config, and recursive once.

@codecov-io
Copy link

Codecov Report

Merging #2057 into master will increase coverage by 5.06%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2057      +/-   ##
==========================================
+ Coverage   59.05%   64.11%   +5.06%     
==========================================
  Files         202      202              
  Lines       15494    15494              
==========================================
+ Hits         9150     9934     +784     
+ Misses       5233     4321     -912     
- Partials     1111     1239     +128
Flag Coverage Δ
#criv1alpha1test 33.69% <0%> (-0.13%) ⬇️
#criv1alpha2test 34.31% <0%> (+3.01%) ⬆️
#integrationtest 38.58% <0%> (+0.01%) ⬆️
#unittest 22.72% <25%> (-0.04%) ⬇️
Impacted Files Coverage Δ
daemon/config/config.go 40.74% <25%> (-6.18%) ⬇️
cri/v1alpha1/cri.go 65.18% <0%> (-0.18%) ⬇️
apis/server/utils.go 66.66% <0%> (+4.76%) ⬆️
cri/stream/httpstream/spdy/upgrade.go 60% <0%> (+5.71%) ⬆️
cri/v1alpha2/cri_utils.go 81.48% <0%> (+22.15%) ⬆️
cri/criservice.go 64.7% <0%> (+24.99%) ⬆️
cri/v1alpha2/cri_wrapper.go 53.87% <0%> (+53.87%) ⬆️
cri/v1alpha2/cri.go 66.2% <0%> (+66.2%) ⬆️
cri/v1alpha2/server.go 79.84% <0%> (+79.84%) ⬆️
cri/v1alpha2/cri_stream.go 80% <0%> (+80%) ⬆️
... and 2 more

@@ -169,7 +169,7 @@ func (cfg *Config) MergeConfigurations(flagSet *pflag.FlagSet) error {
}

fileFlags := make(map[string]interface{}, 0)
iterateConfig(origin, fileFlags)
iterateTLSConfig(origin, fileFlags)

// check if invalid or unknown flag exist in config file
if err = getUnknownFlags(flagSet, fileFlags); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

in your commit, the UnknownFlags is only for TLS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

iterateTLSConfig function is to make TLS value from map become a new key-value

{
   "TLS": {
       "a": "b"
    }
}  ->

{
   "a": "b"
}

as for other config, they will stay same, so do you got the point? @fuweid

@pouchrobot
Copy link
Collaborator

ping @Ace-Tang
We found that this PR is 42 commits, which is more than 10 commits, behind master.
Please rebase the branch against master and push it back again. Thanks a lot.

@allencloud
Copy link
Collaborator

Any update on this? @Ace-Tang @fuweid
Could we make this move on?

Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gap/needs-rebase kind/bug This is bug report for project size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants