Skip to content

Claim gRPC metadata support - #261

Merged
foxish merged 1 commit into
mainfrom
claim-metadata
Oct 31, 2025
Merged

foxish merged 1 commit into
mainfrom
claim-metadata

Conversation

@foxish

@foxish foxish commented Oct 31, 2025

Copy link
Copy Markdown
Member

Please verify that it's stated as you'd expected

- Your local service processes the request and replies.
- By default:
* If your local service's response contains the header 'sd-override: true', the response from your local service is immediately sent back to the client—the request does NOT reach the original sandbox workload.
* If your local service's response contains the header 'sd-override: true' (for HTTP), or sets the metadata key 'sd-override: true' on the response (for gRPC), the response from your local service is immediately sent back to the client—the request does NOT reach the original sandbox workload.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe "metadata pair"?

@daniel-de-vera daniel-de-vera Oct 31, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This how it looks in code:

grpc.SetHeader(ctx, metadata.Pairs("sd-override", "true"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

From https://github.com/grpc/grpc-go/blob/master/examples/features/metadata/server/main.go

header := metadata.New(map[string]string{...})
grpc.SendHeader(ctx, header)

So not sure we need to reference Pairs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, agreed - I think it will be self-evident to people familiar with gRPC either way.

@scott-cotton scott-cotton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@foxish
foxish merged commit 3fff08d into main Oct 31, 2025
@foxish
foxish deleted the claim-metadata branch October 31, 2025 19:09
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