1 Commits

Author SHA1 Message Date
9661821dbf Update Rust crate schemars to v1
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2025-06-27 00:09:11 +00:00
4 changed files with 15 additions and 54 deletions

View File

@ -4,39 +4,17 @@ type: docker
name: default name: default
steps: steps:
- name: fetch_dependencies - name: cargo_check
image: rust image: rust
volumes:
- name: rust_registry
path: /usr/local/cargo/registry
commands:
- cargo fetch
- name: code_quality
image: rust
volumes:
- name: rust_registry
path: /usr/local/cargo/registry
depends_on:
- fetch_dependencies
commands:
- rustup component add clippy
- cargo clippy -- -D warnings
- name: test
image: rust
depends_on:
- code_quality
volumes:
- name: rust_registry
path: /usr/local/cargo/registry
commands: commands:
- wget -O /usr/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio - wget -O /usr/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio
- wget -O /usr/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc - wget -O /usr/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc
- chmod +x /usr/bin/minio /usr/bin/mc - chmod +x /usr/bin/minio /usr/bin/mc
- rustup component add clippy
- cargo clippy -- -D warnings
- cargo test - cargo test
- name: build_doc - name: doc
image: python image: python
environment: environment:
AWS_ACCESS_KEY_ID: AWS_ACCESS_KEY_ID:
@ -61,7 +39,3 @@ steps:
- aws configure set default.s3.signature_version s3v4 - aws configure set default.s3.signature_version s3v4
# Upload to bucket # Upload to bucket
- cd public && aws --endpoint-url https://s3.communiquons.org s3 sync . s3://miniok8sbucketsoperator-website - cd public && aws --endpoint-url https://s3.communiquons.org s3 sync . s3://miniok8sbucketsoperator-website
volumes:
- name: rust_registry
temp: {}

21
Cargo.lock generated
View File

@ -1024,17 +1024,6 @@ dependencies = [
"hashbrown", "hashbrown",
] ]
[[package]]
name = "io-uring"
version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013"
dependencies = [
"bitflags",
"cfg-if",
"libc",
]
[[package]] [[package]]
name = "ipnet" name = "ipnet"
version = "2.11.0" version = "2.11.0"
@ -1703,9 +1692,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]] [[package]]
name = "reqwest" name = "reqwest"
version = "0.12.22" version = "0.12.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813"
dependencies = [ dependencies = [
"base64", "base64",
"bytes", "bytes",
@ -2214,19 +2203,17 @@ dependencies = [
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.46.1" version = "1.45.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"bytes", "bytes",
"io-uring",
"libc", "libc",
"mio", "mio",
"parking_lot", "parking_lot",
"pin-project-lite", "pin-project-lite",
"signal-hook-registry", "signal-hook-registry",
"slab",
"socket2", "socket2",
"tokio-macros", "tokio-macros",
"windows-sys 0.52.0", "windows-sys 0.52.0",

View File

@ -11,12 +11,12 @@ env_logger = "0.11.8"
anyhow = "1.0.98" anyhow = "1.0.98"
serde = { version = "1.0.219", features = ["derive"] } serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140" serde_json = "1.0.140"
schemars = "1.0.4" schemars = "1.0.2"
tokio = { version = "1.46.1", features = ["full"] } tokio = { version = "1.45.1", features = ["full"] }
kube = { version = "1.1.0", features = ["runtime", "derive"] } kube = { version = "1.1.0", features = ["runtime", "derive"] }
k8s-openapi = { version = "0.25.0", features = ["v1_31"] } k8s-openapi = { version = "0.25.0", features = ["v1_31"] }
futures = "0.3.31" futures = "0.3.31"
thiserror = "2.0.12" thiserror = "2.0.12"
rand = "0.9.1" rand = "0.9.1"
mktemp = "0.5.1" mktemp = "0.5.1"
reqwest = "0.12.22" reqwest = "0.12.20"

View File

@ -164,7 +164,7 @@ impl MinioService {
/// Get bucket name prefixed by mc alias name /// Get bucket name prefixed by mc alias name
fn absolute_bucket_name(&self, name: &str) -> String { fn absolute_bucket_name(&self, name: &str) -> String {
format!("{MC_ALIAS_NAME}/{name}") format!("{}/{name}", MC_ALIAS_NAME)
} }
/// Execute a minio mc command /// Execute a minio mc command
@ -172,7 +172,7 @@ impl MinioService {
where where
A: DeserializeOwned, A: DeserializeOwned,
{ {
log::debug!("exec_mc_cmd with args {args:?}"); log::debug!("exec_mc_cmd with args {:?}", args);
let conf_dir = temp::create_temp_dir()?; let conf_dir = temp::create_temp_dir()?;
let global_flags = ["--config-dir", conf_dir.to_str().unwrap(), "--json"]; let global_flags = ["--config-dir", conf_dir.to_str().unwrap(), "--json"];
@ -354,7 +354,7 @@ impl MinioService {
let bucket_name = self.absolute_bucket_name(bucket); let bucket_name = self.absolute_bucket_name(bucket);
let res = if let Some(quota) = &quota { let res = if let Some(quota) = &quota {
let quota = format!("{quota}B"); let quota = format!("{}B", quota);
self.exec_mc_cmd::<BasicMinioResult>(&[ self.exec_mc_cmd::<BasicMinioResult>(&[
"quota", "quota",
"set", "set",
@ -447,7 +447,7 @@ impl MinioService {
"governance" => RetentionType::Governance, "governance" => RetentionType::Governance,
"compliance" => RetentionType::Compliance, "compliance" => RetentionType::Compliance,
o => { o => {
log::error!("Unknown retention type: {o}"); log::error!("Unknown retention type: {}", o);
return Ok(None); return Ok(None);
} }
}, },