chore(deps): refresh workspace deps and linux fs_type gating (#3030)

* chore(deps): refresh workspace deps and linux fs_type gating

- refresh workspace dependency pins and lockfile updates

- remove now-unused crate dependency entries in multiple Cargo.toml files

- enable profiling export defaults in config and scripts/run.sh

- gate os::fs_type module/function/tests to Linux to avoid non-Linux dead_code warnings

* fix(utils): simplify fs_type linux gating

- keep fs_type module-level linux cfg in os::mod

- remove redundant linux cfg on get_fs_type and test module

* chore(deps): bump s3s git revision

- update workspace s3s dependency to rev 507e1312b211c3ddc214b03875d6fabd15d22ed5

- refresh Cargo.lock source entry for s3s

* chore(dev): allow mysql_async git source and env overrides

- allow mysql_async git source in deny.toml allow-git list

- make scripts/run.sh core env vars overrideable via existing shell env

* fix(utils): import get_fs_type in fs_type tests

- add explicit super::get_fs_type import in fs_type test module

- fix Linux E0425 unresolved function errors in unit tests

* chore(dev): tune run script observability defaults

- make profiling export env overrideable in scripts/run.sh

- set RUSTFS_OBS_SAMPLE_RATIO default from 2.0 to 1.0

- update allow-git review window comments in deny.toml

* test(obs): stabilize profiling env alias tests
This commit is contained in:
houseme
2026-05-20 23:03:07 +08:00
committed by GitHub
parent b2dfdf85de
commit dcbffb084f
15 changed files with 166 additions and 124 deletions
-1
View File
@@ -30,7 +30,6 @@ rustfs-targets = { workspace = true }
rustfs-config = { workspace = true, features = ["audit", "constants"] }
rustfs-ecstore = { workspace = true }
rustfs-s3-types = { workspace = true }
rustfs-s3-ops = { workspace = true }
chrono = { workspace = true }
const-str = { workspace = true }
futures = { workspace = true }
+2 -2
View File
@@ -299,9 +299,9 @@ pub const DEFAULT_OBS_LOGS_EXPORT_ENABLED: bool = true;
/// Default profiling export enabled
/// It is used to enable or disable exporting profiles
/// Default value: false
/// Default value: true
/// Environment variable: RUSTFS_OBS_PROFILING_EXPORT_ENABLED
pub const DEFAULT_OBS_PROFILING_EXPORT_ENABLED: bool = false;
pub const DEFAULT_OBS_PROFILING_EXPORT_ENABLED: bool = true;
/// Default log local logging enabled for rustfs
/// This is the default log local logging enabled for rustfs.
-1
View File
@@ -31,7 +31,6 @@ sftp = []
[dependencies]
rustfs-config = { workspace = true, features = ["constants"] }
rustfs-ecstore.workspace = true
rustfs-common.workspace = true
rustfs-data-usage.workspace = true
rustfs-rio.workspace = true
flatbuffers.workspace = true
-1
View File
@@ -46,7 +46,6 @@ rustfs-policy.workspace = true
rustfs-protos.workspace = true
rustfs-kms.workspace = true
rustfs-s3-types = { workspace = true }
rustfs-s3-ops = { workspace = true }
rustfs-data-usage.workspace = true
rustfs-object-capacity.workspace = true
async-trait.workspace = true
+31 -12
View File
@@ -54,6 +54,8 @@ use rustfs_utils::{
};
use serde::{Deserialize, Serialize};
use std::env;
#[cfg(test)]
use std::sync::{Mutex, OnceLock};
const LEGACY_ENV_OBS_PROFILING_ENABLED: &str = "RUSTFS_OBS_PROFILING_ENABLED";
@@ -429,32 +431,49 @@ pub fn is_production_environment() -> bool {
mod tests {
use super::*;
static PROFILING_ENV_TEST_LOCK: OnceLock<Mutex<()>> = OnceLock::new();
fn with_profiling_env_lock<F>(f: F)
where
F: FnOnce(),
{
let _guard = PROFILING_ENV_TEST_LOCK.get_or_init(|| Mutex::new(())).lock().unwrap();
f();
}
fn extract_profiling_export_enabled() -> Option<bool> {
OtelConfig::extract_otel_config_from_env(None).profiling_export_enabled
}
#[test]
fn profiling_export_defaults_to_disabled_when_unset() {
temp_env::with_var_unset(ENV_OBS_PROFILING_EXPORT_ENABLED, || {
temp_env::with_var_unset(LEGACY_ENV_OBS_PROFILING_ENABLED, || {
let config = OtelConfig::extract_otel_config_from_env(None);
assert_eq!(config.profiling_export_enabled, Some(false));
with_profiling_env_lock(|| {
temp_env::with_var_unset(ENV_OBS_PROFILING_EXPORT_ENABLED, || {
temp_env::with_var_unset(LEGACY_ENV_OBS_PROFILING_ENABLED, || {
assert_eq!(extract_profiling_export_enabled(), Some(DEFAULT_OBS_PROFILING_EXPORT_ENABLED));
});
});
});
}
#[test]
fn profiling_export_accepts_legacy_env_alias() {
temp_env::with_var_unset(ENV_OBS_PROFILING_EXPORT_ENABLED, || {
temp_env::with_var(LEGACY_ENV_OBS_PROFILING_ENABLED, Some("true"), || {
let config = OtelConfig::extract_otel_config_from_env(None);
assert_eq!(config.profiling_export_enabled, Some(true));
with_profiling_env_lock(|| {
temp_env::with_var_unset(ENV_OBS_PROFILING_EXPORT_ENABLED, || {
temp_env::with_var(LEGACY_ENV_OBS_PROFILING_ENABLED, Some("true"), || {
assert_eq!(extract_profiling_export_enabled(), Some(true));
});
});
});
}
#[test]
fn canonical_profiling_toggle_has_priority_over_legacy_alias() {
temp_env::with_var(LEGACY_ENV_OBS_PROFILING_ENABLED, Some("true"), || {
temp_env::with_var(ENV_OBS_PROFILING_EXPORT_ENABLED, Some("false"), || {
let config = OtelConfig::extract_otel_config_from_env(None);
assert_eq!(config.profiling_export_enabled, Some(false));
with_profiling_env_lock(|| {
temp_env::with_var(LEGACY_ENV_OBS_PROFILING_ENABLED, Some("true"), || {
temp_env::with_var(ENV_OBS_PROFILING_EXPORT_ENABLED, Some("false"), || {
assert_eq!(extract_profiling_export_enabled(), Some(false));
});
});
});
}
-1
View File
@@ -42,7 +42,6 @@ tokio-util.workspace = true
faster-hex.workspace = true
futures.workspace = true
rustfs-config = { workspace = true, features = ["constants"] }
rustfs-common.workspace = true
rustfs-io-metrics.workspace = true
rustfs-utils = { workspace = true, features = ["io", "hash", "compress", "tls"] }
serde_json.workspace = true
-1
View File
@@ -42,7 +42,6 @@ async-trait = { workspace = true }
futures = { workspace = true }
time = { workspace = true }
chrono = { workspace = true }
path-clean = { workspace = true }
rmp-serde = { workspace = true }
rustfs-filemeta = { workspace = true }
tokio-util = { workspace = true }
-1
View File
@@ -16,7 +16,6 @@ rustfs-config = { workspace = true, features = ["notify", "constants", "audit"]
rustfs-ecstore = { workspace = true }
rustfs-utils = { workspace = true, features = ["notify", "tls"] }
rustfs-s3-types = { workspace = true }
rustfs-s3-ops = { workspace = true }
async-trait = { workspace = true }
async-nats = { workspace = true }
deadpool-postgres = { workspace = true }
+1 -1
View File
@@ -43,7 +43,7 @@ pub(crate) fn get_fs_type(fs_type: u64) -> &'static str {
#[cfg(test)]
mod tests {
use super::*;
use super::get_fs_type;
#[test]
fn map_common_linux_filesystem_magic_numbers() {
+1
View File
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#[cfg(target_os = "linux")]
mod fs_type;
#[cfg(target_os = "linux")]