Repository navigation
Conversation
Assisted-by: OpenAI Codex Signed-off-by: Amrinder Randhawa <272048731+amarrtech@users.noreply.github.com>
Author
|
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 does the PR do?
Constructs the OpenTelemetry carrier value from gRPC metadata with both its pointer and explicit length. This prevents the
nostd::string_viewconstructor from usingstrlenongrpc::string_ref::data()and reading beyond the metadata value, which can make valid 55-bytetraceparentheaders fail parsing.Checklist
<commit_type>: <Title>.pre-commit run --alllocally; see Caveats.fix: preserve gRPC trace context length.Commit Type:
Related PRs:
None.
Where should the reviewer start?
src/grpc/infer_handler.h, inGrpcServerCarrier::Get.Test plan:
uvx pre-commit run --files src/grpc/infer_handler.h— passed, including clang-format, codespell, secret scan, merge-conflict checks, and license validation.git diff --check— passed.traceparentfollowed by a non-null byte. The pointer-only view reported length 56; the pointer-plus-size view reported 55.Caveats:
This host does not have CMake, a built Triton server image, or the GPU test stack needed for
qa/L0_trace. A repository-wide pre-commit run was attempted, but currentmainfails its all-files flake8 pass on existing unrelated files; the changed header passes the configured hooks in isolation.Background
A
grpc::string_refis not required to be null-terminated. Passing onlydata()selects the C-string constructor and derives the length withstrlen, so trace context acceptance depends on the adjacent byte in memory.Related Issues:
traceparentmetadata past its end, so OpenTelemetry drops some valid trace contexts #8984