:wave: Hi guys, regarding auto-install feature of ...
# troubleshooting
k
👋 Hi guys, regarding auto-install feature of latest Meltano 3.5.2, it appears that Meltano is trying to re-install inherited plugin though I ran
meltano install
in the previous steps. This is what I've observed so far 1. Executing
meltano install
command, Meltano tries to install all plugins but skip inherited ones 2. Later on when executing
meltano run *tap-postgres--abc* remove-abc-pii target-redshift
, Meltano tries to reinstall
tap-postgres--abc
. Note that, the inherited plugin
pip_url
is exactly the same as its parent
Copy code
2024-09-18T09:15:52.675240Z [info     ] Environment 'dev' is active
2024-09-18T09:15:53.063408Z [info     ] Installing extractor 'tap-postgres--abc'
2024-09-18T09:15:59.955558Z [info     ] Installed extractor 'tap-postgres--abc'
2024-09-18T09:15:59.955793Z [info     ] Installed 1/2 plugins
2024-09-18T09:15:59.955834Z [info     ] Skipped installing 1/2 plugins
3. I attempted turning off auto-install feature by setting
auto_install: False
in
meltano.yml
file, but the same above issue persists 😢 4. Explicitly add
--no-install
flag could resolve the problem,
meltano run
stop trying to install plugin (
meltano run *--no-install*
*tap-postgres--abc* remove-abc-pii target-redshift
) Question: Might I understand if the aforementioned behavior is expected? 🤔
1
I'm not so familiar with Meltano codebase. While producing in my local machine and exploring the codebase, I came across this part
Copy code
def _install_plugins_fn(
    ctx: click.Context,
    _param,
    value: AutoInstallBehavior | None,
) -> InstallPlugins:
    if value is None:
        project: Project | None = ctx.obj["project"]
        auto_install = project and project.settings.get("auto_install")
        behavior = (
            AutoInstallBehavior.install
            if auto_install # false
            else AutoInstallBehavior.no_install
        )
    else:
        behavior = value

    # If no value flag given, it tries to get "auto_install_behaviour"
    # but I failed to see any part assigning the value
    # behavior = install, though it was no_install before
    behavior = value or ctx.obj.get(
        "auto_install_behaviour",
        AutoInstallBehavior.install,
    )
    if behavior == AutoInstallBehavior.no_install:
        return async_noop
    if behavior == AutoInstallBehavior.only_install:
        return _install_plugins_and_exit

    return install_plugins
r
k
Awesome, thank you 😍
❤️ 1