Commit Graph

79 Commits (2a658ec0ab2b0cdb5bbb93d1c54d4dccbf9f2e6a)

Author SHA1 Message Date
dependabot[bot] bc6bf2d8e5
chore(deps): Bump smallvec from 1.10.0 to 1.11.0 (#8164)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 09:43:27 +00:00
Phil Bracikowski 8afa2f473d
fix(lp parser): adjust parsing tagsets: better error message and error on corner case (#7997)
* fix(lp parser): improves the error message when parsing tagsets

A tagset is an optional list of (tag_key=tag_value) that start
immediatelly after the measurement. The tagset and measurement are
separated by a comma. If that comma is present, at least one tag=value
pair must be present.

This pr expresses that must relationship and provides a Tag Set
Malformed erorr now if there's something wrong with the tag set.

The input test case is added which is missing the tag value - I'd like
to improve the errors to be more specific still, but one case at a time.

* fixes #7772

* chore: add test case

This commit adds a test case for a comma after the measurement but no
tagset thereafter. This is also an error condition. Before this PR this
was accepted as an empty tagset, but the spec and the canonical golang
parser do not permit this.
2023-06-16 15:16:11 +00:00
dependabot[bot] 19b0fbc81c
chore(deps): Bump log from 0.4.18 to 0.4.19 (#7966)
Bumps [log](https://github.com/rust-lang/log) from 0.4.18 to 0.4.19.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.18...0.4.19)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 08:38:44 +00:00
dependabot[bot] edbecd53af
chore(deps): Bump log from 0.4.17 to 0.4.18 (#7884)
Bumps [log](https://github.com/rust-lang/log) from 0.4.17 to 0.4.18.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.17...0.4.18)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dom <dom@itsallbroken.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-29 09:17:08 +00:00
Dom Dwyer 928a4d163e
build: remove unused dependencies from crates
This commit fixes loads of crates (47!) had unused dependencies, or
mis-configured dependencies (test deps as normal deps).

I added the "unused_crate_dependencies" to all crates to help prevent
this mess from growing again!

    https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint_defs/builtin/static.UNUSED_CRATE_DEPENDENCIES.html

This has the minor downside of false-positives when specifying
dev-dependencies for test/bench binaries - these are files in /test or
/benches (not normal tests). This commit includes a workaround,
importing them in lib.rs (gated by a feature flag). I think the
trade-off of better dependency management is worth it!
2023-05-23 14:55:43 +02:00
wiedld a4ad4fe69e
fix(4895): handle measurement missing, null bytes, and `=` in measurement names (#7759)
* test: add tests for the desired contract for parsing measurements from line protocol
* fix: restrict null chars in measurement
* chore: make an explicit Measurement type
* refactor: have iox lp parser match influxdb contract, for acceptance of eq in measurements
* test: create end_to_end test to confirm same write-then-read behavior with `=` in measurements, is the same as influxdb
2023-05-16 10:48:39 -07:00
Andrew Lamb 28cb56767c
fix: Rename crate `influxdb_line_protocol` to `influxdb-line-protocol` (#7244)
* fix: Rename crate `influxdb_line_protocol` to `influxdb-line-protocol`

* fix: hakari config

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-17 13:19:50 +00:00
Andrew Lamb f2cda34a61
chore(influxdb_line_protocol): add description to cargo metadata (#7243) 2023-03-16 18:27:27 +00:00
Andrew Lamb 43167fe585
chore(influxdb_line_protocol): Prepare `influxdb_line_protocol` for crates.io release (#7195)
* chore(influxdb_line_protocol): Remove ffi feature

* chore(influxdb_line_protocol): Remove workspace dependencies

* docs(influxdb_line_protocol): add initial readme and release instructions

* chore: Run cargo hakari tasks

* chore: Exclude influxdb_line_protocol from hakari checks and the workspace hack features

* feat: Add a link to nom in the docs

* docs: Copy edit documentation and comments

* fix: Mark the line protocol Error as non-exhaustive

So that we can easily add more error variants in the future.

* fix: Remove some functions from the public API

* fix: Make split_lines pub again

Oops, we're actually depending on this being pub in other parts of IOx
🙈

* docs: Add doc comments so everything on the crate docs page has a description

* chore: Add homepage, readme and repo links

* fix: use cargo-rdme

* chore: Add comment to hakari.toml

* chore: Increase version to `1.0.0`

* fix: fix LineProtocolBuilder link

---------

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-16 17:55:10 +00:00
Carol (Nichols || Goulding) cc7c44f76a
chore: Upgrade to Rust 1.68 (#7175)
* chore: Upgrade to Rust 1.68

* fix: Remove unnecessary into_iter, thanks Clippy!

* fix: Use the size of the type, not a reference to the type... oops.

Thanks clippy!

* fix: Return block directly instead of creating a variable

Thanks clippy!

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 13:22:20 +00:00
Carol (Nichols || Goulding) faae5eb438 chore: Rerun cargo hakari manage-deps 2023-02-27 11:56:15 +01:00
Carol (Nichols || Goulding) 30fea67701
fix: Move variables within format strings. Thanks clippy!
Changes made automatically using `cargo clippy --fix`.
2023-02-03 13:06:17 -05:00
dependabot[bot] d0e6b16450
chore(deps): Bump bytes from 1.3.0 to 1.4.0
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: bytes
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 00:30:56 +00:00
dependabot[bot] 04c00bbb62
chore(deps): Bump bytes from 1.2.1 to 1.3.0 (#6199)
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/commits)

---
updated-dependencies:
- dependency-name: bytes
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-22 08:23:24 +00:00
Carol (Nichols || Goulding) 2e83e04eab
feat: Use workspace package metadata to reduce differences and repetition 2022-10-24 13:04:09 -04:00
dependabot[bot] 3ff48152c9
chore(deps): Bump smallvec from 1.9.0 to 1.10.0
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 01:56:00 +00:00
Andrew Lamb 82d5c7f336
feat: support parallel, chunked upload via `influxdb_iox write` of line protocol, gzip'd line protocol, and parquet (#5757)
* feat: Upload in small chunks and in parallel

* fix: doclink

* fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

* fix: Update influxdb_iox_client/src/client/write.rs

* fix: fixup error handling and fmt

* fix: Make default chunk sizes the same and add docs

* fix: clippy

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2022-09-30 21:02:38 +00:00
Dom Dwyer cd4087e00d style: add no todo!() or dbg!() lints
Some crates had theme, some not - lets be consistent and have the
compiler spot dbg!() and todo!() macro calls - they should never be in
prod code!
2022-09-29 13:10:07 +02:00
Andrew Lamb 65f1550126
feat: Implement `debug parquet_to_lp` command to convert parquet to line protocol (#5734)
* feat: add `influxdb_iox debug parquet_to_lp` command

* chore: Run cargo hakari tasks

* fix: update command description

* fix: remove unecessary Result import

* fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2022-09-26 14:17:27 +00:00
Carol (Nichols || Goulding) 3a501a4a10
fix: Remove an immediate ref to a deref
Caught by clippy now. https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
2022-08-11 15:04:14 -04:00
Marko Mikulicic a4e2f880be
feat: Expose a C API for the IOx LP parser (#5267)
Can be useful to call the IOx LP parser from other processes, for example from Go.
I used it to run an online comparison of IOx and influxdb Go LP parser in order to identify compatibility
issues.
2022-08-02 15:44:41 +00:00
Andrew Lamb 9c9658ca38
test(influxdb_line_protocol): add value verification test (#5270) 2022-08-02 11:18:09 +00:00
Marko Mikulicic 84a856069b fix: Scientific notation without + or -
Closes #5264
2022-08-02 05:46:28 +02:00
Marko Mikulicic a926996485 fix: Negative scientific notation without decimal parts
Closes #5263
2022-08-02 05:40:55 +02:00
Marko Mikulicic de22b6b080
test: Add a test for LP quoting (#5210)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-07-26 20:08:37 +00:00
Marko Mikulicic c5451afa08
feat: Implement LP builder (#5183)
Helps with https://github.com/influxdata/influxrpc_compare/issues/179

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-07-22 14:41:10 +00:00
Carol (Nichols || Goulding) 03aa338897
fix: Remove unnecessary String allocations found by clippy 2022-07-01 13:31:32 -04:00
dependabot[bot] d1e3b009c9
chore(deps): Bump smallvec from 1.8.1 to 1.9.0 (#4991)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-30 09:25:20 +00:00
dependabot[bot] 7546476e15
chore(deps): Bump smallvec from 1.8.0 to 1.8.1 (#4947)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-27 07:17:32 +00:00
Dom Dwyer 71da70e6fe test: cover all string field types
Adds tests that cover EscapedStr::SingleSlice in addition to the
existing EscapedStr::CopiedValue variants. Remove 1 space from assert.
2022-04-25 11:28:52 +01:00
Dom Dwyer 680742103a refactor: use std::mem::discriminant 2022-04-22 17:37:25 +01:00
Dom Dwyer cf200e509e fix: handle LP lines with duplicated fields/tags
This commit allows the LP consumer to correctly handle line protocol
writes that duplicate one or more fields or tags within a single line:

           table v=2,bananas=42,v=3,platanos=24
                  ▲              ▲
                  └───────┬──────┘
                          │
                 duplicate field "v"

This change implements the following logic when processing fields:

    IF field is duplicated
        IF all duplicate field values are of the same data type
            use last occurrence ("last write wins")
        ELSE
            return an error

Any duplication of tags is rejected, and use of a field name as both a
field and a tag is remains forbidden (unchanged in this PR, a previously
agreed breaking change from TSM).

See https://github.com/influxdata/influxdb_iox/issues/4326 for context.
2022-04-22 14:40:51 +01:00
Marco Neumann 33851be3a5
chore: upgrade Rust to 1.59 (#3875)
Mostly a few new clippy crates around `flat_map`, `and_then`, and
"underscore locks" (!!!):
https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_lock

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-28 15:14:19 +00:00
Marco Neumann f3f6f335a9
chore: upgrade to snafu 0.7 (#3440) 2022-01-11 19:22:36 +00:00
Carol (Nichols || Goulding) d1db5ec4d3
feat: Enable the union feature of smallvec
This feature was only recently added (it only works in Rust 1.49) and
potentially reduces the size of smallvecs. Doesn't seem like it could
hurt.

https://docs.rs/smallvec/1.7.0/smallvec/#union
2021-12-06 09:37:15 -05:00
Carol (Nichols || Goulding) 1b0a2eb7c7
fix: Specify nom features in the same way cexpr does
This removes nom from the workspace-hack crate. I'm not sure what's
going on here as cexpr is setting default-features false but then
explicitly setting the features to be the same as nom's default
features, and cargo-hakari seems to be resolving that differently than
using nom's default features. I think this might be a bug in
cargo-hakari, going to investigate.

Connects to #3117.
2021-12-06 09:37:14 -05:00
Carol (Nichols || Goulding) 9fd4a560f5
feat: Results of running cargo hakari manage-deps 2021-11-19 09:21:57 -05:00
Marco Neumann bc7244c48e chore: use Rust edition 2021 2021-10-25 10:58:20 +02:00
Raphael Taylor-Davies a647865e1a
revert: "build: pin smallvec" (#2740)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-05 19:23:00 +00:00
Dom 5abc55406d build: pin smallvec
Pin the smallvec version until the rest of the ecosystem catches up.

Fixes https://github.com/influxdata/influxdb_iox/issues/2735.
2021-10-05 16:27:00 +02:00
dependabot[bot] 8893b483a3
chore(deps): bump smallvec from 1.6.1 to 1.7.0
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.6.1...v1.7.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 07:57:00 +00:00
dependabot[bot] 25feda6b1a
chore(deps): bump nom from 6.1.2 to 7.0.0
Bumps [nom](https://github.com/Geal/nom) from 6.1.2 to 7.0.0.
- [Release notes](https://github.com/Geal/nom/releases)
- [Changelog](https://github.com/Geal/nom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Geal/nom/compare/6.1.2...7.0.0)

---
updated-dependencies:
- dependency-name: nom
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 07:21:10 +00:00
Marco Neumann 368f0369ee chore: Rust 1.55 2021-09-10 12:36:49 +02:00
Nga Tran 1effb11ad9 refactor: move delete parseing work out of influxdb_line_protocol crate 2021-09-09 15:27:17 -04:00
Nga Tran b4f8fad400 refactor: address review comments and remove uno longer needed dependencies 2021-09-09 14:24:58 -04:00
Nga Tran 00df7b064c feat: finally have the delete predicate parsed 2021-09-08 17:30:10 -04:00
Nga Tran 9ee1bdeeb9 refactor: address review comments 2021-09-07 10:24:38 -04:00
Nga Tran 9de3b79a90 refactor: more cleanup 2021-09-06 01:45:47 -04:00
Nga Tran de0bd80c3d refactor: cleanup 2021-09-06 01:07:07 -04:00
Nga Tran 4801b2c238 feat: Have the ParseDelete message and its corresponding ProvidedParseDelete struct ready for building delete parser 2021-09-06 00:13:59 -04:00