Skip to content

Commit 334b16e

Browse files
committed
Merge remote-tracking branch 'origin/main' into renameable-time-field
2 parents 922c8c3 + a1c5f7c commit 334b16e

File tree

20 files changed

+275
-349
lines changed

20 files changed

+275
-349
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
### Checklist
66
- [ ] Formatted code using `cargo fmt --all`
7-
- [ ] Linted code using clippy
8-
- [ ] with reqwest feature: `cargo clippy --manifest-path influxdb/Cargo.toml --all-targets --no-default-features --features serde,derive,reqwest-client-rustls -- -D warnings`
9-
- [ ] with surf feature: `cargo clippy --manifest-path influxdb/Cargo.toml --all-targets --no-default-features --features serde,derive,hyper-client -- -D warnings`
7+
- [ ] Linted code using clippy with reqwest feature: `cargo clippy --manifest-path influxdb/Cargo.toml --all-targets --no-default-features --features chrono,time,serde,derive,reqwest-client-rustls -- -D warnings`
108
- [ ] Updated README.md using `cargo doc2readme -p influxdb --expand-macros`
119
- [ ] Reviewed the diff. Did you leave any print statements or unnecessary comments?
1210
- [ ] Any unfinished work that warrants a separate issue captured in an issue with a TODO code comment

.github/workflows/rust.yml

Lines changed: 52 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: README Format Check
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616
- uses: docker://codeberg.org/msrd0/cargo-doc2readme:nightly
1717
with:
1818
entrypoint: cargo
@@ -23,41 +23,27 @@ jobs:
2323
name: Style Check (clippy)
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v4
27-
- uses: dtolnay/rust-toolchain@1.75.0
26+
- uses: actions/checkout@v5
27+
- uses: dtolnay/rust-toolchain@1.88.0
2828
with:
2929
components: clippy
30+
- name: Update Cargo.lock
31+
run: cargo --config 'resolver.incompatible-rust-versions="fallback"' update
3032
- name: Check Clippy lints (reqwest)
31-
run: cargo clippy --manifest-path influxdb/Cargo.toml --all-targets --no-default-features --features serde,derive,reqwest-client-rustls -- -D warnings
32-
- name: Check Clippy lints (surf)
33-
run: cargo clippy --manifest-path influxdb/Cargo.toml --all-targets --no-default-features --features serde,derive,hyper-client -- -D warnings
33+
run: cargo clippy --manifest-path influxdb/Cargo.toml --locked --all-targets --no-default-features --features chrono,time,serde,derive,reqwest-client-rustls -- -D warnings
3434

3535
# this checks that the code is formatted with rustfmt
3636
rustfmt:
3737
name: Style Checks (rustfmt)
3838
runs-on: ubuntu-latest
3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v5
4141
- uses: dtolnay/rust-toolchain@nightly
4242
with:
4343
components: rustfmt
4444
- name: Check code formatting
4545
run: cargo fmt --all -- --check
4646

47-
# this checks the msrv
48-
msrv:
49-
name: Verify MSRV
50-
runs-on: ubuntu-latest
51-
steps:
52-
- uses: actions/checkout@v4
53-
- uses: baptiste0928/cargo-install@v3
54-
with:
55-
crate: cargo-msrv
56-
- name: Verify minimum rust version of influxdb crate
57-
run: cargo msrv --path influxdb --output-format json verify
58-
- name: Verify minimum rust version of influxdb_derive crate
59-
run: cargo msrv --path influxdb_derive --output-format json verify
60-
6147
# this tests that all unit and doc tests are successful
6248
unit_tests:
6349
name: Unit and Doc Tests (Rust ${{matrix.rust.name}} on ${{matrix.os}})
@@ -77,21 +63,51 @@ jobs:
7763
toolchain: nightly
7864
nightly: true
7965
os: [ubuntu-latest, windows-latest, macOS-latest]
66+
include:
67+
- rust:
68+
name: MSRV
69+
toolchain: stable
70+
nightly: false
71+
os: ubuntu-latest
8072
steps:
81-
- uses: actions/checkout@v4
73+
- uses: actions/checkout@v5
8274
- uses: dtolnay/rust-toolchain@master
8375
with:
8476
toolchain: ${{matrix.rust.toolchain}}
8577
id: rust-toolchain
78+
- run: cargo --config 'resolver.incompatible-rust-versions="fallback"' update
79+
# on msrv runs, downgrade rust after generating the Cargo.lock file
80+
- run: sudo apt -y update && sudo apt -y install --no-install-recommends yq
81+
if: matrix.rust.name == 'MSRV'
82+
- run: echo "rust-version=$(tomlq -r '.workspace.package."rust-version"' Cargo.toml)" >>$GITHUB_OUTPUT
83+
id: msrv
84+
if: matrix.rust.name == 'MSRV'
85+
- uses: dtolnay/rust-toolchain@master
86+
with:
87+
toolchain: ${{steps.msrv.outputs.rust-version}}
88+
id: msrv-toolchain
89+
if: matrix.rust.name == 'MSRV'
90+
# on non-msrv runs, use one cache key ...
91+
- uses: actions/cache@v4
92+
with:
93+
path: |
94+
~/.cargo/git
95+
~/.cargo/registry
96+
target
97+
key: "${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}"
98+
if: matrix.rust.name != 'MSRV'
99+
# ... and on msrv runs, use another
86100
- uses: actions/cache@v4
87101
with:
88102
path: |
89103
~/.cargo/git
90104
~/.cargo/registry
91105
target
92-
key: "${{matrix.rust.toolchain}} on ${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}"
93-
- run: cargo test --lib
94-
- run: cargo test --doc
106+
key: "${{runner.os}} Rust ${{steps.msrv-toolchain.outputs.cachekey}}"
107+
if: matrix.rust.name == 'MSRV'
108+
# finally we can run tests
109+
- run: cargo test --lib --locked --features 'chrono time serde derive'
110+
- run: cargo test --doc --locked --features 'chrono time serde derive'
95111

96112
# this tests that all integration tests are successful
97113
integration_tests:
@@ -106,10 +122,6 @@ jobs:
106122
toolchain: stable
107123
nightly: false
108124
http-backend:
109-
- curl-client
110-
- h1-client
111-
- h1-client-rustls
112-
- hyper-client
113125
- reqwest-client-rustls
114126
- reqwest-client-native-tls
115127
- reqwest-client-native-tls-vendored
@@ -140,7 +152,7 @@ jobs:
140152
DOCKER_INFLUXDB_INIT_BUCKET: mydb
141153
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: admintoken
142154
steps:
143-
- uses: actions/checkout@v4
155+
- uses: actions/checkout@v5
144156
- uses: dtolnay/rust-toolchain@master
145157
with:
146158
toolchain: ${{matrix.rust.toolchain}}
@@ -154,10 +166,12 @@ jobs:
154166
key: "${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}"
155167
- name: Run tests
156168
run: |
157-
for test in integration_tests{,_v2}
158-
do
159-
cargo test -p influxdb --no-default-features --features 'serde derive ${{matrix.http-backend}}' --no-fail-fast --test $test
160-
done
169+
cargo test -p influxdb \
170+
--no-default-features \
171+
--features "serde derive chrono time ${{matrix.http-backend}}" \
172+
--no-fail-fast \
173+
--test integration_tests \
174+
--test integration_tests_v2
161175
162176
# this uses cargo-tarpaulin to inspect the code coverage
163177
coverage:
@@ -180,7 +194,7 @@ jobs:
180194
INFLUXDB_USER_PASSWORD: password
181195

182196
steps:
183-
- uses: actions/checkout@v4
197+
- uses: actions/checkout@v5
184198
- uses: dtolnay/rust-toolchain@stable
185199
id: rust-toolchain
186200
- name: Get Tarpaulin Version
@@ -203,7 +217,7 @@ jobs:
203217
cargo tarpaulin -v \
204218
--target-dir target/tarpaulin \
205219
--workspace \
206-
--features serde,derive \
220+
--features chrono,time,serde,derive \
207221
--exclude-files 'derive/*' \
208222
--exclude-files 'target/*' \
209223
--ignore-panics --ignore-tests \
@@ -225,10 +239,10 @@ jobs:
225239
- coverage
226240
if: github.ref == 'refs/heads/main'
227241
steps:
228-
- uses: actions/checkout@v4
242+
- uses: actions/checkout@v5
229243
with:
230244
ref: gh-pages
231-
- uses: actions/download-artifact@v4
245+
- uses: actions/download-artifact@v5
232246
with:
233247
name: tarpaulin-report
234248
- run: |

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Removed
11+
- `<dyn Query>::raw_read_query`, deprecated in 0.5.0, was removed
12+
1013
## [0.7.2] - 2024-02-14
1114

1215
### Fixed

Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
[workspace]
44
members = ["influxdb", "influxdb_derive", "benches"]
5+
resolver = "2"
6+
7+
[workspace.package]
8+
authors = ["Gero Gerke <[email protected]>", "Dominic <[email protected]>"]
9+
edition = "2021"
10+
rust-version = "1.67.1"
11+
license = "MIT"
12+
repository = "https://github.com/influxdb-rs/influxdb-rust"
13+
14+
[workspace.lints.rust]
15+
bare_trait_objects = "forbid"
16+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin)', 'cfg(tarpaulin_include)'] }
17+
18+
[workspace.lints.clippy]
19+
multiple_bound_locations = "allow" # clippy has wrong opinions
20+
needless_doctest_main = "allow"
21+
needless_lifetimes = "allow" # False positive in client/mod.rs query fn
522

623
[patch.crates-io]
724
influxdb = { path = "./influxdb" }

README.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<a href="https://www.rust-lang.org/en-US/">
2626
<img src="https://img.shields.io/badge/Made%20with-Rust-orange.svg" alt='Build with Rust' />
2727
</a>
28-
<a href="https://blog.rust-lang.org/2022/11/03/Rust-1.67.0.html">
29-
<img src="https://img.shields.io/badge/rustc-1.67+-yellow.svg" alt='Minimum Rust Version: 1.67' />
28+
<a href="https://github.com/rust-lang/rust/releases/tag/{{ rust_version | urlencode }}">
29+
<img src="https://img.shields.io/badge/rustc-{{ rust_version | urlencode }}+-yellow.svg" alt='Minimum Rust Version: {{ rust_version }}' />
3030
</a>
3131
</p>
3232

0 commit comments

Comments
 (0)