Replies: 3 comments 4 replies
-
This is specific idea only for database plugins ? Or is it for any plugin . I do think we need better documentation of what plugions are available and what each plugin do and possibly some categorization. But possibly having a page like https://docs.pytest.org/en/latest/reference/plugin_list.html would be a good first step. |
Beta Was this translation helpful? Give feedback.
-
For database plugins btw, I've been thinking that we probably can make it easier to create a new db plugin and remove duplication across different plugins - #1444 If we have vdk-databese "base" plugin , then we can include some db connector discoverability logic there. |
Beta Was this translation helpful? Give feedback.
-
Hello, folks,
I want to gather ideas or proposals for capabilities of a potential
vdk-connectors
plugin, dedicated tohelp users to discover the VDK database connectors currently available.
I am thinking of configurable
{"repo1": "dir", "repo2": "dir"}
, set by default to{"https://github.com/vmware/versatile-data-kit": "projects/vdk-plugins"}
Then, (1) the plugin will dynamically fetch and scan recursively the directory, common to:
git ls-files --directory projects/vdk-plugins
Next step (2) is to parse the files and look for:
ManagedConnectionBase
implementationcontext.connections.add_open_connection_factory_method()
connection registration that wires the implementationdbtype
param ofcontext.connections.add_open_connection_factory_method()
for the name of the database registeredFor example:
class ImpalaConnection(ManagedConnectionBase)
in vdk-impala/.../impala_connection.pycontext.connections.add_open_connection_factory_method("IMPALA", ...)
in vdk-impala/.../impala_plugin.pyThat would be sufficient to identify if a plugin registers in
vdk-core
a new database connection with a particular name.Next step (3) is to parse the directories of connectors identified, looking for
@click.command
provided,to output the user each available connector's VDK CLI commands.
For example in vdk-impala/.../impala_plugin.py:
For more information, check out the VEP-1418 specification draft #1419
Beta Was this translation helpful? Give feedback.
All reactions