Skip to content

[go-feature-flag] Should remote evaluation emit events and fail init on an unreachable relay proxy? #1948

Open

Description

@aepfli

Running the provider TCK against the Java GO Feature Flag provider (#1947) showed the two evaluation types behaving differently in three places. I'm not sure whether that is intended, so asking before proposing anything.

In remote mode, RemoteEvaluator passes initialize straight to OfrepProvider and adds nothing on top. As a result:

  • A relay proxy that can't be reached does not fail init. A provider pointed at a dead port reaches READY. In-process fails, because its init fetches /v1/flag/configuration.
  • No PROVIDER_CONFIGURATION_CHANGED. Nothing polls, so a flag change only shows up on the next evaluation.
  • No PROVIDER_STALE. An outage only shows up as per-evaluation errors. In-process goes stale after 3 failed polls (STALE_AFTER_CONSECUTIVE_FAILURES).

This matches OFREP: the server-provider guideline has no initialisation step, no polling and no events, and the OFREP API has no health endpoint. So remote mode does what OFREP asks. The question is only whether GO Feature Flag wants more than that, using its own relay-proxy endpoints:

  1. Should remote mode watch for changes, emitting PROVIDER_CONFIGURATION_CHANGED and PROVIDER_STALE? In-process already polls /v1/flag/configuration with the ETag, and /v1/flag/change or the SSE stream may be lighter. Or is that too much for a mode people pick so they don't sync configuration?
  2. Should init probe the relay proxy, e.g. GET /health, so a misconfigured endpoint fails fast instead of reaching READY?

None of this is a spec violation. The TCK records these capabilities as not attempted in remote mode, not as defects. Whichever way this goes, I'll update the adoption to match.

The Go provider's remote mode behaves the same way: its init never contacts the relay proxy and nothing polls (go-sdk-contrib#1053).

Related: #1850 (OFREP codeDefaultFlag → FLAG_NOT_FOUND) is a separate issue that also affects remote mode.

Activity

  1. aepfli commented on Oct 20, 2026

    @aepfli
    MemberAuthor

    @thomaspoignant this is just me verifying my limited knowledge, if you do have the time, i would appreciate your input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions