Skip to content

Store server env defaults by env name #169

@simahawk

Description

@simahawk

Is your feature request related to a problem?

Today, when a field is made configurable via env you can still edit values manually.
These values are stored into server_env_defaults.
If you don't have env overrides such values will be used in all envs, which means that by restoring a prod db on staging you might have a prod conf in the wrong place.
This can easily happen when you leave to customers or to consultants the possibility to create new records manually (eg: add a new webservice to call on the fly).

Example of values today:

{"destination_pwd_env_default": "xyz", "destination_url_env_default": "https://send-somewhere.com"}

Describe the solution you'd like

Values from default should be mapped by environment. This way, we can lookup values by specific env.

Example of values in the future:

{
    "prod": {
        "destination_pwd_env_default": "xyz", "destination_url_env_default": "https://send-somewhere.com"
    }
}

Describe alternatives you've considered

Any?

@guewen @gurneyalex @sebalix your input is appreciated :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementno staleUse this label to prevent the automated stale action from closing this PR/Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions