elastic / connectors

Source code for all Elastic connectors, developed by the Search team at Elastic, and home of our Python connector development framework
https://www.elastic.co/guide/en/enterprise-search/master/index.html
Other
58 stars 116 forks source link

Check ES version compatibility and build flavor on startup #2650

Closed navarone-feekery closed 1 day ago

navarone-feekery commented 1 week ago

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

navarone-feekery commented 4 days ago

@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.