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: Warn when namespace is not specified for a plugin #8337

Open
haleemur opened this issue Jan 2, 2024 · 4 comments
Open

feature: Warn when namespace is not specified for a plugin #8337

haleemur opened this issue Jan 2, 2024 · 4 comments

Comments

@haleemur
Copy link
Contributor

haleemur commented Jan 2, 2024

Feature scope

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

Description

In the current meltano version, the plugin's property namespace is required. However, when a plugin install fails due to namespace not being specified, an error like the following is shown to the user:

<PluginType> '<PluginName>' is not known to Meltano. Try running `meltano lock --update --all` to ensure your plugins are up to date.

Users trying to update existing projects or trying to add new plugins would likely spend hours trying to figure this out if the error message is not improved.

We faced this error when investigating whether our workloads would continue to work as expected with a new meltano version.

@edgarrmondragon
Copy link
Collaborator

edgarrmondragon commented Jan 3, 2024

Hey @haleemur, thanks for raising!

I think the problem is Meltano uses namespace to identify custom plugins:

if not self.inherit_from and namespace:
# When not explicitly inheriting, a namespace indicates an
# embedded custom plugin definition
self.custom_definition = PluginDefinition(

But otherwise the property is not really required.

That makes me think we may need to:

  1. Update the troubleshooting instruction in
    instruction = (
    "Try running `meltano lock --update --all` to ensure your plugins are "
    "up to date"
    )
    to include something like or add the 'namespace' property to your plugin definition.
  2. Warn when namespace is missing, regardless of the type of plugin
  3. Have a different, clearer, way of identifying custom plugins

Number 1 and 2 are probably the easiest.

@haleemur
Copy link
Contributor Author

haleemur commented Jan 3, 2024

Thanks @edgarrmondragon,

I have a slight preference towards option 1 as its the simplest code change, and will suffice. If the documentation is improved according to #3116, maybe we should also update the warning message to point to it.

Option 2 feels a bit incorrect in the sense that the meltano install command succeeds but the user sees a warning. I think it would just create unnecessary doubt for the end-user. So far, we're assuming that the error message is invoked at the right time, but its text does not direct the user towards all the potential root causes.

Option 3 sounds great, I just don't know yet what it would be.

@haleemur
Copy link
Contributor Author

haleemur commented Jan 3, 2024

On further thought, maybe meltano should test whether namespace is present under the scenarios where it needs to be present (is a custom plugin), and emit specific instructions to the user to help resolve installation issues easily.

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

2 participants