Skip to content

Add support for loading configuration from environment variables #47

@cryptaliagy

Description

@cryptaliagy

At this time, Quilla exclusively gets its configuration from the CLI options. However, it might be of use to have the options be read from environment variables.

My recommendation for this would be to add a plugin that uses the quilla_configure hook, and check some environment variables and the CLI parsed args to see what should be pulled from the environment and what shouldn't. Alternatively, using the quilla_addopts hook would potentially allow the setting of defaults for the various configuration options, which would bypass the need for changing the context object later on

One potential limitation to this approach would be the plugin execution order. If a plugin (i.e. the BlobStorage plugin) needs the configuration options at a specific time, then the environment loader would necessarily need to run prior to the BlobStorage plugin. However, that can also be mitigated by only handling environment configuration of parser options that are created in the make_parser function, and adding logic in the BlobStorage plugin to handle its own needs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions