Skip to content

EvaluationSnapshotNamespaceStream 'environment: "default" not found errors' when upgrading to 2.3.0 #4958

@darrenclark

Description

@darrenclark

We tried upgrading from 2.1.0 -> 2.3.0 but had to rollback after seeing lots of these errors in the logs:

{"L":"INFO","T":"2025-10-28T22:08:48Z","M":"finished streaming call with code NotFound","server":"grpc","grpc.start_time":"2025-10-28T22:08:48Z","system":"grpc","span.kind":"server","grpc.service":"evaluation.ClientEvaluationService","grpc.method":"EvaluationSnapshotNamespaceStream","peer.address":"0","error":"rpc error: code = NotFound desc = environment: \"default\" not found","grpc.code":"NotFound","grpc.time_ms":0.436}
{"L":"DEBUG","T":"2025-10-28T22:08:48Z","M":"skipping authentication for server","server":"grpc","method":"/evaluation.ClientEvaluationService/EvaluationSnapshotNamespaceStream"}

I think previously it'd default to the default environment, in our case this was "dev" environment:

    environments:
      dev:
        name: dev
        directory: dev
        default: true   # <- mark dev as default environment
        storage: github-flipt-state

but now it seems to be defaulting to a environment that doesn't exist (named "default")

Possible issue / solution

I wonder if it's caused by this change: 4d02b95

Since it's no longer using GetFromContext, it no longer applies the correct defaulting logic?

I noticed that EvaluationSnapshotNamespace falls back to GetFromContext:

https://github.com/flipt-io/flipt/blob/b9d7140ffcc767558edc8d4f3acc8f67fb74ef00/internal/server/evaluation/client/server.go#L39C18-L50

Perhaps EvaluationSnapshotNamespaceStream also needs to do that fallback?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions