external-provisioner icon indicating copy to clipboard operation
external-provisioner copied to clipboard

RFC: structured, contextual logging

Open pohly opened this issue 4 years ago • 13 comments

What type of PR is this? /kind cleanup

What this PR does / why we need it:

Embracing go-logr as logger has several advantages:

  • adding a certain prefix and/or set of objects can be done consistently with less code duplication
  • it's even possible for the caller to do that, something that doesn't work when the prefix is part of the format string
  • in Go tests, all output can be associated with the currently running test via https://github.com/kubernetes/klog/pull/240

The latter was needed to debug https://github.com/kubernetes-csi/external-provisioner/issues/638

Does this PR introduce a user-facing change?:

Log messages are structured (fixed message, additional information in key/value pairs).

pohly avatar May 31 '21 11:05 pohly

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pohly To complete the pull request process, please assign msau42 after the PR has been reviewed. You can assign the PR to them by writing /assign @msau42 in a comment when ready.

The full list of commands accepted by this bot can be found 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 avatar May 31 '21 11:05 k8s-ci-robot

@pohly: PR needs rebase.

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 avatar Jun 08 '21 16:06 k8s-ci-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 07 '21 14:09 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Oct 07 '21 15:10 k8s-triage-robot

/remove-lifecycle rotten

pohly avatar Oct 07 '21 16:10 pohly

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 05 '22 16:01 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Feb 04 '22 17:02 k8s-triage-robot

/remove-lifecycle rotten

I will come back to this once contextual logging is usable in Kubernetes. It's planned for alpha in 1.24.

pohly avatar Feb 04 '22 19:02 pohly

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jun 05 '22 14:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jul 05 '22 15:07 k8s-triage-robot

/remove-lifecycle stale

xing-yang avatar Jul 07 '22 18:07 xing-yang

/remove-lifecycle rotten

xing-yang avatar Jul 07 '22 18:07 xing-yang

@pohly: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-csi-external-provisioner-1-22-on-kubernetes-1-22 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-1-22-on-kubernetes-1-22
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21
pull-kubernetes-csi-external-provisioner-unit c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-unit
pull-kubernetes-csi-external-provisioner-1-23-on-kubernetes-1-23 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link false /test pull-kubernetes-csi-external-provisioner-1-23-on-kubernetes-1-23
pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-23 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-23
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-24 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-24

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

k8s-ci-robot avatar Aug 18 '22 00:08 k8s-ci-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Nov 16 '22 00:11 k8s-triage-robot

@pohly: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-csi-external-provisioner-1-22-on-kubernetes-1-22 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-1-22-on-kubernetes-1-22
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21
pull-kubernetes-csi-external-provisioner-unit c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-unit
pull-kubernetes-csi-external-provisioner-1-23-on-kubernetes-1-23 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link false /test pull-kubernetes-csi-external-provisioner-1-23-on-kubernetes-1-23
pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-23 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-23
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-24 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-24
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-25 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-25

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

k8s-ci-robot avatar Nov 21 '22 17:11 k8s-ci-robot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pohly

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 avatar Dec 23 '22 15:12 k8s-ci-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jan 22 '23 17:01 k8s-triage-robot

/remove-lifecycle rotten

pohly avatar Jan 22 '23 22:01 pohly

PR needs rebase.

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 avatar Feb 03 '23 11:02 k8s-ci-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 04 '23 12:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 03 '23 12:06 k8s-triage-robot

/remove-lifecycle rotten

I was looking for a volunteer to continue with this, but so far without luck. I'll probably finish this myself.

pohly avatar Jun 05 '23 06:06 pohly

Hi @pohly

I was looking for a volunteer to continue with this, but so far without luck. I'll probably finish this myself.

Would it be acceptable if I were to take on this development task?

bells17 avatar Aug 12 '23 09:08 bells17

@bells17: help with this would be very welcome. Feel free to take my branch, rebase it and continue in a new PR.

I think with this PR and https://github.com/kubernetes-csi/node-driver-registrar/pull/259 it is technically clear how to use component-base/logs. The rest of the conversion can go as described in https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md

pohly avatar Aug 21 '23 17:08 pohly

@pohly: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-csi-external-provisioner-1-22-on-kubernetes-1-22 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-1-22-on-kubernetes-1-22
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21
pull-kubernetes-csi-external-provisioner-1-23-on-kubernetes-1-23 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link false /test pull-kubernetes-csi-external-provisioner-1-23-on-kubernetes-1-23
pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-23 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-23
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-24 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-24
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-25 c4a1889bca99c42ffa89c380c8b7cc66e602f8e5 link true /test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-25
pull-kubernetes-csi-external-provisioner-1-27-on-kubernetes-1-27 a2d6a4d9da518554668e027f712e189960a4870b link true /test pull-kubernetes-csi-external-provisioner-1-27-on-kubernetes-1-27

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

k8s-ci-robot avatar Oct 02 '23 17:10 k8s-ci-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 22 '24 00:01 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Feb 21 '24 00:02 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Mar 22 '24 01:03 k8s-triage-robot

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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 avatar Mar 22 '24 01:03 k8s-ci-robot