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.

Add ability to provide custom `--state-id-suffix` to `meltano run`

See original GitHub issue

One thing that was cut late in development when adding incremental job support to meltano run was the ability to add a custom prefix to the auto generated job (now state) names: https://gitlab.com/meltano/meltano/-/merge_requests/2544#note_855957749

I think we’ve agreed on this already but just want to reiterate given that we’ve just logged ADR: Refactor/rename “job_id” as “state-id” (#3290 - closed), it is probably best to try to avoid user config/override for the state_id_prefix or job_id_prefix. Just for the reason that if we allow them to configure the naming convention, and then we update what it is called, that will create a breaking change which I think it’s best to avoid.

Now that the job -> state transition work has basically wrapped up we could revisit adding this.

@tayloramurphy fwiw this is a pretty easy-peasy change on the dev side. If only configurable as a cli arg weights probably as low as a 2, but if we want to also support this as a per env meltano.yml option than most likely more realistically a weight of 4.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
tayloramurphycommented, Sep 6, 2022

@aaronsteers looking at this proposal, yes I think it makes sense for the first 2 👍 Along with the spec that the suffix is delimited with : and we disallow ‘:’ from within the provided suffix and from within the component parts.

We’d need to spend a moment on how environment variable inheritance works to make sure it’s clear to user (similar to what Cody did in https://docs.meltano.com/guide/configuration#environment-variable-expansion ). Otherwise I like it

1reaction
aaronsteerscommented, Sep 5, 2022

@ReubenFrankel - Yes, exactly. And thanks for confirming regarding your use case related to #6164.

We could then take an approach of:

  1. Add --state-id-suffix support in meltano run.
  2. Add state_id_suffix: SUFFIX support in meltano.yml environment definitions (as sampled in @ReubenFrankel’s example code above), and support the setting of this via the meltano config CLI.
  3. Long-term, we can continue to evaluate how these are used and what additional features we’d want (if at all) in a more ‘native’ meltano construct for something like “sub-environments” or “environment matrices”.

@tayloramurphy - From the product side, what do you think of this approach of these three steps, green-lighting the first two steps above? Basically, these would also be a solve for #6164, at least as written.

The only disadvantage I can see about this ordering, and not going directly into the meltano.yml approach, is that presumably this introduces some small additional risk of environments being misconfigured. I’d like to eventually land on a spec that gives a very high confidence that each config item in the matrix is properly set to match the others. That’s something though, I think we can continue to iterate upon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line - Meltano Documentation
Meltano provides a command line interface (CLI) that makes it easy to ... To add a custom plugin using a custom plugin definition,...
Read more >
Manage Configuration
If you're adding a custom plugin, on the other hand, you will be asked to provide the names of the supported configuration options...
Read more >
Complete Tutorial - Meltano Documentation
Once you've got your new tap project set up, you can add it to your Meltano project as a custom plugin by following...
Read more >
Settings - Meltano Documentation
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 >
Plugins
Meltano provides the glue to make these components work together smoothly and ... To learn how to add a custom plugin to your...
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