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: bump to redis 0.24.0 #89

Merged
merged 1 commit into from
Feb 16, 2024
Merged

chore: bump to redis 0.24.0 #89

merged 1 commit into from
Feb 16, 2024

Conversation

Zacaria
Copy link
Contributor

@Zacaria Zacaria commented Dec 12, 2023

Hi !

I'm naively proposing to bump to redis crate 0.24.0

But I know it contains breaking changes : https://github.com/redis-rs/redis-rs/releases/tag/redis-0.24.0

Would you like to also bump here ?

@garrensmith
Copy link
Collaborator

@Zacaria I'll take a look. Does the mobc-redis build and if you tested it did you see anything breaking?

@Zacaria
Copy link
Contributor Author

Zacaria commented Dec 12, 2023

On my mac :
cargo build : ok
cargo test : ok
cargo test --features tokio: ok
cargo test --features unstable: ok
cargo test --all-features : ko, but I believe it comes from my environment

Result logs
warning: unused import: `tracing::instrument::WithSubscriber`
 --> src/spawn.rs:2:5
  |
2 | use tracing::instrument::WithSubscriber;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `tracing::Dispatch`
 --> src/spawn.rs:3:5
  |
3 | use tracing::Dispatch;
  |     ^^^^^^^^^^^^^^^^^

warning: unused variable: `task`
 --> src/spawn.rs:6:17
  |
6 | pub fn spawn<T>(task: T)
  |                 ^^^^ help: if this is intentional, prefix it with an underscore: `_task`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: missing documentation for a struct
   --> src/runtime.rs:105:5
    |
105 |     pub struct TaskExecutor;
    |     ^^^^^^^^^^^^^^^^^^^^^^^
    |
note: the lint level is defined here
   --> src/lib.rs:80:9
    |
80  | #![warn(missing_docs)]
    |         ^^^^^^^^^^^^

warning: missing documentation for a method
   --> src/runtime.rs:108:9
    |
108 | /         pub fn spawn<F>(&self, future: F)
109 | |         where
110 | |             F: Future + Send + 'static,
111 | |             F::Output: Send + 'static,
    | |______________________________________^

warning: missing documentation for a struct
   --> src/runtime.rs:117:5
    |
117 |     pub struct Runtime(TaskExecutor);
    |     ^^^^^^^^^^^^^^^^^^

warning: missing documentation for an associated function
   --> src/runtime.rs:120:9
    |
120 |         pub fn new() -> Option<Self> {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: missing documentation for a method
   --> src/runtime.rs:124:9
    |
124 |         pub fn handle(&self) -> &TaskExecutor {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: missing documentation for a method
   --> src/runtime.rs:128:9
    |
128 | /         pub fn block_on<F, T>(&mut self, future: F) -> T
129 | |         where
130 | |             F: Future<Output = T>,
    | |__________________________________^

warning: missing documentation for a method
   --> src/runtime.rs:135:9
    |
135 | /         pub fn spawn<F, T>(&self, future: F)
136 | |         where
137 | |             F: Future<Output = T> + Send + 'static,
138 | |             T: Send + 'static,
    | |______________________________^

warning: missing documentation for a struct
   --> src/runtime.rs:145:5
    |
145 |     pub struct DefaultExecutor;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: missing documentation for an associated function
   --> src/runtime.rs:148:9
    |
148 |         pub fn current() -> Self {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^

warning: `mobc` (lib) generated 12 warnings (run `cargo fix --lib -p mobc` to apply 3 suggestions)
warning: use of deprecated method `actix_web::App::<T>::data`: Use `.app_data(Data::new(val))` instead.
  --> examples/actix-web.rs:19:14
   |
19 |             .data(pool.clone())
   |              ^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: unused import: `join_all`
 --> tests/mobc.rs:2:20
  |
2 |     future::{join, join_all, ready, FutureExt},
  |                    ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `mobc` (example "actix-web") generated 1 warning
warning: `mobc` (lib test) generated 3 warnings (3 duplicates)
warning: `mobc` (test "mobc") generated 1 warning (run `cargo fix --test "mobc"` to apply 1 suggestion)
    Finished test [unoptimized + debuginfo] target(s) in 0.74s
     Running unittests src/lib.rs (target/debug/deps/mobc-ff56cfcb6a1beff4)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/mobc.rs (target/debug/deps/mobc-86cdaadb3f9ac2ac)

running 28 tests
test test_is_send_sync ... ok
test test_lazy_initialization_failure ... ok
test test_conns_drop_on_pool_drop ... ok
test test_max_open_ok ... ok
test test_max_idle_greater_than_max_open ... FAILED
test test_get_timeout ... FAILED
test test_health_check_interval ... FAILED
test test_max_idle_and_max_open_unlimited ... FAILED
test test_max_idle_limited_max_open_unlimited ... FAILED
test test_get_global_timeout ... ok
test test_drop_on_checkin ... ok
test test_min_idle ... FAILED
test test_drop_on_checkout ... FAILED
test test_set_conn_max_lifetime ... FAILED
test test_max_idle_lifetime ... FAILED
test test_set_max_idle_conns ... FAILED
test test_set_max_open_conns ... FAILED
test test_timeout_when_db_has_gone ... ok
test test_timeout_when_db_has_gone2 ... ok
test test_max_lifetime_lazy ... FAILED
test test_acquire_release ... FAILED
test test_is_brand_new ... FAILED
test test_invalid_conn_recovery ... FAILED
test test_requests_skip_canceled ... FAILED
test test_requests_fifo ... FAILED
test test_invalid_conn ... FAILED
test test_unwraps_raw_conn ... FAILED
test test_idle_timeout_partial_use ... FAILED

failures:

---- test_max_idle_greater_than_max_open stdout ----
With 5 connections in use: State {
    max_open: 5,
    connections: 5,
    in_use: 5,
    idle: 0,
    wait_count: 0,
    wait_duration: 64.336µs,
    max_idle_closed: 0,
    max_lifetime_closed: 0,
}
After dropping all connections: State {
    max_open: 5,
    connections: 5,
    in_use: 5,
    idle: 0,
    wait_count: 0,
    wait_duration: 64.336µs,
    max_idle_closed: 0,
    max_lifetime_closed: 0,
}
thread 'test_max_idle_greater_than_max_open' panicked at tests/mobc.rs:1060:13:
assertion `left == right` failed
  left: 0
 right: 5

---- test_get_timeout stdout ----
thread 'test_get_timeout' panicked at tests/mobc.rs:170:9:
assertion failed: succeeds_delayed.is_ok()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- test_health_check_interval stdout ----
thread 'test_health_check_interval' panicked at tests/mobc.rs:328:9:
assertion failed: !DROPPED.load(Ordering::SeqCst)

---- test_max_idle_and_max_open_unlimited stdout ----
Pool configured for max_open == 0; taking 5 conns
Pool state: State {
    max_open: 0,
    connections: 5,
    in_use: 5,
    idle: 0,
    wait_count: 0,
    wait_duration: 63.233µs,
    max_idle_closed: 0,
    max_lifetime_closed: 0,
}
thread 'test_max_idle_and_max_open_unlimited' panicked at tests/mobc.rs:874:5:
assertion `left == right` failed
  left: 1
 right: 5

---- test_max_idle_limited_max_open_unlimited stdout ----
Pool configured for max_open == 0; taking 6 conns
Pool state: State {
    max_open: 0,
    connections: 6,
    in_use: 6,
    idle: 0,
    wait_count: 0,
    wait_duration: 83.014µs,
    max_idle_closed: 0,
    max_lifetime_closed: 0,
}
thread 'test_max_idle_limited_max_open_unlimited' panicked at tests/mobc.rs:874:5:
assertion `left == right` failed
  left: 1
 right: 6

---- test_min_idle stdout ----
thread 'test_min_idle' panicked at tests/mobc.rs:829:9:
assertion `left == right` failed
  left: 2
 right: 0

---- test_drop_on_checkout stdout ----
thread 'test_drop_on_checkout' panicked at tests/mobc.rs:229:9:
assertion failed: !DROPPED.load(Ordering::SeqCst)

---- test_set_conn_max_lifetime stdout ----
thread 'test_set_conn_max_lifetime' panicked at tests/mobc.rs:637:37:
called `Result::unwrap()` on an `Err` value: Timeout

---- test_max_idle_lifetime stdout ----
thread 'test_max_idle_lifetime' panicked at tests/mobc.rs:703:37:
called `Result::unwrap()` on an `Err` value: Timeout

---- test_set_max_idle_conns stdout ----
thread 'test_set_max_idle_conns' panicked at tests/mobc.rs:801:9:
assertion `left == right` failed
  left: 2
 right: 0

---- test_set_max_open_conns stdout ----
thread 'test_set_max_open_conns' panicked at tests/mobc.rs:747:9:
assertion `left == right` failed
  left: 2
 right: 0

---- test_max_lifetime_lazy stdout ----
thread 'test_max_lifetime_lazy' panicked at tests/mobc.rs:572:37:
called `Result::unwrap()` on an `Err` value: Timeout

---- test_acquire_release stdout ----
thread 'test_acquire_release' panicked at tests/mobc.rs:118:43:
called `Option::unwrap()` on a `None` value

---- test_is_brand_new stdout ----
thread 'test_is_brand_new' panicked at tests/mobc.rs:1135:42:
called `Option::unwrap()` on a `None` value

---- test_invalid_conn_recovery stdout ----
thread 'test_invalid_conn_recovery' panicked at tests/mobc.rs:419:9:
assertion failed: pool.get().await.is_ok()

---- test_requests_skip_canceled stdout ----
thread 'test_requests_skip_canceled' panicked at tests/mobc.rs:1329:9:
assertion failed: third.await.is_ok()

---- test_requests_fifo stdout ----
thread 'test_requests_fifo' panicked at tests/mobc.rs:1294:13:
assertion failed: conn.is_ok()

---- test_invalid_conn stdout ----
thread 'test_invalid_conn' panicked at tests/mobc.rs:377:9:
assertion failed: pool.get().await.is_ok()

---- test_unwraps_raw_conn stdout ----
thread 'test_unwraps_raw_conn' panicked at tests/mobc.rs:1184:26:
called `Result::unwrap()` on an `Err` value: Timeout

---- test_idle_timeout_partial_use stdout ----
thread 'test_idle_timeout_partial_use' panicked at tests/mobc.rs:514:30:
called `Result::unwrap()` on an `Err` value: Timeout


failures:
    test_acquire_release
    test_drop_on_checkout
    test_get_timeout
    test_health_check_interval
    test_idle_timeout_partial_use
    test_invalid_conn
    test_invalid_conn_recovery
    test_is_brand_new
    test_max_idle_and_max_open_unlimited
    test_max_idle_greater_than_max_open
    test_max_idle_lifetime
    test_max_idle_limited_max_open_unlimited
    test_max_lifetime_lazy
    test_min_idle
    test_requests_fifo
    test_requests_skip_canceled
    test_set_conn_max_lifetime
    test_set_max_idle_conns
    test_set_max_open_conns
    test_unwraps_raw_conn

test result: FAILED. 8 passed; 20 failed; 0 ignored; 0 measured; 0 filtered out; finished in 31.52s

error: test failed, to rerun pass `--test mobc`

Do you have an idea ?

@garrensmith
Copy link
Collaborator

Do you get the same results off of the main branch?

@Zacaria
Copy link
Contributor Author

Zacaria commented Dec 12, 2023

Yes I confirm that

Would you like me to submit an other PR to automate those checks on github directly ?

@garrensmith garrensmith merged commit 5702717 into importcjj:main Feb 16, 2024
1 check passed
@garrensmith
Copy link
Collaborator

Awesome thanks for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants