Just starting with "environments" in meltano. Not ...
# troubleshooting
v
Just starting with "environments" in meltano. Not sure if this is expected behavior based on the docs
meltano --environment=prod config target-csv set destination_path ./output
I would think would set the configuration for the prod environment for target-csv's destination_path config to ./output. Instead my setting is getting set "globally" After running my (snipped meltano.yml) looks like
Copy code
environments:
- name: dev
- name: localdev
- name: prod
Copy code
2   - name: target-csv
  1     variant: hotgluexyz
736     pip_url: git+<https://github.com/AutoIDM/target-csv.git>
  1     config:
  2       destination_path: ./output
  3       validate: false
Am I doing something wrong or is this a bug?
Output
Copy code
2022-07-27T23:45:14.777530Z [info     ] Environment 'prod' is active
Loader 'target-csv' setting 'destination_path' was set in `meltano.yml`: './output'
If I manually set
Copy code
- name: localdev
  config:
    plugins:
      loaders:
        - name: target-csv
          config:
            destination_path: ./output
My path is pulled as expected following env rules
e
It at least seems unexpected… If you use the
--store
option
Copy code
meltano --environment=prod config target-csv set destination_path ./output --store=meltano_environment
does it set the value in the right place?
v
That does work!
a
Looks like a new bug from when we recently changed the default
meltano config
behavior. Looks like a conflict between behaviors
--store=meltano_environment
and
--environment=
. If we expect users to set with
--environment=...
then
--store=meltano_environment
can probably be removed in favor of
--store=meltano_yaml
automatically choosing top-level or environment-level based on the
--environment
flag or lack thereof.
I'll log in an issue unless someone has beat me to it 🙂
v
While I was looking at the issue my screen updated when you edited the description @aaronsteers I didn't realize Github did this without a manual refresh! Nifty
a
😄
partywizard