-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: SingerMapper sets mapping configuration provided from env to null #8507
Comments
Thanks for reporting and digging! You might wanna see https://github.com/meltano/meltano/tree/edgarrmondragon/fix/mapper-env-vars (fwiw I think this error would've been caught earlier if type checking was enabled on that module) |
@edgarrmondragon Thanks so much for preparing a fix so quickly! I have tested your branch with my reproduction repo, and I can confirm that it indeed works. Is there some way I can help to get the PR merged? |
@jnv Confirmation that the issue is fixed by the PR is pretty good actually 😄 |
Meltano Version
3.4.0
Python Version
3.11
Bug scope
Configuration (settings parsing, validation, etc.)
Operating System
Linux - Fedora 39
Description
I want to invoke
meltano-map-transformer
with stream_map provided via environment variableMELTANO_MAP_TRANSFORMER_STREAM_MAPS
. However, the mapper never receives the configuration because the generated JSON file contains onlynull
.I tracked down this issue to
before_configure
hook inSingerMapper
. Basically bothbefore_configure
hooks inSingerMapper
andSingerPlugin
get called and both write to the same configuration file. This works fine when the mapper configuration is provided viameltano.yml
, but when I provide mapping via environment variable, the hook inSingerPlugin
writes the config file correctly, but the hook inSingerMapper
overwrites it tonull
.Reproduction steps
I've prepared a repository for bug reproduction: https://github.com/jnv/meltano-bug-repro
There is the same mapping provided for
meltano-map-transformer
, once viameltano.yml
asupper
and once asMELTANO_MAP_TRANSFORMER_STREAM_MAPS
in.env
file.Invoking via mapping works:
Invoking
meltano-map-transformer
directly, with env variable, fails:meltano invoke meltano-map-transformer < data/animals.jsonl
Debug log
The invoker definitely sees the env variable:
But config dump prints just
null
:$ meltano invoke --dump config meltano-map-transformer < data/animals.jsonl null
While invoking the mapper works fine:
The text was updated successfully, but these errors were encountered: