Skip to content

BREAKING CHANGE: Create a Sender or SenderBuilder from configuration or env var (#54) #54

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

Merged
merged 98 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
a65b2e1
stub for config changes
amunra Feb 9, 2024
28f6e09
refactoring
amunra Feb 9, 2024
0ee00ea
more config stubbing
amunra Feb 10, 2024
592f811
Merge remote-tracking branch 'origin/main' into conf-str-settings
amunra Feb 10, 2024
2fcf0d1
cargo fmt
amunra Feb 10, 2024
32c8a58
Remove redundant HttpHandlerState.grace_timeout
mtopolnik Feb 11, 2024
f58b402
Rename constructor to new_tcp
mtopolnik Feb 11, 2024
319c921
Add and use new_http constructor
mtopolnik Feb 11, 2024
5aa51fb
Make SenderBuilder.http optional
mtopolnik Feb 11, 2024
28f0d5e
Break long lines
mtopolnik Feb 11, 2024
3ba0177
Move internal function after public ones
mtopolnik Feb 11, 2024
2bc60ca
Move default HTTP config to impl of Default
mtopolnik Feb 11, 2024
1c96164
Consistently use Self
mtopolnik Feb 11, 2024
3bb888d
Fallible config functions
mtopolnik Feb 11, 2024
c520b39
Sender::from_conf and ::from_env
mtopolnik Feb 11, 2024
1522918
SenderBuilder.connect() -> .build()
mtopolnik Feb 11, 2024
a382c8d
SenderBuilder.connect() -> .build()
mtopolnik Feb 11, 2024
c9626e5
Adapt docstrings to changes
mtopolnik Feb 12, 2024
f01816a
Validate config params
mtopolnik Feb 12, 2024
d79fc75
Unwrap ConfigSetting in error message
mtopolnik Feb 12, 2024
9d585c0
Undo new_tcp() and new_http()
mtopolnik Feb 12, 2024
4969473
ConfigSettings::new_default() and new_specified()
mtopolnik Feb 12, 2024
624910b
Add a few tests
mtopolnik Feb 12, 2024
0cab00e
Use ConfigSetting in Http
mtopolnik Feb 12, 2024
d435232
ConfigSetting returns Result instead of bool
mtopolnik Feb 12, 2024
ccc7a10
Process auth params in from_conf()
mtopolnik Feb 12, 2024
03f6d19
Rename err_config() -> config_err()
mtopolnik Feb 12, 2024
0613e74
Improve comments
mtopolnik Feb 12, 2024
f5c69c6
Remove redundant validation check
mtopolnik Feb 12, 2024
f84a2d6
Improve tests
mtopolnik Feb 12, 2024
e73cf2f
More tests
mtopolnik Feb 13, 2024
b83a46a
Support all TLS config params
mtopolnik Feb 13, 2024
df3bb2d
Support auto_flush=off
mtopolnik Feb 13, 2024
3d9805d
Handle HTTP Config
mtopolnik Feb 13, 2024
a46b205
Correct feature gating
mtopolnik Feb 13, 2024
24e3c48
Cleanup
mtopolnik Feb 13, 2024
87a8f13
Extract and reorder functions
mtopolnik Feb 13, 2024
254cec9
Report unrecognized parameters
mtopolnik Feb 13, 2024
68c9f29
Cleanup
mtopolnik Feb 13, 2024
65264cf
Hint with unrecognized params when param missing
mtopolnik Feb 14, 2024
8318c9e
Add TODO comments
mtopolnik Feb 14, 2024
518f627
Propagate CertificateAuthority::File change
mtopolnik Feb 14, 2024
23595de
Propagate connect->build renaming
mtopolnik Feb 14, 2024
e14e7fa
Ensure correct protocol is selected
mtopolnik Feb 14, 2024
0890288
Remove unused set_default
mtopolnik Feb 14, 2024
c41ca3e
Protocol-specific params specify protocol
mtopolnik Feb 14, 2024
499f30d
Extract tests to separate file
mtopolnik Feb 16, 2024
ed736ce
Fix docstrings
mtopolnik Feb 16, 2024
1ee0bad
Fix CPP test that wanted to change specified value
mtopolnik Feb 16, 2024
ffcfdd8
Make ConfigSetting::Specified idempotent
mtopolnik Feb 16, 2024
fc0679a
SenderBuilder::new -> new_tcp, new_http. Pinning protocol.
amunra Feb 20, 2024
cb64e75
cargo fmt
amunra Feb 20, 2024
24b6aec
fixed cargo test without --all-features
amunra Feb 20, 2024
7a0bacc
matched auth parameters to config key names for consistency
amunra Feb 20, 2024
239103d
Tweaks to auto-flush conf str parsing validation
amunra Feb 21, 2024
33834bf
reworked handling of http params
amunra Feb 21, 2024
e9102a2
supported all remaining config settings, apart from TLS
amunra Feb 21, 2024
584e1e1
tls configurable via conf strs
amunra Feb 22, 2024
b5ba591
doc tweak
amunra Feb 22, 2024
482f938
progress with questdb-rs-ffi
amunra Feb 22, 2024
a41d826
removed tls_roots_password
amunra Feb 23, 2024
8d3bd9f
updated FFI
amunra Feb 23, 2024
227e54d
questdb-rs-ffi progress
amunra Feb 23, 2024
943c657
Optionally exposed questdb-confstr-ffi from questdb-rs-ffi via confst…
amunra Feb 23, 2024
7ad0399
progress with the C++ API
amunra Feb 23, 2024
32ae8d9
More C++ API progress, C API tweaks
amunra Feb 23, 2024
1551473
C example fixes
amunra Feb 26, 2024
4bb40d2
Made tcp_new and http_new SenderBuilder APIs infallible.
amunra Feb 26, 2024
38a0db3
More C++ API changes, fixed tests
amunra Feb 26, 2024
18aaf75
questdb-rs-ffi 'cargo fmt'
amunra Feb 26, 2024
5f5d4d4
fixing python-based tests
amunra Feb 26, 2024
0e1858a
Rust doc test fix
amunra Feb 26, 2024
f6f3625
text fix and redundant import removal
amunra Feb 27, 2024
31aed08
py test improvements
amunra Feb 27, 2024
1417b26
from_env examples
amunra Feb 27, 2024
112483e
C++ test improvements
amunra Feb 27, 2024
a8f327a
extra ILP/TCP for last remaining open issue
amunra Feb 27, 2024
212a0d7
renamed grace_timeout -> request_timeout; renamed min_throughput -> r…
amunra Feb 27, 2024
80fbe43
Rust API doc improvements
amunra Feb 27, 2024
eaf9d0a
cargo fmt
amunra Feb 27, 2024
05f9637
increased system test timeout for slow windows CI
amunra Feb 27, 2024
0664e56
allowing for slow Windows CI boxes
amunra Feb 28, 2024
62d15c1
minor doc tweaks
amunra Feb 28, 2024
f43913e
slow CI, longer timeouts
amunra Feb 28, 2024
e26c03e
renamed user -> username; pass -> password;
amunra Feb 29, 2024
5bda270
fixed request_timeout default from 5 to 10 seconds
amunra Feb 29, 2024
0979fdf
consistent API for Rust, C and C++ (and evenutually Python)
amunra Mar 1, 2024
aa39839
fixed py system test resource leak
amunra Mar 5, 2024
9606e9e
allowed overriding of user_agent
amunra Mar 5, 2024
6512b91
user agent changes
amunra Mar 5, 2024
6fa9793
Attempting to fix master startup issue
amunra Mar 6, 2024
11f7945
test speedup tweak when running on fast hardware
amunra Mar 8, 2024
7477c5c
Added C, C++ and Rust 'from_conf' examples and wired up manifest
amunra Mar 11, 2024
e1ed09c
init_capacity -> init_buf_size rename
amunra Mar 11, 2024
78e3ead
self code review feeback fixes
amunra Mar 11, 2024
19aeb7d
test cleanup
amunra Mar 11, 2024
1225ce3
Fixed/improved documentation
mtopolnik Mar 11, 2024
f1fe229
fixed div by zero error
amunra Mar 11, 2024
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
4 changes: 4 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ replace = questdb-rs/{new_version}/
[bumpversion:file:questdb-rs-ffi/Cargo.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:include/questdb/ingress/line_sender.hpp]
search = questdb/c++/{current_version}
replace = questdb/c++/{new_version}
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,30 @@ endfunction()
if (QUESTDB_TESTS_AND_EXAMPLES)
compile_example(
line_sender_c_example
examples/concat.c
examples/line_sender_c_example.c)
compile_example(
line_sender_c_example_auth
examples/concat.c
examples/line_sender_c_example_auth.c)
compile_example(
line_sender_c_example_tls_ca
examples/concat.c
examples/line_sender_c_example_tls_ca.c)
compile_example(
line_sender_c_example_auth_tls
examples/concat.c
examples/line_sender_c_example_auth_tls.c)
compile_example(
line_sender_c_example_http
examples/concat.c
examples/line_sender_c_example_http.c)
compile_example(
line_sender_c_example_from_conf
examples/line_sender_c_example_from_conf.c)
compile_example(
line_sender_c_example_from_env
examples/line_sender_c_example_from_env.c)
compile_example(
line_sender_cpp_example
examples/line_sender_cpp_example.cpp)
Expand All @@ -118,6 +129,12 @@ if (QUESTDB_TESTS_AND_EXAMPLES)
compile_example(
line_sender_cpp_example_http
examples/line_sender_cpp_example_http.cpp)
compile_example(
line_sender_cpp_example_from_conf
examples/line_sender_cpp_example_from_conf.cpp)
compile_example(
line_sender_cpp_example_from_env
examples/line_sender_cpp_example_from_env.cpp)

# Include Rust tests as part of the tests run
add_test(
Expand Down
2 changes: 1 addition & 1 deletion cbindgen.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ header = """/*******************************************************************
* \\__\\_\\\\__,_|\\___||___/\\__|____/|____/
*
* Copyright (c) 2014-2019 Appsicle
* Copyright (c) 2019-2023 QuestDB
* Copyright (c) 2019-2024 QuestDB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ci/run_all_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main():
test_line_sender_path = next(iter(
build_dir.glob(f'**/test_line_sender{exe_suffix}')))
system_test_path = pathlib.Path('system_test') / 'test.py'
qdb_v = '7.3.9' # The version of QuestDB we'll test against.
qdb_v = '7.3.10' # The version of QuestDB we'll test against.

run_cmd('cargo', 'test', '--', '--nocapture', cwd='questdb-rs')
run_cmd('cargo', 'test', '--all-features', '--', '--nocapture', cwd='questdb-rs')
Expand Down
2 changes: 1 addition & 1 deletion cpp_test/build_env.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* \__\_\\__,_|\___||___/\__|____/|____/
*
* Copyright (c) 2014-2019 Appsicle
* Copyright (c) 2019-2023 QuestDB
* Copyright (c) 2019-2024 QuestDB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion cpp_test/mock_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* \__\_\\__,_|\___||___/\__|____/|____/
*
* Copyright (c) 2014-2019 Appsicle
* Copyright (c) 2019-2023 QuestDB
* Copyright (c) 2019-2024 QuestDB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion cpp_test/mock_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* \__\_\\__,_|\___||___/\__|____/|____/
*
* Copyright (c) 2014-2019 Appsicle
* Copyright (c) 2019-2023 QuestDB
* Copyright (c) 2019-2024 QuestDB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading