Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[influxdb] Implement ModifiablePersistenceService #14959

Merged
merged 2 commits into from
May 13, 2023

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented May 9, 2023

See title. This will be needed to store forecasts or retrospectivly added data.

@J-N-K J-N-K added the enhancement An enhancement or new feature for an existing add-on label May 9, 2023
@J-N-K J-N-K requested a review from lujop as a code owner May 9, 2023 19:02
@jlaur
Copy link
Contributor

jlaur commented May 9, 2023

This will replace #12935.

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A few minor comments from my side. @florian-h05 - do you want to have a look also? I don't use InfluxDB myself. @J-N-K - since you are testing this already, would it be possible to verify #14806 also so we could get that merged?

Comment on lines +159 to +162
OffsetDateTime start = Objects.requireNonNullElse(filter.getBeginDate(), ZonedDateTime.now().minusYears(100))
.toOffsetDateTime();
OffsetDateTime stop = Objects.requireNonNullElse(filter.getEndDate(), ZonedDateTime.now().plusYears(100))
.toOffsetDateTime();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason for using now +/- 100 years rather than OffsetDateTime.MIN/OffsetDateTime.MAX, for example? I should add that I don't know the internals of InfluxDB and the used API.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a very good question. I just kept it the same way it is done for missing start/end dates in other queries.

@J-N-K J-N-K force-pushed the influx-modifieable branch from 6216596 to f65f5b6 Compare May 12, 2023 13:32
@J-N-K
Copy link
Member Author

J-N-K commented May 13, 2023

@jlaur I think I addressed all your comments.

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlaur jlaur merged commit 717adde into openhab:main May 13, 2023
@jlaur jlaur added this to the 4.0 milestone May 13, 2023
@J-N-K J-N-K deleted the influx-modifieable branch May 13, 2023 10:38
@jlaur jlaur linked an issue May 18, 2023 that may be closed by this pull request
tb4jc pushed a commit to tb4jc/openhab-addons that referenced this pull request Jun 19, 2023
* [influxdb] Implement ModifiablePersistenceService

Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Thomas Burri <[email protected]>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Aug 9, 2023
* [influxdb] Implement ModifiablePersistenceService

Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Matt Myers <[email protected]>
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
* [influxdb] Implement ModifiablePersistenceService

Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jørgen Austvik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[influxdb] Support ModifiablePersistenceService
2 participants