Base branch for a persistence plugin

As I mentioned in this post I started to develop an add-on to support InfluxDB 2.0.
I started making a copy of @dominikkv work in https://github.com/dominikkv/openhab2-addons/tree/influxdb-neo with a new name and make a big refactor and changes to adapt to the new and incompatible InfluxDB2 API.

I’ve looked at original @dominikkv PR and it has been canceled by @Kai suggesting to make it again against this branch.
Should I use that branch also? By now I have a first version of the plugin, it’s not yet finished and I’ve some doubts about external dependencies, integration tests, but I want to expose it for public discussion in a preliminary stage to see if it can be accepted and what I’ve to change before more work is done.

Thanks, @lujop, for your work! I’m happy that there are other people developing for InfluxDB. One question, is this binding able to handle InfluxDB 1.x AND 2.0? Or is this only 2.0?

@Kai, I’m also a bit confused in how to contribute. I have tried to make a PR against your branch, but the time I did this your branch was waaay behind the official trunk. As OpenHAB 2.5 is now released, what is the best way to contribute?

Hi @lujop and @dominikkv,

We are still in the process of sorting things out for the further development after the 2.5 release (see e.g. here), so please forgive us that there is some confusion for such things right now.

One of my main priorities is to finish https://github.com/openhab/openhab-addons/pull/5275 right now (just working on it today, mainly clean up missing and syncing latest changes from openhab1-addons that happened since I created the PR) - this is now based on the latest repo master. So yes: Either you create a PR against my branch, if you cannot wait any longer. Or you wait until this is merged and then you can easily create PRs against the official repo.

Hi @dominikkv,

My intention was to manage only 2.0 because client APIs and libraries are incompatible.
But as I separated the code to make it more modular and extracted major InfluxDB interaction in a Repository class it will be possible to improve a little the interfaces and make two implementations and share common parts.
The major risk I see by now can be if there are some incompatible dependencies between InfluxDB client versions that can coexist. But I haven’t checked I don’t know if it can be the case.

I’ve uploaded it to this branch from @Kai persist branch. Take a look and if you like it we can try to make it support both versions.
You can look my work in this commit

Hi @Kai
I’ve paused development on the plugin from my last message.
But I want to try to work again on it and I’ve seen that your PR isn’t still integrated.
Is there any estimation?

Hey @lujop, good timing - I have just finished my work on https://github.com/openhab/openhab-addons/pull/5275#issuecomment-598410298 and hope that we can merge it soon. Feel free to already start porting your work against that branch so that you can create follow-up PRs as soon as mine is merged.

Thanks @Kai.
I will try to do as you said.

As this is my first addon/contribution to OpenHab I’ve several doubts about it:

  • About the more correct way to create bundle dependencies
  • Integration testing

What’s the best way to address, open a message in the forum for each question, make the PR and iterate the work there?

Finally, I migrated the code to a new branch using OH 3.0 in https://github.com/lujop/openhab-addons/tree/influxdb2 and made some minimal testing to check it works.

As I’ve seen that dependencies in other plugins were all embedded in the bundle I’ve done the same.
I will try to do some automated tests, documentation, and do a PR when I see that @Kai one is integrated and my work more polished.

1 Like

Finally created a PR for the addon https://github.com/openhab/openhab-addons/pull/7235

3 Likes