-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
validateClusterInfo: use clientcmdapi.NewCluster() #44221
Merged
k8s-github-robot
merged 1 commit into
kubernetes:master
from
ncdc:fix-validateClusterInfo-empty-cluster-check
Apr 11, 2017
Merged
validateClusterInfo: use clientcmdapi.NewCluster() #44221
k8s-github-robot
merged 1 commit into
kubernetes:master
from
ncdc:fix-validateClusterInfo-empty-cluster-check
Apr 11, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ncdc
added
area/client-libraries
sig/api-machinery
Categorizes an issue or PR as relevant to SIG API Machinery.
labels
Apr 7, 2017
k8s-ci-robot
added
the
cncf-cla: yes
Indicates the PR's author has signed the CNCF CLA.
label
Apr 7, 2017
k8s-github-robot
added
size/S
Denotes a PR that changes 10-29 lines, ignoring generated files.
release-note-label-needed
labels
Apr 7, 2017
Change validateClusterInfo to use clientcmdapi.NewCluster() instead of clientcmdapi.Cluster{} when comparing against the passed in clusterInfo. clusterInfo most likely will be a combination of clientcmdapi.NewCluster() merged with potential overrides. This is necessary because otherwise, the DeepEqual between what is supposed to be an empty Cluster and clusterInfo will fail, resulting in an error that doesn't allow fall-through to checking for in-cluster configuration.
ncdc
force-pushed
the
fix-validateClusterInfo-empty-cluster-check
branch
from
April 7, 2017 20:50
5a54a47
to
266ba9f
Compare
sttts
added
release-note
Denotes a PR that will be considered when it comes time to generate release notes.
and removed
release-note-label-needed
labels
Apr 10, 2017
LGTM |
/lgtm |
k8s-ci-robot
added
the
lgtm
"Looks good to me", indicates that a PR is ready to be merged.
label
Apr 11, 2017
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, ncdc
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
k8s-github-robot
added
the
approved
Indicates a PR has been approved by an approver from all required OWNERS files.
label
Apr 11, 2017
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
approved
Indicates a PR has been approved by an approver from all required OWNERS files.
area/client-libraries
cncf-cla: yes
Indicates the PR's author has signed the CNCF CLA.
lgtm
"Looks good to me", indicates that a PR is ready to be merged.
release-note
Denotes a PR that will be considered when it comes time to generate release notes.
sig/api-machinery
Categorizes an issue or PR as relevant to SIG API Machinery.
size/S
Denotes a PR that changes 10-29 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change validateClusterInfo to use clientcmdapi.NewCluster() instead of
clientcmdapi.Cluster{} when comparing against the passed in clusterInfo.
clusterInfo most likely will be a combination of
clientcmdapi.NewCluster() merged with potential overrides. This is
necessary because otherwise, the DeepEqual between what is supposed to
be an empty Cluster and clusterInfo will fail, resulting in an error
that doesn't allow fall-through to checking for in-cluster
configuration.
#40508 changed
DirectClientConfig.getContext()
to start with aclientcmdapi.NewCluster()
instead of the zero value forclientcmdapi.Cluster
. This means that theExtensions
map in theCluster
is initialized instead ofnil
, which breaks theDeepEqual
test unless you compareclusterInfo
against an initializedclientcmdapi.NewCluster()
.cc @smarterclayton @sttts @vjsamuel @liggitt @deads2k @soltysh @fabianofranz @kubernetes/sig-api-machinery-pr-reviews