homeassistant-elasticsearch icon indicating copy to clipboard operation
homeassistant-elasticsearch copied to clipboard

Discuss: Contribute component to home-assistant

Open legrego opened this issue 6 years ago • 3 comments

Once we conform to ECS (#46) and cleanup a few other issues, I'm considering offering this component to home-assistant as a first-class component. That would give us broader exposure, and hopefully increased adoption.

If we do that though, I'm wondering how we'll manage support for different versions of the Elastic Stack. If we keep the component here, I can manage different branches for the different target versions of the stack. If we move the component to home-assistant, then we will either:

  1. Need a way to be backwards compatible for a certain number of versions. Unsure what this looks like between majors (6.x vs 7.x vs 8.x), of if that's even possible.
  2. Only support the latest major version - this creates a potential upgrade nightmare for users, as upgrading home-assistant could break this component for them until they upgrade their entire cluster.
  3. Forever only support 6.x. I don't see this as a viable option, as users will want to upgrade their clusters, and not be stuck on a specific major version for eternity.

legrego avatar Jan 24 '19 12:01 legrego

Would it be possible to have a "meta repo" that points to a component for stack versions? For example, something like:

  • Elasticsearch 6.x Component
  • Elasticsearch 7.x Component
  • Elasticsearch 8.x Component

The user can decide which one to install, and you could continue development on the branches. The releases for each would be based on the branch. The CI might be a little interesting to set up, but the end-user experience might be worth it.

ksonney avatar May 05 '20 14:05 ksonney

Version may be selected in options, with different "gateways" inherited from abstract parent class:

__init__py:
@ABC.abstract class
class elastic_connector:
  ...
elastic7.py:
class elastic7_connector(elastic_connector):
  ...

elastic8.py:
class elastic8_connector(elastic_connector):
...

then integration will use connector based on settings.

For the time some version will be marked as deprecated and removed, to reduce cost of support.

IATkachenko avatar Feb 21 '22 18:02 IATkachenko