Skip to content

feat(sidekick): create gated resource name heuristic foundation#4085

Open
haphungw wants to merge 6 commits intogoogleapis:mainfrom
haphungw:resource-naming-tracing
Open

feat(sidekick): create gated resource name heuristic foundation#4085
haphungw wants to merge 6 commits intogoogleapis:mainfrom
haphungw:resource-naming-tracing

Conversation

@haphungw
Copy link
Contributor

We want our client libraries to include the resource name (like projects/my-project/instances/my-vm) for tracing. This PR adds the foundational heuristic implementation to help sidekick figure out the names for those specific services.

For #4018

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request lays a solid foundation for the resource name heuristic, with clear and well-tested logic. The changes are well-structured and easy to follow. I have a couple of suggestions to enhance performance and improve comment clarity in the new code.

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.20%. Comparing base (1015ead) to head (4cc68cf).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4085      +/-   ##
==========================================
+ Coverage   81.95%   82.20%   +0.25%     
==========================================
  Files          78       79       +1     
  Lines        6521     6526       +5     
==========================================
+ Hits         5344     5365      +21     
+ Misses        832      813      -19     
- Partials      345      348       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haphungw haphungw marked this pull request as ready for review February 17, 2026 22:10
@haphungw haphungw requested review from a team as code owners February 17, 2026 22:10
Copy link
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file name is a blocker for me. The rest are questions or nits.

Copy link
Member

@dbolduc dbolduc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach could work, but my instinct is that we need to update the api.Model to hold candidate resources somewhere. (I think on a pathBinding). As the resources that might be targeted by a method do not depend on the language of the client library.

If we have some function like calculateResourceCandidates(...) for a path binding (or maybe method), then we would encode the heuristic in that logic. I think we would not have a HeuristicMetadata struct where the resource candidate logic is kinda split in two very different places.

@haphungw haphungw requested a review from a team as a code owner February 18, 2026 00:17
@haphungw haphungw force-pushed the resource-naming-tracing branch from bb386db to 6bb5051 Compare February 18, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants