Add a preflight check to confirm the Connector is compatible with the configured ES server.
This check also determines if the server is Serverless or not, and injects that state into the ES config so it can be referenced later without repeated calls to the ES server.
If the server is Serverless, Connectors does not perform the version compatibility check.
See the issue for the version compatibility matrix.
I'm unsure if injecting the elasticsearch.serverless bool into the config is the best approach. If it feels too invasive I'd like to discuss other options (e.g. checking build flavor whenever needed rather than once during preflight check).
Checklists
Pre-Review Checklist
[x] this PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check config.yml.example)
[x] this PR has a meaningful title
[x] this PR links to all relevant github issues that it fixes or partially addresses
[x] if there is no GH issue, please create it. Each PR should have a link to an issue
[x] this PR has a thorough description
[x] Covered the changes with automated tests
[x] Tested the changes locally
[x] Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)
@seanstory @jedrazb thanks for the reviews!
I applied some changes, but also I realised that verify.py from ftests was still referencing the env var so I updated that.
Closes https://github.com/elastic/connectors/issues/2305
Add a preflight check to confirm the Connector is compatible with the configured ES server. This check also determines if the server is Serverless or not, and injects that state into the ES config so it can be referenced later without repeated calls to the ES server. If the server is Serverless, Connectors does not perform the version compatibility check.
See the issue for the version compatibility matrix.
I'm unsure if injecting the
elasticsearch.serverless
bool into the config is the best approach. If it feels too invasive I'd like to discuss other options (e.g. checking build flavor whenever needed rather than once during preflight check).Checklists
Pre-Review Checklist
config.yml.example
)v7.13.2
,v7.14.0
,v8.0.0
)