Skip to content

Environment Reference Does Not Work as Documented #4856

@suzuki-safie

Description

@suzuki-safie

Bug Report: Environment Reference Does Not Work as Documented

Summary

We have experienced two unexpected behaviors in environment handling.

Issue 1: Environments are Referenced by Name Field Instead of Identifier

Expected Behavior

Environments are referenced by their identifier (the YAML object key), according to the documentation.

Actual Behavior

Environments are actually referenced by their name field (the YAML object value).

Related codes:

  • In internal/storage/environments/git/store.go:98-99, the Key() method returns e.cfg.Name
  • In internal/config/environments.go:93, the configuration defaults set name to the YAML key identifier
  • In internal/server/environments/storage.go:217-227, the Get() method looks up environments by this key

Issue 2: Default Environment Cannot Be Customized When Environment Key is Unspecified

Expected Behavior (According to Documentation)

According to the documentation, when no environment is specified, the environment with default: true should be used, regardless of its identifier or name.

Actual Behavior

When no environment is specified in client initialization, environment with name "default" is used.
If no environment with name "default" exists, the server returns an error.

Related codes:

Environment

  • Flipt v2.1.3
  • Flipt Client SDKs for Python v1.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    In Progress

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions