Skip to content

limit grpc logging info to a configurable character limit #1085

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

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

leiyiz
Copy link
Contributor

@leiyiz leiyiz commented Nov 18, 2022

What type of PR is this?
/kind bug

What this PR does / why we need it:
ListVolume call generates tons of log items because by default the entirety of the grpc response body gets logged out. That consumes log space really fast and we want to limit how much can be logged in the same message.

This might impact some visibility into what's going on with ListVolume call.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

didn't find obvious way to make the log limit configurable. Pls advise of otherwise

Does this PR introduce a user-facing change?:

Logging for gRPC call is now limited to 10000 char by default, and configurable with flag --grpc-log-char-cap

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 18, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leiyiz

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 18, 2022
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 22, 2022
@leiyiz leiyiz changed the title limit logging info to 10000 char maximum limit grpc logging info to a configurable character limit Nov 22, 2022
@amacaskill
Copy link
Member

/retest

@amacaskill
Copy link
Member

lgtm but just looks like you need to change the tests that call gceDriver.Run(endpoint) --> gceDriver.Run(endpoint, grpcLogCharCap)

@leiyiz
Copy link
Contributor Author

leiyiz commented Nov 30, 2022

/test pull-gcp-compute-persistent-disk-csi-driver-sanity

@leiyiz
Copy link
Contributor Author

leiyiz commented Nov 30, 2022

fixed test failure, @amacaskill ptal

@judemars
Copy link
Contributor

Hey there! Just letting you know that I have just fixed and re-enabled the sanity tests for PD in go/pdcsi-oss-driver/issues/990 so if you experience failures in your sanity test PR gate build because you're on an old branch before the tests were fixed, merging the latest commits from master into this branch it should make them pass. Let me know if you have any questions!

@amacaskill
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 30, 2022
@k8s-ci-robot k8s-ci-robot merged commit 41af246 into kubernetes-sigs:master Nov 30, 2022
k8s-ci-robot added a commit that referenced this pull request Jan 18, 2023
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. kind/bug Categorizes issue or PR as related to a bug. 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants