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.

bug: meltano.yml updates overwrite user-changed indentation

See original GitHub issue

Meltano Version

2.10.0

Python Version

3.9

Bug scope

Other

Operating System

Mac OS 12.6 Monterey

Description

Steps to replicate:

  1. Run meltano init test
  2. cat test/meltano.yml output:
cat test/meltano.yml
version: 1
default_environment: dev
project_id: b02272c0-d17d-4512-ab23-47ed7c9133ad
environments:
- name: dev
- name: staging
- name: prod
  1. Format YAML indentation differently:
version: 1
default_environment: dev
project_id: b02272c0-d17d-4512-ab23-47ed7c9133ad
environments:
  - name: dev
  - name: staging
  - name: prod
  1. Run a meltano CLI command that updates meltano.yml file. In my case I ran meltano add loader target-jsonl.
  2. Notice the leading indentation of the environments array members in meltano.yml has reverted from two spaces to zero:
version: 1
default_environment: dev
project_id: b02272c0-d17d-4512-ab23-47ed7c9133ad
environments:
- name: dev
- name: staging
- name: prod
plugins:
  loaders:
  - name: target-jsonl
    variant: andyh1203
    pip_url: target-jsonl

Code

n/a

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
tayloramurphycommented, Dec 7, 2022

The success criteria is near-zero unexpected reformats, aka minimal git diff ‘noise’.

@aaronsteers Agreed on that!

I might lean toward just parameterizing one or two parts of this - perhaps we could just have ‘yaml.array_indent’ being 0/2 or more simply true/false

I like that as well. Let’s consider that a reasonable approach that we’ll accept PRs on but not prioritize ourselves cc @menzenski

0reactions
menzenskicommented, Dec 8, 2022

Thanks all - I’m new to Meltano but happy to work on a PR for this. Is there any existing convention around project configuration (as opposed to plugin configuration) I should be aware of?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · meltano/meltano
bug: meltano.yml updates overwrite user-changed indentation Accepting Pull Requests kind/Bug Something isn't working valuestream/Meltano.
Read more >
Settings
Meltano supports a number of settings that allow you to fine tune its behavior, which are documented here.To quickly find the setting you're...
Read more >
Complete Tutorial
Since YAML is a superset of JSON, the object should be indented correctly, but formatting does not need to be changed. The simplest...
Read more >
Manage Configuration
Your meltano.yml project file, under the plugin's config key. ... Starting with Meltano 2.0 , you can override the properties of discoverable plugins, ......
Read more >
Command Line
Meltano provides a command line interface (CLI) that makes it easy to manage ... This flag overwrites any existing meltano.yml in the project...
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