From 0d884da723c282b0b411b661a46076c8f818ea0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:12:31 +1200 Subject: [PATCH] Update sysinfo requirement from 0.30.5 to 0.31.2 (#261) * Update sysinfo requirement from 0.30.5 to 0.31.2 Updates the requirements on [sysinfo](https://github.com/GuillaumeGomez/sysinfo) to permit the latest version. - [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md) - [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.5...v0.31.2) --- updated-dependencies: - dependency-name: sysinfo dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Update changelog Signed-off-by: dependabot[bot] * Fix compile error Signed-off-by: Thomas Farr * Fix codecov Signed-off-by: Thomas Farr --------- Signed-off-by: dependabot[bot] Signed-off-by: Thomas Farr Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Thomas Farr (cherry picked from commit 50f09b535ae7ddafd28d9be95521a4e071d8da5f) --- .github/workflows/test.yml | 6 +++--- CHANGELOG.md | 2 +- opensearch/Cargo.toml | 2 +- opensearch/examples/cat_indices.rs | 4 +++- opensearch/src/root/bulk.rs | 4 +++- opensearch/tests/common/client.rs | 7 ++++++- yaml_test_runner/Cargo.toml | 2 +- yaml_test_runner/tests/common/client.rs | 6 +++--- 8 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ecb3b90f..1bf6cd03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,7 +43,7 @@ jobs: OPENSEARCH_URL: ${{ steps.opensearch.outputs.opensearch_url }} - name: Upload Coverage Data - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./test_results/opensearch.lcov flags: unit @@ -87,7 +87,7 @@ jobs: env: OPENSEARCH_URL: ${{ steps.opensearch.outputs.opensearch_url }} - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: files: ./client/test_results/opensearch.lcov flags: integration @@ -171,7 +171,7 @@ jobs: env: OPENSEARCH_URL: ${{ steps.opensearch.outputs.url }} - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: files: ./client/test_results/opensearch.lcov flags: integration diff --git a/CHANGELOG.md b/CHANGELOG.md index 6381934b..6e3e022e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `aws-*` dependencies to `1` ([#219](https://github.com/opensearch-project/opensearch-rs/pull/219)) - Bumps `itertools` from 0.11.0 to 0.13.0 - Bumps `hyper` from 0.14 to 1 in tests ([#221](https://github.com/opensearch-project/opensearch-rs/pull/221)) -- Bumps `sysinfo` from 0.29.0 to 0.30.5 +- Bumps `sysinfo` from 0.29.0 to 0.31.2 - Bumps `base64` from 0.21 to 0.22 - Bumps `reqwest` from 0.11 to 0.12 - Bumps `simple_logger` from 4.0.0 to 5.0.0 diff --git a/opensearch/Cargo.toml b/opensearch/Cargo.toml index 80822382..1fa60f0a 100644 --- a/opensearch/Cargo.toml +++ b/opensearch/Cargo.toml @@ -55,7 +55,7 @@ futures = "0.3.1" http-body-util = "0.1.0" hyper = { version = "1", features = ["full"] } hyper-util = { version = "0.1", features = ["full"] } -sysinfo = "0.30.5" +sysinfo = "0.31.2" test-case = "3" textwrap = "0.16" tokio = { version = "1", features = ["full"] } diff --git a/opensearch/examples/cat_indices.rs b/opensearch/examples/cat_indices.rs index b7fd98f4..1fb8335e 100644 --- a/opensearch/examples/cat_indices.rs +++ b/opensearch/examples/cat_indices.rs @@ -28,6 +28,8 @@ * GitHub history for details. */ +use std::ffi::OsStr; + #[cfg(any(feature = "native-tls", feature = "rustls-tls"))] use opensearch::cert::CertificateValidation; use opensearch::{ @@ -68,7 +70,7 @@ fn create_client() -> Result { let system = System::new_with_specifics( RefreshKind::new().with_processes(ProcessRefreshKind::default()), ); - let has_fiddler = system.processes_by_name("Fiddler").next().is_some(); + let has_fiddler = system.processes_by_name(OsStr::new("Fiddler")).next().is_some(); has_fiddler } diff --git a/opensearch/src/root/bulk.rs b/opensearch/src/root/bulk.rs index ddc6bff5..dcca9f6c 100644 --- a/opensearch/src/root/bulk.rs +++ b/opensearch/src/root/bulk.rs @@ -810,7 +810,9 @@ mod tests { .routing("routing"), )?; ops.push(BulkOperation::create("2", CreateDoc { bar: "create" }))?; - ops.push(BulkOperation::create_without_id(CreateDoc { bar: "create" }))?; + ops.push(BulkOperation::create_without_id(CreateDoc { + bar: "create", + }))?; ops.push(BulkOperation::update("3", UpdateDoc { baz: "update" }))?; ops.push(BulkOperation::<()>::delete("4"))?; diff --git a/opensearch/tests/common/client.rs b/opensearch/tests/common/client.rs index c5935cf7..f1c56a1c 100644 --- a/opensearch/tests/common/client.rs +++ b/opensearch/tests/common/client.rs @@ -28,6 +28,8 @@ * GitHub history for details. */ +use std::ffi::OsStr; + #[cfg(any(feature = "native-tls", feature = "rustls-tls"))] use opensearch::cert::CertificateValidation; use opensearch::{ @@ -59,7 +61,10 @@ fn running_proxy() -> bool { let system = System::new_with_specifics( RefreshKind::new().with_processes(ProcessRefreshKind::default()), ); - let has_fiddler = system.processes_by_name("Fiddler").next().is_some(); + let has_fiddler = system + .processes_by_name(OsStr::new("Fiddler")) + .next() + .is_some(); has_fiddler } diff --git a/yaml_test_runner/Cargo.toml b/yaml_test_runner/Cargo.toml index 5713adb5..2233e280 100644 --- a/yaml_test_runner/Cargo.toml +++ b/yaml_test_runner/Cargo.toml @@ -31,7 +31,7 @@ serde_yaml = "0.9" serde_json = { version = "1", features = ["arbitrary_precision"] } simple_logger = "5.0.0" syn = { version = "2.0", features = ["full"] } -sysinfo = "0.30" +sysinfo = "0.31" url = "2.1.1" tar = "0.4" flate2 = "1" diff --git a/yaml_test_runner/tests/common/client.rs b/yaml_test_runner/tests/common/client.rs index 1f837164..d01f4590 100644 --- a/yaml_test_runner/tests/common/client.rs +++ b/yaml_test_runner/tests/common/client.rs @@ -44,7 +44,7 @@ use opensearch::{ Error, OpenSearch, DEFAULT_ADDRESS, }; use serde_json::Value; -use std::ops::Deref; +use std::{ffi::OsStr, ops::Deref}; use url::Url; use crate::assert_response_success; @@ -61,8 +61,8 @@ fn cluster_addr() -> String { /// Determines if Fiddler.exe proxy process is running fn running_proxy() -> bool { let mut system = sysinfo::System::new(); - system.refresh_processes(); - let running = system.processes_by_name("Fiddler").next().is_some(); + system.refresh_processes(sysinfo::ProcessesToUpdate::All); + let running = system.processes_by_name(OsStr::new("Fiddler")).next().is_some(); running }