question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore setting values when selecting store location and store=auto

See original GitHub issue

Given the following meltano.yml

default_environment: dev
plugins:
  extractors:
  - name: tap-github
    variant: singer-io
    pip_url: tap-github
    config:
      repository: meltano/meltano
environments:
- name: dev
- name: staging
- name: prod

if I run meltano --environment=prod config tap-github set repository "meltano/meltano meltano/hub"

I get

default_environment: dev
plugins:
  extractors:
  - name: tap-github
    variant: singer-io
    pip_url: tap-github
    config:
      repository: meltano/meltano meltano/hub
environments:
- name: dev
- name: staging
- name: prod

another scenario I tested:

default_environment: dev
plugins:
  extractors:
  - name: tap-github
    variant: singer-io
    pip_url: tap-github
environments:
- name: dev
- name: staging
- name: prod

meltano config tap-github set repository "meltano/meltano"

default_environment: dev
plugins:
  extractors:
  - name: tap-github
    variant: singer-io
    pip_url: tap-github
environments:
- name: dev
  config:
    plugins:
      extractors:
      - name: tap-github
        config:
          repository: meltano/meltano
- name: staging
- name: prod

meltano --no-environment config tap-github set start_date "some_date"

default_environment: dev
plugins:
  extractors:
  - name: tap-github
    variant: singer-io
    pip_url: tap-github
    config:
      start_date: some_date
environments:
- name: dev
  config:
    plugins:
      extractors:
      - name: tap-github
        config:
          repository: meltano/meltano
- name: staging
- name: prod

meltano --environment=prod config tap-github set start_date "some_other_date"

# UNEXPECTED RESULT
default_environment: dev
plugins:
  extractors:
  - name: tap-github
    variant: singer-io
    pip_url: tap-github
    config:
      start_date: some_other_date
environments:
- name: dev
  config:
    plugins:
      extractors:
      - name: tap-github
        config:
          repository: meltano/meltano
- name: staging
- name: prod

meltano --environment=prod config tap-github set start_date "some_other_date" --store=meltano_environment

#EXPECTED RESULT
default_environment: dev
plugins:
  extractors:
  - name: tap-github
    variant: singer-io
    pip_url: tap-github
    config:
      start_date: some_other_date
environments:
- name: dev
  config:
    plugins:
      extractors:
      - name: tap-github
        config:
          repository: meltano/meltano
- name: staging
- name: prod
  config:
    plugins:
      extractors:
      - name: tap-github
        config:
          start_date: some_other_date

Updated Spec Proposal (AJ, 2022-06-14)

https://github.com/meltano/meltano/issues/6116#issuecomment-1155873908

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kgpaynecommented, Jun 15, 2022

…it made sense then to prefer overwriting the current value instead of adding a new possibly conflicting value in a difference place. That still feels right to me…

I think the Environments feature changes the assumption that the current store is likely the best, on the basis that Environments are specifically designed to override other stores. So I am generally in favour of:

i) Implementing a deterministic resolution of auto-store based on the setting type and current context (i.e Environment) only, as per AJ’s suggestion. ii) Improving logging messages to explain where auto-store placed a setting value and how to use --store if auto made a different choice to the users intent. iii) Adding visibility of setting values across all stores to the CLI config list command, to help users view and debug the resolution order of their settings in a particular context (especially for projects with config spread across multiple files).

1reaction
kgpaynecommented, Jul 14, 2022

@tayloramurphy

I assume that’s not part of your current PR, correct?

Correct 🙂 Created

Are you thinking something like this:

Yep, I think that looks perfect. I also think it would be useful to show all the values in all the stores for an individual setting (including all environments etc.), especially for projects that have gone for the one-environment-per-subfile approach like Squared. But maybe that is a new detailed view with its own command path:

meltano config <plugin> list <setting>

A separate command would keep the summary list view concise whilst still giving users access to the full list if they want to find where a specific value is coming from.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Turn Off Automatic Updates for Microsoft Store apps via ...
Here, right-click on a space on the right-hand side and go to New > DWORD Value. Name this DWORD AutoDownload and assign it...
Read more >
Exercise 9: Choosing optimal store locations using location ...
In this exercise, you will choose the store locations that would generate the most business for a retail chain. The main objective is...
Read more >
What is Azure Cosmos DB analytical store? - Microsoft Learn
By storing the data in a column-major order, the analytical store allows a group of values for each field to be serialized together....
Read more >
About store visit conversions - Google Ads Help
Value : Set a store visit conversion value to understand your full return on investment (ROI) and make more informed decisions about your...
Read more >
Working with Svelte stores - Learn web development | MDN
In this article we will show another way to handle state management in Svelte: Stores. Stores are global data repositories that hold values....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found