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

chore: Sync and release v1.0.1 of influxdb-line-protocol #24527

Merged
merged 3 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion influxdb_line_protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "influxdb-line-protocol"
version = "1.0.0"
version = "1.0.1"
authors = ["InfluxDB IOx Project Developers"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down
6 changes: 3 additions & 3 deletions influxdb_line_protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

This crate contains pure Rust implementations of

1. A [parser](https://docs.rs/influxdb_line_protocol/latest/influxdb_line_protocol/fn.parse_lines.html) for [InfluxDB Line Protocol] developed as part of the
1. A [parser](https://docs.rs/influxdb-line-protocol/latest/influxdb_line_protocol/fn.parse_lines.html) for [InfluxDB Line Protocol] developed as part of the
[InfluxDB IOx] project. This implementation is intended to be
compatible with the [Go implementation], however, this
implementation uses a [nom] combinator-based parser rather than
attempting to port the imperative Go logic so there are likely
some small diferences.
some small differences.

2. A [builder](https://docs.rs/influxdb_line_protocol/latest/influxdb_line_protocol/builder/struct.LineProtocolBuilder.html) to contruct valid [InfluxDB Line Protocol]
2. A [builder](https://docs.rs/influxdb-line-protocol/latest/influxdb_line_protocol/builder/struct.LineProtocolBuilder.html) to construct valid [InfluxDB Line Protocol]

## Example

Expand Down
2 changes: 1 addition & 1 deletion influxdb_line_protocol/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Step 1: Update `README.md` file

Update the `README.md` file (copies the rustdoc comments) using the [`cargo rmde`](https://crates.io/crates/cargo-rdme) tool (install via `cargo install cargo-rdme`):
Update the `README.md` file (copies the rustdoc comments) using the [`cargo rdme`](https://crates.io/crates/cargo-rdme) tool (install via `cargo install cargo-rdme`):

```shell
cargo rdme
Expand Down
16 changes: 16 additions & 0 deletions influxdb_line_protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
//! [Go implementation]: https://github.com/influxdata/influxdb/blob/217eddc87e14a79b01d0c22994fc139f530094a2/models/points_parser.go
//! [InfluxDB IOx]: https://github.com/influxdata/influxdb_iox
//! [nom]: https://crates.io/crates/nom

// Note this crate is published as its own crate on crates.io but kept in this repository for
// maintenance convenience.
//
// Thus this crate can't use workspace lints, so these lint configurations must be here.
#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)]
#![warn(
missing_copy_implementations,
Expand All @@ -66,6 +71,7 @@
clippy::dbg_macro,
unused_crate_dependencies
)]
// DO NOT REMOVE these lint configurations; see note above!

pub mod builder;
pub use builder::LineProtocolBuilder;
Expand Down Expand Up @@ -1175,6 +1181,16 @@ mod test {
}
}

#[test]
fn parse_lines_returns_all_lines_even_when_a_line_errors() {
let input = ",tag1=1,tag2=2 value=1 123\nm,tag1=one,tag2=2 value=1 123";
let vals = super::parse_lines(input).collect::<Vec<Result<_>>>();
assert!(matches!(
&vals[..],
&[Err(Error::MeasurementValueInvalid), Ok(_)]
));
}

#[test]
fn escaped_str_basic() {
// Demonstrate how strings without any escapes are handled.
Expand Down
Loading