cleanup(sidecar,logging): share the level encoder and use named verbosity constants - #2474
Merged
Merged
Conversation
roytman
previously approved these changes
Aug 20, 2026
roytman
reviewed
Aug 20, 2026
roytman
self-requested a review
August 20, 2026 06:53
…sity constants The zap level encoder existed verbatim in both the common logging package and the sidecar; export it once as logging.LevelEncoder and delete the copy. Convert the sidecar's bare V(4)/V(5) calls to the logging.DEBUG/logging.TRACE constants the logging convention requires, and guard the full-request-body TRACE logs, which stringified multi-KB bodies per request even when TRACE is off. V(1) sites are left as is; no named constant maps to them. Also drop the unreferenced MaxActiveModelsKey/UpdateTimeKey exports from the metrics extractor, and bump the envtest pin (release-0.19 / k8s 1.31, now EOL) to release-0.23 / k8s 1.35.0, matching controller-runtime v0.23 and the k8s 1.35 module set. Signed-off-by: Luke Van Drie <lukevandrie@google.com>
Signed-off-by: Luke Van Drie <lukevandrie@google.com>
LukeAVanDrie
force-pushed
the
epp-logging-tooling-cleanup
branch
from
August 20, 2026 18:17
214bba9 to
af01af9
Compare
ahg-g
approved these changes
Aug 21, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Consistency fixes in shared infrastructure:
pkg/common/observability/loggingandpkg/sidecar/proxy/options.go, so a change to level naming had to be made twice. It is now exported once aslogging.LevelEncoderand the sidecar copy is deleted.V(4)/V(5)integers at 50 call sites where the logging convention requires the namedlogging.DEBUG/logging.TRACEconstants; much of the sidecar already follows the convention. Levels are unchanged.V(1)sites are left alone since no named constant maps to them.Enabled().MaxActiveModelsKeyandUpdateTimeKeyin the metrics extractor had no references anywhere and are deleted.Dockerfile.builderpinned envtest atrelease-0.19/ k8s1.31.0(EOL) while kubectl isv1.35.3. The pin is nowrelease-0.23/1.35.0, matchingcontroller-runtime v0.23.3and the k8sv0.35module set, so hermetic integration tests run against a current control plane.Which issue(s) this PR fixes:
Part of #2470
Release note (write
NONEif no user-facing change):Test plan
pkg/common/...,pkg/sidecar/..., and the metrics extractormake test-integration-hermeticwith the new envtest pin (validates binary availability and control-plane compatibility; the epp integration suite passes)make presubmit