Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Support meltano test for taps #8112

Open
edgarrmondragon opened this issue Sep 6, 2023 · 0 comments
Open

feature: Support meltano test for taps #8112

edgarrmondragon opened this issue Sep 6, 2023 · 0 comments

Comments

@edgarrmondragon
Copy link
Collaborator

Feature scope

CLI (options, error messages, logging, etc.)

Description

Problem

The meltano test CLI uses plugin commands to run tests for one or more plugins. However It's not working great at the moment for taps because Meltano doesn't know that it also needs to pass other options, like --config, so it fails if config is required.

Proposal

  • Add a new boolean pass_plugin_args field to the Command object.
  • Update PluginInvoker.exec_args to call self.plugin.exec_args, if command_config.pass_plugin_args is true.

if command:
command_config = self.find_command(command)
plugin_args = command_config.expanded_args(command, env)
if command_config.executable:
executable = self.exec_path(command_config.executable)
else:
plugin_args = self.plugin.exec_args(self)

This will allow Meltano to call tap-example --config ... --test under the hood.

With that, the following config

plugins:
  extractors:
  - name: tap-stackexchange
    variant: meltanolabs
    pip_url: git+https://github.com/MeltanoLabs/tap-stackexchange.git
    commands:
      test:
        pass_plugin_args: true
        args: --test

should allow meltano test tap-stackexchange to work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant