Repository navigation
refactor(sidekick/api): read-only PathBinding - #7879
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the PathBinding struct by making its fields unexported and introducing getter and setter methods, including a query parameter getter that safely clones the map. It also introduces a new PathBindingBuilder to construct PathBinding instances and updates all references across the codebase. The review feedback recommends importing the maps package in the new builder file and cloning the map in WithQueryParameterMap to prevent external mutations.
coryan
marked this pull request as ready for review
October 31, 2026 14:45
amanda-tarafa
approved these changes
Nov 1, 2026
amanda-tarafa
left a comment
Contributor
There was a problem hiding this comment.
LGTM with a few more comments on this one, some to possibly address immediately, some to maybe consider as part of the whole refactor.
Make PathBinding fields private with getters and builder. Part of googleapis#7837
Update callers and tests to use PathBinding getters and builder. Part of googleapis#7837 Closes googleapis#7842
Panics in (*PathBinding).SetAnnotations if the codec field is already non-nil, and ensures discovery LRO pollers and Rust tests do not share PathBinding instances across methods or subtests.
Do not overwrite an existing PathBinding.targetResource in identifyTargetResourceForBinding when it was already set via PathBindingBuilder.WithTargetResource.
coryan
force-pushed
the
feat/readonly-path-binding
branch
from
November 3, 2026 21:31
78dd11e to
51241ad
Compare
coryan
enabled auto-merge (squash)
November 3, 2026 21:54
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.
Make
PathBindingfields private with getters and builder.Fixes #7842