diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 06ec7df6a8..1648998666 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -92,6 +92,7 @@ jobs: env: SCCACHE_BUCKET: test SCCACHE_ENDPOINT: http://127.0.0.1:9000/ + SCCACHE_REGION: us-east-1 AWS_ACCESS_KEY_ID: "minioadmin" AWS_SECRET_ACCESS_KEY: "minioadmin" AWS_EC2_METADATA_DISABLED: "true" @@ -310,6 +311,8 @@ jobs: - name: Start nginx shell: bash run: | + sudo apt install -y nginx-full + mkdir /tmp/static cp `pwd`/tests/htpasswd /tmp/htpasswd nginx -c `pwd`/tests/nginx_http_cache.conf diff --git a/Cargo.lock b/Cargo.lock index 7cae75c143..7936698102 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -145,13 +145,13 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backon" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34fac4d7cdaefa2deded0eda2d5d59dbfd43370ff3f856209e72340ae84c294" +checksum = "0c1a6197b2120bb2185a267f6515038558b019e92b832bb0320e96d66268dcf9" dependencies = [ - "futures", + "fastrand", + "futures-core", "pin-project", - "rand", "tokio", ] @@ -308,18 +308,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.43", "wasm-bindgen", - "winapi", + "windows-targets 0.48.0", ] [[package]] @@ -450,6 +449,12 @@ dependencies = [ "libc", ] +[[package]] +name = "crc16" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338089f42c427b86394a5ee60ff321da23a5c89c9d89514c829687b26359fcff" + [[package]] name = "crc32fast" version = "1.3.2" @@ -691,17 +696,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - [[package]] name = "errno" version = "0.3.1" @@ -734,9 +728,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] @@ -1191,12 +1185,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "io-lifetimes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" - [[package]] name = "io-lifetimes" version = "1.0.3" @@ -1232,7 +1220,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes 1.0.3", + "io-lifetimes", "rustix 0.37.7", "windows-sys 0.48.0", ] @@ -1322,12 +1310,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-raw-sys" -version = "0.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" - [[package]] name = "linux-raw-sys" version = "0.1.3" @@ -1636,9 +1618,9 @@ checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "opendal" -version = "0.37.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37de9fe637d53550bf3f76d5c731f69cb6f9685ada6afd390ada98994a3f91" +checksum = "ddba7299bab261d3ae2f37617fb7f45b19ed872752bb4e22cf93a69d979366c5" dependencies = [ "anyhow", "async-compat", @@ -1658,7 +1640,7 @@ dependencies = [ "parking_lot", "percent-encoding", "pin-project", - "quick-xml 0.27.1", + "quick-xml", "redis", "reqsign", "reqwest", @@ -1929,19 +1911,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quick-xml" -version = "0.27.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc053f057dd768a56f62cd7e434c42c831d296968997e9ac1f76ea7c2d14c41" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "quick-xml" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c1a97b1bc42b1d550bfb48d4262153fe400a12bab1511821736f7eac76d7e2" +checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" dependencies = [ "memchr", "serde", @@ -1988,22 +1960,27 @@ dependencies = [ [[package]] name = "redis" -version = "0.22.1" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513b3649f1a111c17954296e4a3b9eecb108b766c803e2b99f179ebe27005985" +checksum = "4f49cdc0bb3f412bf8e7d1bd90fe1d9eb10bc5c399ba90973c14662a27b3f8ba" dependencies = [ "arc-swap", "async-trait", "bytes", "combine", + "crc16", "futures", "futures-util", "itoa", + "log", "percent-encoding", "pin-project-lite", + "rand", "ryu", "sha1_smol", + "socket2", "tokio", + "tokio-retry", "tokio-util", "url", ] @@ -2053,9 +2030,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "reqsign" -version = "0.13.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6cb65eb3405f9c2de5c18bfc37338d6bbdb2c35eb8eb0e946208cbb564e4833" +checksum = "3228e570df74d69d3d3236a71371f1edd748a3e4eb728ea1f29d403bc10fc727" dependencies = [ "anyhow", "async-trait", @@ -2070,7 +2047,7 @@ dependencies = [ "log", "once_cell", "percent-encoding", - "quick-xml 0.28.1", + "quick-xml", "rand", "reqwest", "rsa", @@ -2180,7 +2157,7 @@ dependencies = [ "serde_json", "sha1", "threadpool", - "time 0.3.17", + "time", "tiny_http", "url", ] @@ -2225,30 +2202,16 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.35.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" -dependencies = [ - "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes 0.7.5", - "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", -] - -[[package]] -name = "rustix" -version = "0.36.4" +version = "0.36.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb93e85278e08bb5788653183213d3a60fc242b10cb9be96586f5a73dcb67c23" +checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" dependencies = [ "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes 1.0.3", + "errno", + "io-lifetimes", "libc", "linux-raw-sys 0.1.3", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2258,8 +2221,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" dependencies = [ "bitflags 1.3.2", - "errno 0.3.1", - "io-lifetimes 1.0.3", + "errno", + "io-lifetimes", "libc", "linux-raw-sys 0.3.8", "windows-sys 0.45.0", @@ -2619,7 +2582,7 @@ dependencies = [ "num-bigint", "num-traits", "thiserror", - "time 0.3.17", + "time", ] [[package]] @@ -2740,7 +2703,7 @@ dependencies = [ "hostname", "libc", "log", - "time 0.3.17", + "time", ] [[package]] @@ -2772,7 +2735,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "redox_syscall", - "rustix 0.36.4", + "rustix 0.36.15", "windows-sys 0.42.0", ] @@ -2787,12 +2750,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ca90c434fd12083d1a6bdcbe9f92a14f96c8a1ba600ba451734ac334521f7a" +checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" dependencies = [ - "rustix 0.35.13", - "windows-sys 0.42.0", + "rustix 0.37.7", + "windows-sys 0.48.0", ] [[package]] @@ -2867,16 +2830,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "time" version = "0.3.17" @@ -2984,6 +2937,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-retry" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" +dependencies = [ + "pin-project", + "rand", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.23.4" diff --git a/Cargo.toml b/Cargo.toml index bff2d7ae94..ddfe89d82c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,11 +56,11 @@ log = "0.4" num_cpus = "1.15" number_prefix = "0.4" once_cell = "1.17" -opendal = { version = "0.37.0", optional = true } +opendal = { version = "0.40.0", optional = true } openssl = { version = "0.10.55", optional = true } rand = "0.8.4" regex = "1.7.3" -reqsign = { version = "0.13.0", optional = true } +reqsign = { version = "0.14", optional = true } reqwest = { version = "0.11", features = [ "json", "blocking", @@ -157,11 +157,18 @@ webdav = ["opendal"] # Enable features that will build a vendored version of openssl and # statically linked with it, instead of linking against the system-wide openssl # dynamically or statically. -vendored-openssl = ["openssl?/vendored"] +vendored-openssl = ["openssl?/vendored", "opendal?/native-tls-vendored"] # Enable features that require unstable features of Nightly Rust. unstable = [] # Enables distributed support in the sccache client -dist-client = ["flate2", "hyper", "reqwest", "url", "sha2", "trust-dns-resolver"] +dist-client = [ + "flate2", + "hyper", + "reqwest", + "url", + "sha2", + "trust-dns-resolver", +] # Enables the sccache-dist binary dist-server = [ "jwt", diff --git a/tests/nginx_http_cache.conf b/tests/nginx_http_cache.conf index 90c164e832..52688b968f 100644 --- a/tests/nginx_http_cache.conf +++ b/tests/nginx_http_cache.conf @@ -1,5 +1,6 @@ error_log /tmp/error.log; pid /tmp/nginx.pid; +load_module /usr/lib/nginx/modules/ngx_http_dav_ext_module.so; events { worker_connections 1024; @@ -15,7 +16,8 @@ http { location / { client_body_temp_path /tmp; log_not_found off; - dav_methods PUT DELETE; + dav_methods PUT DELETE MKCOL; + dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK; create_full_put_path on; client_max_body_size 1024M; auth_basic "Authentication required";