Skip to content

feat: migrate to the connect based grpc setup - #2042

Merged
JamieSinn merged 2 commits into
http-get-all-flagsfrom
connect-grpc
Sep 1, 2026
Merged

feat: migrate to the connect based grpc setup#2042
JamieSinn merged 2 commits into
http-get-all-flagsfrom
connect-grpc

Conversation

@JamieSinn

Copy link
Copy Markdown
Member

This PR

This is a pretty near 1:1 swap of the grpc handler to align to connect.

There are a few notable changes:

This on the client side is a drop in replacement; no changes there needed.

This is a pretty near 1:1 swap of the grpc handler to align to connect.

There are a few notable changes:
- the setting added in #1998 are not required anymore because connect has no minimum.

This on the client side is a drop in replacement; no changes there needed.

Signed-off-by: Jamie Sinn <james.sinn@dynatrace.com>
@JamieSinn
JamieSinn requested review from a team as code owners September 1, 2026 15:58
@JamieSinn
JamieSinn requested review from erka and toddbaert September 1, 2026 15:58
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: d40af04f-1f1a-4c66-b17d-237d98fc2946

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@erka erka 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.

great work! some small nits from me.

Comment thread flagd/pkg/runtime/from_config.go Outdated
Comment thread flagd/pkg/service/flag-sync/handler.go Outdated
Comment thread flagd/pkg/service/flag-sync/handler.go Outdated
Comment thread flagd/pkg/service/flag-sync/handler.go Outdated
Comment thread flagd/pkg/service/flag-sync/handler.go Outdated
Comment thread flagd/pkg/service/flag-sync/handler.go Outdated
Comment thread flagd/pkg/service/flag-sync/handler.go Outdated
Comment thread flagd/pkg/service/flag-sync/connect_service.go Outdated
Comment thread flagd/pkg/service/flag-sync/connect_service.go
@toddbaert

Copy link
Copy Markdown
Member

I would love if we could make /v1/flags and /flagd.sync.v1.FlagSyncService/FetchAllFlags the same endpoint literally but I don't think we can, due to the way the latter must be wrapped to match the proto payload (FetchAllFlagsResponse). This is the next best thing, I think (a human readable /v1/flags and a connect compatible /flagd.sync.v1.FlagSyncService/FetchAllFlags. It allows us to drop the cmux dep.

@toddbaert

toddbaert commented Sep 1, 2026

Copy link
Copy Markdown
Member

Follow-up, not for this PR: we could mark FetchAllFlags idempotency_level = NO_SIDE_EFFECTS so the Connect path is GET-able and CDN/proxy-cacheable. It's additive/non-breaking: server still serves POST and just also accepts GET; gRPC clients unaffected; Connect clients keep POSTing unless they opt into WithHTTPGet(). HTTP/1.1 clients can use both POST and GET.

Caching caveat: the selector must be in the URL (query/message) to be cache-safe, or the server sets Vary: Flagd-Selector on the response so caches key on that request header too... or it wouldn't be a cache factor.

I'll open an issue to track that I think.

Comment thread flagd/pkg/service/flag-sync/connect_service.go Outdated
@toddbaert
toddbaert self-requested a review September 1, 2026 20:01

@toddbaert toddbaert 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.

Similar to @erka , only nits and notes. Great work.

Signed-off-by: Jamie Sinn <james.sinn@dynatrace.com>
@JamieSinn
JamieSinn merged commit 20c7af2 into http-get-all-flags Sep 1, 2026
5 of 7 checks passed
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

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