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.

Python-based Plugin Architecture

See original GitHub issue

I think we have a path forward on python plugin architecture (https://gitlab.com/groups/meltano/-/epics/134#note_981098666) which does not require modifying Meltano itself (at least not in the first iterations).

Since pip_url for any repo can include multiple libraries, we can extend any plugins’ capabilities by adding a meltano-managed python tool to any plugin that needs capabilities. Then those capabilities just need to registered as CLI-executable and be mapped to commands and capabilities in the Meltano plugin definition.

Example: registering dbt packages in packages.yml

Today we have custom code in Meltano that adds entries to packages.yml for dbt during meltano add transform .... We could replace it as follows:

  1. Create a new python tool called meltano-dbt-helpers with a registered CLI command meltano-dbt-util add package.
  2. Add that package to the pipurl for all dbt plugins. E.g. pip_url: dbt-snowflake meltano-dbt-helpers.
  3. Register commands in the package that leverage the helper. E.g.
    commands:
     add-dep:
       command: meltano-dbt-util
       args: add package
    

Then from the CLI as a user:

meltano run dbt:add-dep dbt-util

Would add dbt-util to the package.

For “smarter” integrations, we just need a contract that pairs capabilities like service with expected commands, like ui, up, and down.

Comparison with other approaches

The best part of this approach is that it doesn’t require any code changes in Meltano - we and community members could implement this today with existing features.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:33 (18 by maintainers)

github_iconTop GitHub Comments

5reactions
tayloramurphycommented, Jul 18, 2022

@pandemicsyn per your feedback in https://github.com/meltano/meltano/issues/6398 I’m assigning to you for the current iteration.

2reactions
pandemicsyncommented, Aug 23, 2022

@tayloramurphy so for the sdk we currently have:

  • the repo: http://github.com/meltano/sdk
  • the package name: singer-sdk & singer_sdk

So for this new addition, maybe something like:

  • the repo: http://github.com/meltano/edk
  • the package name: meltano-edk & meltano_edk
Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating and discovering plugins
Often when creating a Python application or library you'll want the ability to provide customizations or extra features via plugins. Because Python packages ......
Read more >
Plugin Architecture in Python - DEV Community ‍ ‍
At its core, a plugin architecture consists of two components: a core system and plug-in modules. The main key design here is to...
Read more >
Building a plugin architecture with Python | by Maxwell Mapako
Building a plugin architecture with Python. It's no secret that one of the greatest software design principles when extending functionality ...
Read more >
Evennia - a Python-Based Mu* Server
The plugin architecture does most of the work for you so as a developer all you ... Evennia is a game development framework...
Read more >
Welcome to Flask — Flask Documentation (2.2.x)
This section of the documentation explains the different parts of the Flask framework and how they can be used, customized, and extended.
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