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

fix: createdb failure + implement get_all_entries #4

Closed
wants to merge 24 commits into from

Conversation

Charles-Schleich
Copy link

@Charles-Schleich Charles-Schleich commented May 28, 2024

fix: createdb not functioning due to missing application/json header in request
implement: get_all_entries function of Storage Trait for InfluxDbStorage

Also there are logic + safety + code quality improvements (happy to discuss this) in this PR.
NOTE:
This is using a fork of the influxDB2 library here
Charles-Schleich/influxdb2
I have an open PR to merge my fix into the library on Crates.io
aprimadi/influxdb2#61

If this is blocking release,
then it makes sense to fork the influxdb2 library into the zettascale workspace, and publish a Zettascale maintained version on crates.io

I did not treat this as a refactor, however this could use a minor refactor.
It makes sense for next release.

@Charles-Schleich Charles-Schleich changed the title fix: createdb not functioning due to application/json header in request fix: createdb failure + implement get_all_entries May 29, 2024
v2/src/lib.rs Outdated Show resolved Hide resolved
v2/src/lib.rs Outdated Show resolved Hide resolved
v2/src/lib.rs Outdated
@@ -611,7 +625,7 @@ impl Storage for InfluxDbStorage {
|> filter(fn: (r) => r._measurement == \"{}\")
Copy link

Choose a reason for hiding this comment

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

I think the strict equality won't work in case the queried keyexpr contains * or **.
With InfluxDB v1 the keyexpr is converted to an InfluxQL regular epxression here and this regex is used in the query, instead of the keyexpr.
The same shall be done for v2, using Flux regular expressions in fliter predicate.

Copy link
Author

Choose a reason for hiding this comment

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

I have implemented mapping Key Expressions with Wildcards to regular expressions.
However i've upon testing, ive found running z_get.py, the get() function is called individually with each Key Expr output from get_all

image

@JEnoch
Is there a way to call this such that the get gets called with a wildcard KeyExpr ?

Charles-Schleich and others added 7 commits June 18, 2024 14:28
* build: Sync  with eclipse-zenoh/zenoh@25f06bd from 2024-05-21 (eclipse-zenoh#119)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@3118d31 from 2024-05-28 (eclipse-zenoh#120)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@009f666 from 2024-05-30 (eclipse-zenoh#122)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d574654 from 2024-06-03 (eclipse-zenoh#123)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@c279982 from 2024-06-05 (eclipse-zenoh#124)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@d8e66de from 2024-06-10 (eclipse-zenoh#125)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@9d09742 from 2024-06-11 (eclipse-zenoh#126)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* build: Sync  with eclipse-zenoh/zenoh@ed6c636 from 2024-06-12 (eclipse-zenoh#127)

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Update v1 to use zenoh v1.0.0

* Update V2 to use zenoh v1.0.0

* fmt

* Remove internal zenoh Crates from dependencies

* plugins in Cargo.Toml

* Cleanup

* remove TODO, add comments

* Use New API for deserializing payload

---------

Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
@Charles-Schleich
Copy link
Author

Bumped the influxdb2 version after a new release including the json header fixes:
https://github.com/aprimadi/influxdb2/releases/tag/v0.5.2

@Charles-Schleich
Copy link
Author

Please Refer to this PR.
eclipse-zenoh#162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants