Meltano Version
4.0.9
Python Version
NA
Bug scope
Configuration (settings parsing, validation, etc.)
Operating System
NA
Description
The dotenv_values function from the python-dotenv package can be set to None[^1]:
Variable without a value
A variable can have no value:
It results in dotenv_values associating that variable name with the value
None (e.g. {"FOO": None}. load_dotenv, on the other hand, simply ignores
such variables.
This shouldn't be confused with FOO=, in which case the variable is associated
with the empty string.
This means that if we have the following meltano.yml and .env
plugins:
extractors:
- name: tap-pypistats
variant: edgarrmondragon
pip_url: tap-pypistats
config:
packages:
- tap-$TAP_NAME
produce this behavior during env var expansion
$ meltano --log-level warning config print tap-pypistats
{
"packages": [
"tap-None"
]
}
Decision
Related
Code
plugins:
extractors:
- name: tap-pypistats
variant: edgarrmondragon
pip_url: tap-pypistats
config:
packages:
- tap-$TAP_NAME
Link to Slack/Linen
No response
Meltano Version
4.0.9
Python Version
NA
Bug scope
Configuration (settings parsing, validation, etc.)
Operating System
NA
Description
The
dotenv_valuesfunction from thepython-dotenvpackage can be set toNone[^1]:This means that if we have the following
meltano.ymland.envproduce this behavior during env var expansion
Decision
Should we treat
Noneas the empty string? i.e.ENV_VARis the same asENV_VAR=. Update: this was done in fix: DropNonevalues coming from.env#9825More interestingly: should
ENV_VARand its null value override lower-precedence setting stores, e.g.having
TAP_MY_SETTINGin.envandmy_setting: valinmeltano.ymlwill result inmy_settingbeing set to null, i.e. unset (Bug: Null config values don't get passed to plugins, preventing Mappers from working as expected #6382, Allow default values to be overridden withnull#2510).Related
null#2510Nonevalues coming from.env#9825Code
Link to Slack/Linen
No response