feat: allow n/u for precision in v1/v2 write apis (#25742)
Prior to this change we would deny writes that used n and u for the precision argument when doing writes. We only accepted ns and us for those apis. However, to be backwards compatible we would need to enable accepting writes with n and u. This is mostly just upgrading our deps as this was a change that landed in IOx first. We test that it works for our code by adding test cases for their precision in this repo.pull/25752/head
parent
ccda3dd3a9
commit
d78756f02f
File diff suppressed because it is too large
Load Diff
62
Cargo.toml
62
Cargo.toml
|
@ -124,37 +124,37 @@ uuid = { version = "1", features = ["v4"] }
|
|||
num = { version = "0.4.3" }
|
||||
|
||||
# Core.git crates we depend on
|
||||
arrow_util = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
authz = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
clap_blocks = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
data_types = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
datafusion_util = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
executor = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
influxdb-line-protocol = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64", features = ["v3"]}
|
||||
influxdb_influxql_parser = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
influxdb_iox_client = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
iox_catalog = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
iox_http = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
iox_query = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
iox_query_params = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
iox_query_influxql = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
iox_system_tables = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
iox_time = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
metric = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
metric_exporters = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
observability_deps = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
panic_logging = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
parquet_file = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
schema = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64", features = ["v3"] }
|
||||
service_common = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
service_grpc_flight = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
test_helpers = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
tokio_metrics_bridge = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
trace = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
trace_exporters = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
trace_http = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
tracker = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
trogging = { git = "https://github.com/influxdata/influxdb3_core", rev = "db48a4f721086ffdb65b8c6b5d7d1bcbf61b5c64" }
|
||||
arrow_util = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
authz = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
clap_blocks = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
data_types = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
datafusion_util = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
executor = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
influxdb-line-protocol = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715", features = ["v3"]}
|
||||
influxdb_influxql_parser = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
influxdb_iox_client = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
iox_catalog = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
iox_http = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
iox_query = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
iox_query_params = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
iox_query_influxql = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
iox_system_tables = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
iox_time = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
metric = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
metric_exporters = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
observability_deps = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
panic_logging = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
parquet_file = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
schema = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715", features = ["v3"] }
|
||||
service_common = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
service_grpc_flight = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
test_helpers = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
tokio_metrics_bridge = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
trace = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
trace_exporters = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
trace_http = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
tracker = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
trogging = { git = "https://github.com/influxdata/influxdb3_core", rev = "a5f6076c966f4940a67998e0b85d12c3e8596715" }
|
||||
|
||||
[workspace.lints.rust]
|
||||
missing_copy_implementations = "deny"
|
||||
|
|
|
@ -44,12 +44,24 @@ async fn api_v1_write_request_parsing() {
|
|||
rp: None,
|
||||
expected: StatusCode::NO_CONTENT,
|
||||
},
|
||||
TestCase {
|
||||
db: Some("foo"),
|
||||
precision: Some("u"),
|
||||
rp: Some("autogen"),
|
||||
expected: StatusCode::NO_CONTENT,
|
||||
},
|
||||
TestCase {
|
||||
db: Some("foo"),
|
||||
precision: Some("us"),
|
||||
rp: None,
|
||||
expected: StatusCode::NO_CONTENT,
|
||||
},
|
||||
TestCase {
|
||||
db: Some("foo"),
|
||||
precision: Some("n"),
|
||||
rp: Some("autogen"),
|
||||
expected: StatusCode::NO_CONTENT,
|
||||
},
|
||||
TestCase {
|
||||
db: Some("foo"),
|
||||
precision: Some("ns"),
|
||||
|
@ -200,6 +212,18 @@ async fn api_v2_write_request_parsing() {
|
|||
precision: Some("us"),
|
||||
expected: StatusCode::NO_CONTENT,
|
||||
},
|
||||
TestCase {
|
||||
org: None,
|
||||
bucket: Some("foo"),
|
||||
precision: Some("u"),
|
||||
expected: StatusCode::NO_CONTENT,
|
||||
},
|
||||
TestCase {
|
||||
org: None,
|
||||
bucket: Some("foo"),
|
||||
precision: Some("n"),
|
||||
expected: StatusCode::NO_CONTENT,
|
||||
},
|
||||
TestCase {
|
||||
org: None,
|
||||
bucket: Some("foo"),
|
||||
|
|
Loading…
Reference in New Issue