legrego / homeassistant-elasticsearch

Publish Home-Assistant events to Elasticsearch
https://legrego.github.io/homeassistant-elasticsearch/
MIT License
149 stars 37 forks source link

Discuss: Contribute component to home-assistant #47

Open legrego opened 5 years ago

legrego commented 5 years ago

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.

ksonney commented 4 years ago

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

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.

IATkachenko commented 2 years ago

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.

strawgate commented 7 months ago

I'd like to pursue the changes necessary to contribute this to Home Assistant.

I think we should officially support whatever Elastic supports i.e. the latest minor on each supported major. Today that would be just 7.17.x and 8.13.x.

I think we should best-effort support the currently supported majors which would have us supporting 7.x and 8.x. I'll look to see why we don't support pre-7.11, we may just carve out those verisons.

If/when a 9.x comes out, we would add support for 9.x and drop support for 7.x.