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

Revert #849[Use protobufs for communication with apiserver] in v1.6 #1050

Merged
merged 2 commits into from
Mar 11, 2020

Conversation

skmatti
Copy link
Contributor

@skmatti skmatti commented Mar 11, 2020

Fixes #1049

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 11, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @skmatti. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 11, 2020
@skmatti
Copy link
Contributor Author

skmatti commented Mar 11, 2020

/assign @freehan @bowei

// KubeConfigForProtobuf returns a shallow copy of client config after updating
// content type to protobuf.
func KubeConfigForProtobuf(kubeConfig *rest.Config) *rest.Config {
configShallowCopy := *kubeConfig
Copy link
Member

Choose a reason for hiding this comment

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

why not deep copy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are modifying only the top level variable and this is used as read only by kubeclient for most part. I modified this to create separate configurations in each case.

ings := operator.Ingresses(ctx.Ingresses().List()).ReferencesBackendConfig(beConfig, operator.Services(ctx.Services().List())).AsList()
if len(ings) == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

I think Enqueue already logs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not when ingresses are not enqueued(empty slice). I preserved this log and removed the other.

Copy link
Member

Choose a reason for hiding this comment

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

can we make Enqueue log for empty slice and delete the extra logs outside the call

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed these logs. Not sure adding this log inside enqueue would be any help as this backendconfig obj is not available inside that method.

ings := operator.Ingresses(ctx.Ingresses().List()).ReferencesBackendConfig(beConfig, operator.Services(ctx.Services().List())).AsList()
if len(ings) == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Same here

pkg/controller/controller.go Outdated Show resolved Hide resolved
pkg/controller/controller.go Outdated Show resolved Hide resolved
pkg/controller/controller.go Outdated Show resolved Hide resolved
pkg/controller/controller.go Outdated Show resolved Hide resolved
ings := operator.Ingresses(ctx.Ingresses().List()).ReferencesBackendConfig(beConfig, operator.Services(ctx.Services().List())).AsList()
if len(ings) == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

again, check that we log in Enqueue so we don't have to log here as well

@bowei
Copy link
Member

bowei commented Mar 11, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 11, 2020
@freehan
Copy link
Contributor

freehan commented Mar 11, 2020

Discussed offline. @skmatti will rollback the protobuf PR for ingress 1.6 as for now.

Fix will be pushed to HEAD and cherrypick back to 1.6 1.7

@skmatti skmatti changed the title Fix kube-config for backend and frontend config CRDs Rollback #849[Use protobufs for communication with apiserver] in v1.6 Mar 11, 2020
@skmatti
Copy link
Contributor Author

skmatti commented Mar 11, 2020

Discussed offline. @skmatti will rollback the protobuf PR for ingress 1.6 as for now.

Fix will be pushed to HEAD and cherrypick back to 1.6 1.7

Rolled back #849 in v1.6. I think this more cleaner as this change never got released in any GKE versions.

@bowei
Copy link
Member

bowei commented Mar 11, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 11, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bowei, skmatti

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 11, 2020
@skmatti skmatti changed the title Rollback #849[Use protobufs for communication with apiserver] in v1.6 Revert #849[Use protobufs for communication with apiserver] in v1.6 Mar 11, 2020
@k8s-ci-robot k8s-ci-robot merged commit 4d62d61 into kubernetes:release-1.6 Mar 11, 2020
@skmatti skmatti deleted the be-logs-1.6 branch March 13, 2020 02:07
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. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants