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

Migrate pkg/proxy/util to structured logging #104908

Merged
merged 11 commits into from Sep 20, 2021
Merged

Migrate pkg/proxy/util to structured logging #104908

merged 11 commits into from Sep 20, 2021

Conversation

@CIPHERTron
Copy link
Member

@CIPHERTron CIPHERTron commented Sep 10, 2021

What type of PR is this?

/wg structured-logging
/area logging
/priority important-longterm
/kind cleanup
/cc @kubernetes/wg-structured-logging-reviews

What this PR does / why we need it:

Migrate kube-proxy to structured logs

Which issue(s) this PR fixes:

Reference #104872

Special notes for your reviewer:

Does this PR introduce a user-facing change?

migrate pkg/proxy to structured logs

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Sep 10, 2021

Welcome @CIPHERTron!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

Loading

@k8s-ci-robot
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Sep 10, 2021

Hi @CIPHERTron. 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.

Loading

@serathius
Copy link
Contributor

@serathius serathius commented Sep 10, 2021

Loading

@CIPHERTron CIPHERTron changed the title Migrate to Structured Logs in pkg/proxy/util Migrate pkg/proxy/util to structured logging Sep 10, 2021
@CIPHERTron
Copy link
Member Author

@CIPHERTron CIPHERTron commented Sep 10, 2021

/wg structured-logging
/area logging
/priority important-longterm
/cc @kubernetes/wg-structured-logging-reviews

Loading

@CIPHERTron
Copy link
Member Author

@CIPHERTron CIPHERTron commented Sep 10, 2021

This PR is not correctly tagged for migration, please read instructions in https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#what-to-include-in-the-pull-request

Sorry for the inconvenience @serathius. Is it okay now?

Loading

@bowei
Copy link
Member

@bowei bowei commented Sep 10, 2021

/ok-to-test

/lgtm
/approve

Loading

@k8s-ci-robot
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Sep 10, 2021

[APPROVALNOTIFIER] This PR is APPROVED

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

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

Loading

@k8s-ci-robot k8s-ci-robot removed the lgtm label Sep 16, 2021
@CIPHERTron
Copy link
Member Author

@CIPHERTron CIPHERTron commented Sep 16, 2021

In my latest commit, I've changed the key names in endpoints.go as requested by @shivanshu1333 👍🏻

Loading

@shivanshu1333
Copy link
Member

@shivanshu1333 shivanshu1333 commented Sep 16, 2021

@CIPHERTron can you please fix the issue in your latest commit? Thanks!

Loading

@CIPHERTron
Copy link
Member Author

@CIPHERTron CIPHERTron commented Sep 16, 2021

@CIPHERTron can you please fix the issue in your latest commit? Thanks!

I'm not quite sure what's causing the tests to fail. Could you please help me out?

Loading

@shivanshu1333
Copy link
Member

@shivanshu1333 shivanshu1333 commented Sep 16, 2021

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

see 39a6952

Loading

@CIPHERTron
Copy link
Member Author

@CIPHERTron CIPHERTron commented Sep 16, 2021

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

see 39a6952

Isn't it supposed to be a commit from a branch on my fork?
Like, for this PR, every commit belongs to CIPHERTron/kubernetes fork's structured-logs branch
Or maybe I'm not getting what the error means. Pretty new to it actually 😅

Loading

@karuppiah7890
Copy link

@karuppiah7890 karuppiah7890 commented Sep 16, 2021

@CIPHERTron Nothing is wrong with your commits. Your commits do belong to the branch of your fork. Turns out Kubernetes bot is not brainy enough to use the right link for the commits in this PR in it's comment OR there is some issue with GitHub linking issues, which seems to be the case with some experimentation. The right link for the commit is - this or this. If you simply try to paste the kubernetes/kubernetes repo based commit link as is, that is this link https://github.com/kubernetes/kubernetes/pull/104908/commits/39a69521438526b37d57f4e5dad53ea14b662298 in a GitHub comment, it gets rendered like this - 39a6952 and when you hover over it or click it, it leads to the wrong link because GitHub seems to have some issue with rendering the links properly with proper anchor tag. The wrong link shows code though, but says it does not belong to any branch of the kubernetes/kubernetes repo which is true, as it's still a PR and it's part of your fork and when it gets merged, it will get a different commit SHA too however. Kubernetes bot can maybe just use different way to link to the commits I guess. Or we gotta report to GitHub

So, that's the whole confusion I think. It's no way related to the test failure. The test failure is here

https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/104908/pull-kubernetes-unit/1438452621122736128

k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure: TestCreateBlobDisk expand_less | 0s
-- | --
=== RUN   TestCreateBlobDisk panic: test timed out after 3m0s  goroutine 232 [running]: testing.(*M).startAlarm.func1() 	/usr/local/go/src/testing/testing.go:1788 +0xbb created by time.goFunc 	/usr/local/go/src/time/sleep.go:180 +0x4a  goroutine 1 [chan receive]: testing.(*T).Run(0xc0002921a0, {0x251cb43, 0x12}, 0x25e6c40)

as mentioned in bot's comment with the link test as link

Loading

Copy link
Member

@thockin thockin left a comment

sorry to nit-pick. (not really sorry).

In general I think we want key names to be "lowerBumpyCaps" - "cidr" not "CIDR", etc

Loading

pkg/proxy/util/endpoints.go Outdated Show resolved Hide resolved
Loading
pkg/proxy/util/endpoints.go Outdated Show resolved Hide resolved
Loading
pkg/proxy/util/endpoints.go Outdated Show resolved Hide resolved
Loading
pkg/proxy/util/endpoints.go Outdated Show resolved Hide resolved
Loading
pkg/proxy/util/iptables/traffic.go Outdated Show resolved Hide resolved
Loading
pkg/proxy/util/iptables/traffic.go Outdated Show resolved Hide resolved
Loading
pkg/proxy/util/utils.go Outdated Show resolved Hide resolved
Loading
pkg/proxy/util/utils.go Outdated Show resolved Hide resolved
Loading
pkg/proxy/util/utils.go Outdated Show resolved Hide resolved
Loading
@serathius serathius moved this from Waiting on Reviewer to Waiting on Author in WG Structured Logging - 1.23 Migration Sep 17, 2021
@shivanshu1333
Copy link
Member

@shivanshu1333 shivanshu1333 commented Sep 18, 2021

@CIPHERTron can you please take a look at the review comments,
Thanks!

Loading

@CIPHERTron
Copy link
Member Author

@CIPHERTron CIPHERTron commented Sep 18, 2021

@CIPHERTron can you please take a look at the review comments,
Thanks!

Yeah, sorry about that. Was caught up with something else today!

Loading

@CIPHERTron
Copy link
Member Author

@CIPHERTron CIPHERTron commented Sep 18, 2021

Heyy @thockin, I've addressed all your suggestions. Could you please do a final check and say if everything's good to go or it needs some more changes? Thanks a lot!
/cc @serathius

Loading

@shivanshu1333
Copy link
Member

@shivanshu1333 shivanshu1333 commented Sep 18, 2021

/test pull-kubernetes-integration

Loading

1 similar comment
@shivanshu1333
Copy link
Member

@shivanshu1333 shivanshu1333 commented Sep 19, 2021

/test pull-kubernetes-integration

Loading

@CIPHERTron
Copy link
Member Author

@CIPHERTron CIPHERTron commented Sep 20, 2021

Heyy folks, do I have to squash merge it from my side? Thanks!
/cc @serathius @thockin @shivanshu1333

Loading

@k8s-ci-robot
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Sep 20, 2021

@CIPHERTron: GitHub didn't allow me to request PR reviews from the following users: shivanshu1333.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Heyy folks, do I have to squash merge it from my side? Thanks!
/cc @serathius @thockin @shivanshu1333

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.

Loading

@k8s-ci-robot k8s-ci-robot requested a review from thockin Sep 20, 2021
@serathius
Copy link
Contributor

@serathius serathius commented Sep 20, 2021

/lgtm

Loading

@serathius
Copy link
Contributor

@serathius serathius commented Sep 20, 2021

/unhold

Loading

@k8s-ci-robot k8s-ci-robot merged commit 060f5b8 into kubernetes:master Sep 20, 2021
14 checks passed
Loading
WG Structured Logging - 1.23 Migration automation moved this from Waiting on Author to Done Sep 20, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Sep 20, 2021
ibabou added a commit to ibabou/kubernetes that referenced this issue Sep 28, 2021
* Migrate to Structured Logs in `pkg/proxy/util`

* Minor fixes

* change key to cidr and remove namespace arg

* Update key from cidr to CIDR

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Update key cidr to CIDR

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Update key ip to IP

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Update key ip to IP

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Interchange svcNamespace and svcName

* Change first letter of all messages to capital

* Change key names in endpoints.go

* Change all keynames to lower bumby caps convention

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>
aojea added a commit to aojea/kubernetes that referenced this issue Nov 5, 2021
* Migrate to Structured Logs in `pkg/proxy/util`

* Minor fixes

* change key to cidr and remove namespace arg

* Update key from cidr to CIDR

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Update key cidr to CIDR

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Update key ip to IP

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Update key ip to IP

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>

* Interchange svcNamespace and svcName

* Change first letter of all messages to capital

* Change key names in endpoints.go

* Change all keynames to lower bumby caps convention

Co-authored-by: JUN YANG <69306452+yangjunmyfm192085@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment