-
Notifications
You must be signed in to change notification settings - Fork 267
Open
Labels
Description
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
, theKey()
method returnse.cfg.Name
- In
internal/config/environments.go:93
, the configuration defaults setname
to the YAML key identifier - In
internal/server/environments/storage.go:217-227
, theGet()
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:
- In https://github.com/flipt-io/flipt-client-sdks/blob/fe8bf65aa563fe0bd76be164698a7e710a53a49d/flipt-client-python/flipt_client/__init__.py#L38 , the Python SDK uses
"default"
as default environment key - After PR #4745, the server returns an error when a specified environment key cannot be found, rather than falling back to the default environment.
Environment
- Flipt v2.1.3
- Flipt Client SDKs for Python v1.3.1