Plugin config in Environments requires a `config` value or `setting` definition in top level plugin declaration
What is the current bug behavior?
What is happening now?
From @pnadolny13 in #3299 (comment 860273439)
So it seems like current behavior is that you cant introduce configs at the environment level unless they were already defined in the top level config or theres an explicit setting definition.
What is the expected correct behavior?
What should be happening?
Config values defined only in an Environment should work without requiring the same config to have a value or a setting
to exist in the top-level plugin definition.
Steps to reproduce
How one can reproduce the issue?
Add a config to a plugin only in an Environment:
meltano --environment=dev config my-plugin set "my_config" "value"
Meltano fails to recognize and expose this config in the runtime plugin environment.
Relevant logs and/or screenshots
Please use code blocks (```) to format console output
# This fails because 'SQLFLUFF_SF_USER' is referenced in my dbt but its not set
meltano invoke sqlfluff lint
# This fails because 'SQLFLUFF_SF_USER' is referenced in my dbt but its not set
meltano --environment=dev invoke sqlfluff lint
# This fails because 'SQLFLUFF_SF_USER' is referenced in my dbt but its not set
meltano --environment=prod invoke sqlfluff lint
Possible fixes
If you can, link to the line of code that might be responsible for the problem or suggest a fix
Further regression test
Ensure we automatically catch similar issues in the future
-
Write additional adequate test cases and submit test results -
Test results should be reviewed by a person from the team
Work Around Solutions
Either add an explicit setting to your plugin as shown in #3299 (comment 859299619).
Or add the config key to the top level (not in an environment) plugin configuration, then Meltano recognizes it and reads the environment specific config properly. As described in #3299 (comment 860273439).