connectors
connectors copied to clipboard
[CLI] Clarifying the config file when using the CLI tool
A couple of feedback on the CLI tool/documentation (part of this feedback is more of a documentation
suggestion, but there's not a docs
label when creating the new issue here):
- The
./bin/connectors login
does not support passing in SSL parameters to specify the CA cert. It's unclear what users need to do in order to connect with a HTTPS enabled Elasticsearch cluster. If the answer is for users to use-c
to pass in their ownconfig.yml
file with the Elasticsearch connection settings (along with the SSL ones), it will be helpful to clarify in the docs. - Running
./connectors connector --help
returns:
$ ./connectors connector --help
Traceback (most recent call last):
File "/Users/<user>/Downloads/connectors-main/bin/./connectors", line 33, in <module>
sys.exit(load_entry_point('elasticsearch-connectors', 'console_scripts', 'connectors')())
File "/Users/<user>/Downloads/connectors-main/connectors/connectors_cli.py", line 590, in main
cli()
File "/Users/<user>/Downloads/connectors-main/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/Users/<user>/Downloads/connectors-main/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/Users/<user>/Downloads/connectors-main/lib/python3.10/site-packages/click/core.py", line 1685, in invoke
super().invoke(ctx)
File "/Users/<user>/Downloads/connectors-main/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/<user>/Downloads/connectors-main/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/<user>/Downloads/connectors-main/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/<user>/Downloads/connectors-main/connectors/connectors_cli.py", line 58, in cli
ctx.obj["config"] = load_config(ctx, config)
File "/Users/<user>/Downloads/connectors-main/connectors/connectors_cli.py", line 43, in load_config
raise FileNotFoundError(msg)
FileNotFoundError: .cli/config.yml is not found
It's unclear what users need to do here, will they have to manually create the .cli/config.yml
file first? A better error message may be to tell the user to use -c
parameter and their own config.yml
.
- When we talk about
-c <config-file-path.yml>
, it can be helpful to add some context on whichconfig.yml
we are referring to, since there's a mention of.cli/config.yml
as well. Is this the ../config.yml at the root level of the downloaded repository? If so, any considerations on what needs to be specified in the config.yml to use with the CLI tool? (e.g. minimum set of settings like ES connection settings in order for the CLI to work, etc..)