diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 140e5bf..483cd5a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -41,6 +41,9 @@ updates: directory: "/clotributor-apiserver" schedule: interval: "weekly" + ignore: + - dependency-name: "node" + versions: ["19-alpine3.19", "20-alpine3.19", "21-alpine3.19"] - package-ecosystem: "docker" directory: "/clotributor-registrar" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e62b626..f5466ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,26 +13,16 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - name: Setup Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - toolchain: 1.74.0 - profile: minimal + toolchain: 1.75.0 components: clippy, rustfmt - override: true - name: Run clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets --all-features -- --deny warnings + run: cargo clippy --all-targets --all-features -- --deny warnings - name: Run rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check - name: Run backend tests - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test lint-and-test-frontend: runs-on: ubuntu-latest diff --git a/Cargo.lock b/Cargo.lock index a52bb0d..b7a8d6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -53,9 +53,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" @@ -87,9 +87,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.76" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59d2a3357dde987206219e78ecfbbb6e8dad06cbb65292758d3270e6254f7355" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "ascii" @@ -109,13 +109,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.75" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -137,19 +137,20 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "d09dbe0e490df5da9d69b36dca48a76635288a82f92eca90024883a56202026d" dependencies = [ "async-trait", "axum-core", "axum-macros", - "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.1.0", + "hyper-util", "itoa", "matchit", "memchr", @@ -166,35 +167,40 @@ dependencies = [ "tower", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "e87c8503f93e6d144ee5690907ba22db7ba79ab001a932ab99034f0fe836b3df" dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-macros" -version = "0.3.8" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdca6a10ecad987bda04e95606ef85a5417dcaac1a78455242d72e031e2b6b62" +checksum = "5a2edad600410b905404c594e2523549f1bcd4bded1e252c8f74524ccce0b867" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -318,7 +324,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -338,7 +344,7 @@ dependencies = [ "config", "deadpool-postgres", "futures", - "hyper", + "hyper 1.1.0", "mime", "mockall", "openssl", @@ -365,7 +371,7 @@ dependencies = [ "deadpool-postgres", "futures", "hex", - "http", + "http 1.0.0", "mockall", "mockito", "openssl", @@ -567,9 +573,9 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encoding_rs" @@ -646,9 +652,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -661,9 +667,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -671,15 +677,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -688,38 +694,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -830,7 +836,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.11", "indexmap 1.9.3", "slab", "tokio", @@ -838,6 +844,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "h2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "991910e35c615d8cab86b5ab04be67e6ad24d2bf5f4f11fdbbed26da999bbeab" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.0.0", + "indexmap 2.1.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -849,9 +874,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -900,6 +925,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -907,15 +943,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.11", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.0.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +dependencies = [ + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", "pin-project-lite", ] [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "3ce4ef31cda248bbdb6e6820603b82dfcd9e833db65a43e997a0ccec777d11fe" [[package]] name = "httparse" @@ -939,9 +998,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.21", + "http 0.2.11", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -953,6 +1012,25 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.1", + "http 1.0.0", + "http-body 1.0.0", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "tokio", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -960,12 +1038,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.28", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdea9aac0dbe5a9240d68cfd9501e2db94222c6dc06843e06640b9e07f0fdc67" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "hyper 1.1.0", + "pin-project-lite", + "socket2", + "tokio", + "tracing", +] + [[package]] name = "idna" version = "0.5.0" @@ -988,12 +1084,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -1013,9 +1109,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" @@ -1151,9 +1247,9 @@ dependencies = [ [[package]] name = "mockall" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a978c8292954bcb9347a4e28772c0a0621166a1598fc1be28ac0076a4bb810e" +checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" dependencies = [ "cfg-if", "downcast", @@ -1166,14 +1262,14 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad2765371d0978ba4ace4ebef047baa62fc068b431e468444b5610dd441c639b" +checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1185,7 +1281,7 @@ dependencies = [ "assert-json-diff", "colored", "futures", - "hyper", + "hyper 0.14.28", "log", "rand", "regex", @@ -1254,15 +1350,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.61" +version = "0.10.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" +checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -1281,7 +1377,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1301,9 +1397,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.97" +version = "0.9.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" +checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" dependencies = [ "cc", "libc", @@ -1442,7 +1538,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1459,9 +1555,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "postgres-derive" @@ -1472,7 +1568,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1547,15 +1643,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -1563,18 +1659,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -1673,10 +1769,10 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.21", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.28", "hyper-tls", "ipnet", "js-sys", @@ -1748,9 +1844,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "schannel" @@ -1792,29 +1888,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -1856,11 +1952,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.28" +version = "0.9.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9269cfafc7e0257ee4a42f3f68a307f458c63d9e7c8ba4b58c5d15f1b7d7e8d3" +checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -1979,9 +2075,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -2030,9 +2126,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" @@ -2051,7 +2147,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -2134,7 +2230,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -2226,16 +2322,16 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +checksum = "09e12e6351354851911bdf8c2b8f2ab15050c567d70a8b9a37ae7b8301a4080d" dependencies = [ "bitflags 2.4.1", "bytes", - "futures-core", "futures-util", - "http", - "http-body", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", "http-range-header", "httpdate", "mime", @@ -2281,7 +2377,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -2485,7 +2581,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", "wasm-bindgen-shared", ] @@ -2519,7 +2615,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/Cargo.toml b/Cargo.toml index f8064e5..348815c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,32 +13,32 @@ edition = "2021" rust-version = "1.65" [workspace.dependencies] -anyhow = "1.0.76" -async-trait = "0.1.75" -axum = { version = "0.6.20", features = ["macros"] } +anyhow = "1.0.79" +async-trait = "0.1.77" +axum = { version = "0.7.3", features = ["macros"] } bincode = "1.3.3" clap = { version = "4.4.11", features = ["derive"] } config = "0.13.4" deadpool = "0.10.0" deadpool-postgres = { version = "0.12.1", features = ["serde"] } -futures = "0.3.29" +futures = "0.3.30" graphql_client = { version = "0.13.0", features = ["reqwest"] } hex = "0.4.3" -http = "0.2.11" -hyper = "0.14.28" +http = "1.0.0" +hyper = "1.1.0" lazy_static = "1.4.0" mime = "0.3.17" -mockall = "0.12.0" +mockall = "0.12.1" mockito = "1.2.0" -openssl = { version = "0.10.61", features = ["vendored"] } +openssl = { version = "0.10.62", features = ["vendored"] } postgres-openssl = "0.5.0" postgres-types = { version = "0.2.6", features = ["derive"] } regex = "1.10.2" reqwest = { version = "0.11.23", features = ["json"] } -serde = { version = "1.0.193", features = ["derive"] } -serde_json = "1.0.108" +serde = { version = "1.0.195", features = ["derive"] } +serde_json = "1.0.111" serde_qs = "0.12.0" -serde_yaml = "0.9.28" +serde_yaml = "0.9.30" sha2 = "0.10.8" time = { version = "0.3.31", features = [ "formatting", @@ -59,7 +59,7 @@ tokio-postgres = { version = "0.7.10", features = [ "with-uuid-1", ] } tower = "0.4.13" -tower-http = { version = "0.4.4", features = ["fs", "set-header", "trace"] } +tower-http = { version = "0.5.0", features = ["fs", "set-header", "trace"] } tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json"] } uuid = { version = "1.6.1", features = ["serde"] } diff --git a/clotributor-apiserver/Dockerfile b/clotributor-apiserver/Dockerfile index e29f60c..e8a1aab 100644 --- a/clotributor-apiserver/Dockerfile +++ b/clotributor-apiserver/Dockerfile @@ -1,5 +1,5 @@ # Build apiserver -FROM rust:1-alpine3.18 as builder +FROM rust:1-alpine3.19 as builder RUN apk --no-cache add musl-dev perl make WORKDIR /clotributor COPY Cargo.* ./ @@ -10,7 +10,7 @@ WORKDIR /clotributor/clotributor-apiserver RUN cargo build --release # Build frontend -FROM node:18-alpine3.18 AS frontend-builder +FROM node:18-alpine3.19 AS frontend-builder RUN apk --no-cache add git WORKDIR /web COPY web . @@ -20,7 +20,7 @@ RUN yarn install --network-concurrency 1 RUN yarn build # Final stage -FROM alpine:3.18.5 +FROM alpine:3.19.0 RUN apk --no-cache add ca-certificates && addgroup -S clotributor && adduser -S clotributor -G clotributor USER clotributor WORKDIR /home/clotributor diff --git a/clotributor-apiserver/src/handlers.rs b/clotributor-apiserver/src/handlers.rs index a5180d1..a2c5c18 100644 --- a/clotributor-apiserver/src/handlers.rs +++ b/clotributor-apiserver/src/handlers.rs @@ -1,7 +1,7 @@ use crate::db::{DynDB, SearchIssuesInput}; use anyhow::{Error, Result}; use axum::{ - body::Full, + body::Body, extract::{FromRef, RawQuery, State}, http::{ header::{CACHE_CONTROL, CONTENT_TYPE}, @@ -72,7 +72,7 @@ async fn issues_filters(State(db): State) -> impl IntoResponse { Response::builder() .header(CACHE_CONTROL, format!("max-age={DEFAULT_API_MAX_AGE}")) .header(CONTENT_TYPE, APPLICATION_JSON.as_ref()) - .body(Full::from(filters)) + .body(Body::from(filters)) .map_err(internal_error) } @@ -89,7 +89,7 @@ async fn search_issues(State(db): State, RawQuery(query): RawQuery) -> im .header(CACHE_CONTROL, format!("max-age={DEFAULT_API_MAX_AGE}")) .header(CONTENT_TYPE, APPLICATION_JSON.as_ref()) .header(PAGINATION_TOTAL_COUNT, count.to_string()) - .body(Full::from(issues)) + .body(Body::from(issues)) .map_err(internal_error) } @@ -107,7 +107,10 @@ where mod tests { use super::*; use crate::db::MockDB; - use axum::{body::Body, http::Request}; + use axum::{ + body::{to_bytes, Body}, + http::Request, + }; use futures::future; use mockall::predicate::eq; use tower::ServiceExt; @@ -137,7 +140,7 @@ mod tests { ); assert_eq!(response.headers()[CONTENT_TYPE], APPLICATION_JSON.as_ref()); assert_eq!( - hyper::body::to_bytes(response.into_body()).await.unwrap(), + to_bytes(response.into_body(), usize::MAX).await.unwrap(), r#"{"some": "filters"}"#.to_string(), ); } @@ -201,7 +204,7 @@ mod tests { assert_eq!(response.headers()[CONTENT_TYPE], APPLICATION_JSON.as_ref()); assert_eq!(response.headers()[PAGINATION_TOTAL_COUNT], "1"); assert_eq!( - hyper::body::to_bytes(response.into_body()).await.unwrap(), + to_bytes(response.into_body(), usize::MAX).await.unwrap(), r#"[{"issue": "info"}]"#.to_string(), ); } diff --git a/clotributor-apiserver/src/main.rs b/clotributor-apiserver/src/main.rs index ee91e7c..4910114 100644 --- a/clotributor-apiserver/src/main.rs +++ b/clotributor-apiserver/src/main.rs @@ -11,7 +11,7 @@ use postgres_openssl::MakeTlsConnector; use std::net::SocketAddr; use std::path::PathBuf; use std::sync::Arc; -use tokio::signal; +use tokio::{net::TcpListener, signal}; use tracing::{debug, info}; use tracing_subscriber::EnvFilter; @@ -61,10 +61,10 @@ async fn main() -> Result<()> { debug!("setting up apiserver"); let router = handlers::setup_router(&cfg.clone(), db)?; let addr: SocketAddr = cfg.get_string("apiserver.addr")?.parse()?; + let listener = TcpListener::bind(addr).await?; info!("apiserver started"); info!(%addr, "listening"); - axum::Server::bind(&addr) - .serve(router.into_make_service()) + axum::serve(listener, router) .with_graceful_shutdown(shutdown_signal()) .await?; info!("apiserver stopped"); diff --git a/clotributor-registrar/Dockerfile b/clotributor-registrar/Dockerfile index 672eeac..e58b7f6 100644 --- a/clotributor-registrar/Dockerfile +++ b/clotributor-registrar/Dockerfile @@ -1,5 +1,5 @@ # Build registrar -FROM rust:1-alpine3.18 as builder +FROM rust:1-alpine3.19 as builder RUN apk --no-cache add musl-dev perl make WORKDIR /clotributor COPY Cargo.* ./ @@ -10,7 +10,7 @@ WORKDIR /clotributor/clotributor-registrar RUN cargo build --release # Final stage -FROM alpine:3.18.5 +FROM alpine:3.19.0 RUN apk --no-cache add ca-certificates && addgroup -S clotributor && adduser -S clotributor -G clotributor USER clotributor WORKDIR /home/clotributor diff --git a/clotributor-registrar/src/registrar.rs b/clotributor-registrar/src/registrar.rs index 8b1be66..5e7d3fe 100644 --- a/clotributor-registrar/src/registrar.rs +++ b/clotributor-registrar/src/registrar.rs @@ -2,7 +2,7 @@ use crate::db::DynDB; use anyhow::{format_err, Context, Error, Result}; use config::Config; use futures::stream::{self, StreamExt}; -use http::StatusCode; +use reqwest::StatusCode; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; use std::{collections::HashMap, time::Duration}; diff --git a/clotributor-tracker/Dockerfile b/clotributor-tracker/Dockerfile index f1fc948..97b69fd 100644 --- a/clotributor-tracker/Dockerfile +++ b/clotributor-tracker/Dockerfile @@ -1,5 +1,5 @@ # Build tracker -FROM rust:1-alpine3.18 as builder +FROM rust:1-alpine3.19 as builder RUN apk --no-cache add musl-dev perl make WORKDIR /clotributor COPY Cargo.* ./ @@ -10,7 +10,7 @@ WORKDIR /clotributor/clotributor-tracker RUN cargo build --release # Final stage -FROM alpine:3.18.5 +FROM alpine:3.19.0 RUN apk --no-cache add ca-certificates && addgroup -S clotributor && adduser -S clotributor -G clotributor USER clotributor WORKDIR /home/clotributor diff --git a/clotributor-tracker/src/tracker.rs b/clotributor-tracker/src/tracker.rs index 329cda3..cd4351b 100644 --- a/clotributor-tracker/src/tracker.rs +++ b/clotributor-tracker/src/tracker.rs @@ -24,6 +24,7 @@ const REPOSITORY_TRACK_TIMEOUT: u64 = 300; /// Repository information. #[derive(Debug, Clone, PartialEq, Default)] +#[allow(clippy::struct_field_names)] pub(crate) struct Repository { pub repository_id: Uuid, pub name: String, @@ -128,6 +129,7 @@ pub enum IssueDifficulty { /// Issue information. #[derive(Debug, Clone, PartialEq)] +#[allow(clippy::struct_field_names)] pub(crate) struct Issue { pub issue_id: i64, pub title: String, @@ -250,6 +252,7 @@ impl Issue { /// Texts used to build the issue's text search document. #[derive(Debug, Clone, PartialEq)] +#[allow(clippy::struct_field_names)] pub(crate) struct IssueTsTexts { pub weight_a: String, pub weight_b: String, diff --git a/database/migrations/Dockerfile b/database/migrations/Dockerfile index 7558e3d..bb34c1d 100644 --- a/database/migrations/Dockerfile +++ b/database/migrations/Dockerfile @@ -1,5 +1,5 @@ # Build tern -FROM golang:1.21.5-alpine3.19 AS tern +FROM golang:1.21.6-alpine3.19 AS tern RUN apk --no-cache add git RUN go install github.com/jackc/tern@latest