From 9d7b552e64769f94b098dca3507a7c25e569950c Mon Sep 17 00:00:00 2001 From: vados Date: Sun, 29 Oct 2023 14:50:54 +0900 Subject: [PATCH] chore(deps): update pgrx and other deps The version of some dependencies in this project has gotten a bit stale, most importantly being `pgrx` which has seen a couple minor version changes. This commit updates the dependencies of `pg_idkit`, most important of those being `pgrx`, and updates the minimum allowed rust version along with updating some metadata. This commit *intentionally* ignores the problem of upgrading the version of postgres tested itself (it's still 14, and is made more consistent, if anything) -- that will be handled in a following upgrade. Signed-off-by: vados --- .github/workflows/build.yaml | 5 +- Cargo.lock | 235 ++++++++++++++++++----------------- Cargo.toml | 22 ++-- Justfile | 9 +- README.md | 2 +- infra/docker/ci.Dockerfile | 18 ++- 6 files changed, 162 insertions(+), 129 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c65e32a..ad64b62 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,7 +9,10 @@ jobs: strategy: matrix: - rust_container_version: [ "1.63" ] + # The version(s) of the Rust being used in the CI container + # (requires building and pushing via `just build-ci-image push-ci-image`) + rust_container_version: + - 1.73 container: image: "ghcr.io/vadosware/pg_idkit/builder:0.x.x" diff --git a/Cargo.lock b/Cargo.lock index d7dcec8..5c06b3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -120,23 +120,13 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" -[[package]] -name = "bigint" -version = "4.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0e8c8a600052b52482eff2cf4d810e462fdff1f656ac1ecb6232132a1ed7def" -dependencies = [ - "byteorder", - "crunchy", -] - [[package]] name = "bindgen" -version = "0.66.1" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.1", "cexpr", "clang-sys", "lazy_static", @@ -173,9 +163,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitvec" @@ -218,9 +208,9 @@ checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cargo_toml" -version = "0.15.3" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" +checksum = "e3f9629bc6c4388ea699781dc988c2b99766d7679b151c81990b4fa1208fafd3" dependencies = [ "serde", "toml", @@ -286,9 +276,9 @@ dependencies = [ [[package]] name = "clap-cargo" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca953650a7350560b61db95a0ab1d9c6f7b74d146a9e08fb258b834f3cf7e2c" +checksum = "25122ca6ebad5f53578c26638afd9f0160426969970dc37ec6c363ff6b082ebd" dependencies = [ "clap", "doc-comment", @@ -405,12 +395,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crunchy" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" - [[package]] name = "crypto-common" version = "0.1.6" @@ -423,12 +407,12 @@ dependencies = [ [[package]] name = "cuid" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5d03ac594f5f9cc680b142fff46f3ad9f197e19272042ebf1a40b383fee6fb" +checksum = "51294db11d38eb763c92936c5c88425d0090e27dce21dd15748134af9e53e739" dependencies = [ "base36", - "bigint", + "cuid-util", "cuid2", "hostname", "num", @@ -437,13 +421,19 @@ dependencies = [ ] [[package]] -name = "cuid2" +name = "cuid-util" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1debbff0c0f0b54e681296c6f064a78f8ecec8e89e7fcc472443d9f85b98ca9a" +checksum = "5ea2bfe0336ff1b7ca74819b2df8dfae9afea358aff6b1688baa5c181d8c3713" + +[[package]] +name = "cuid2" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d99cacd52fd67db7490ad051c8c1973fb75520174d69aabbae08c534c9d0e8" dependencies = [ + "cuid-util", "num", - "proptest", "rand 0.8.5", "sha3", ] @@ -500,18 +490,18 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "enum-map" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "017b207acb4cc917f4c31758ed95c0bc63ddb0f358b22eb38f80a2b2a43f6b1f" +checksum = "53337c2dbf26a3c31eccc73a37b10c1614e8d4ae99b6a50d553e8936423c1f16" dependencies = [ "enum-map-derive", ] [[package]] name = "enum-map-derive" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8560b409800a72d2d7860f8e5f4e0b0bd22bea6a352ea2a9ce30ccdef7f16d2f" +checksum = "04d0b288e3bb1d861c4403c1774a6f7a798781dfc519b3647df2a3dd4ae95f25" dependencies = [ "proc-macro2", "quote", @@ -697,9 +687,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -733,12 +723,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.14.0" @@ -838,16 +822,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.0.0" @@ -855,7 +829,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown", ] [[package]] @@ -937,9 +911,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libloading" @@ -1005,9 +979,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" @@ -1259,12 +1233,12 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 1.9.3", + "indexmap", ] [[package]] @@ -1288,12 +1262,12 @@ dependencies = [ [[package]] name = "pgrx" -version = "0.9.7" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6186d4aa5911be4c00b52e555779deece35a7563c87fcfe794407dc2e9cc4dc1" +checksum = "bd3c4b36fbe84329b86c83bfd33b9514a50606f00074f47085f99062a7dd8c9c" dependencies = [ "atomic-traits", - "bitflags 2.3.3", + "bitflags 2.4.1", "bitvec", "enum-map", "heapless", @@ -1313,9 +1287,9 @@ dependencies = [ [[package]] name = "pgrx-macros" -version = "0.9.7" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479a66a8c582e0fdf101178473315cb13eaa10829c154db742c35ec0279cdaec" +checksum = "9c6a41e021321a814fac1aa27bd4266208b4507709ecbc28fc99693adfbd0c41" dependencies = [ "pgrx-sql-entity-graph", "proc-macro2", @@ -1325,9 +1299,9 @@ dependencies = [ [[package]] name = "pgrx-pg-config" -version = "0.9.7" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45c557631217a13859e223899c01d35982ef0c860ee5ab65af496f830b1316" +checksum = "17da1e26800e747d501b8d8bb8aeee4530a07d93a39c3fb2c4229a8feff213b2" dependencies = [ "cargo_toml", "dirs", @@ -1343,9 +1317,9 @@ dependencies = [ [[package]] name = "pgrx-pg-sys" -version = "0.9.7" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde896a17c638b6475d6fc12b571a176013a8486437bbc8a64ac2afb8ba5d58" +checksum = "f9032b517525ec71579cc68e92905b5f5f63e892c094834202313c42f2f1a669" dependencies = [ "bindgen", "eyre", @@ -1365,9 +1339,9 @@ dependencies = [ [[package]] name = "pgrx-sql-entity-graph" -version = "0.9.7" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e9abc71b018d90aa9b7a34fedf48b76da5d55c04d2ed2288096827bebbf403" +checksum = "2e4a88203974b887bca8bfdea17ab9936411fb7e84957763dc0124df78d07907" dependencies = [ "convert_case", "eyre", @@ -1380,9 +1354,9 @@ dependencies = [ [[package]] name = "pgrx-tests" -version = "0.9.7" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ac4ffedfa247f9d51421e4e2ac18c33d8d674350bad730f3fe5736bf298612" +checksum = "c80deb4310538e6ef14f4cbb30b56eb24b6d7aae66bfd4e516f153987159e65e" dependencies = [ "clap-cargo", "eyre", @@ -1393,6 +1367,8 @@ dependencies = [ "pgrx-macros", "pgrx-pg-config", "postgres", + "proptest", + "rand 0.8.5", "regex", "serde", "serde_json", @@ -1523,9 +1499,9 @@ dependencies = [ [[package]] name = "postgres" -version = "0.19.5" +version = "0.19.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bed5017bc2ff49649c0075d0d7a9d676933c1292480c1d137776fb205b5cd18" +checksum = "7915b33ed60abc46040cbcaa25ffa1c7ec240668e0477c4f3070786f5916d451" dependencies = [ "bytes", "fallible-iterator", @@ -1537,9 +1513,9 @@ dependencies = [ [[package]] name = "postgres-protocol" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b7fa9f396f51dffd61546fd8573ee20592287996568e6175ceb0f8699ad75d" +checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ "base64", "byteorder", @@ -1572,9 +1548,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -1623,9 +1599,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1775,13 +1751,25 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", ] [[package]] @@ -1792,9 +1780,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "resize-slice" @@ -1961,9 +1949,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -1991,9 +1979,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "siphasher" @@ -2133,9 +2121,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.29.3" +version = "0.29.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bcd0346f90b6bc83526c7b180039a8acd26a5c848cc556d457f6472eb148122" +checksum = "0a18d114d420ada3a891e6bc8e96a2023402203296a47cdd65083377dad18ba5" dependencies = [ "cfg-if", "core-foundation-sys", @@ -2239,9 +2227,9 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e89f6234aa8fd43779746012fcf53603cdb91fdd8399aa0de868c2d56b6dde1" +checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" dependencies = [ "async-trait", "byteorder", @@ -2256,9 +2244,11 @@ dependencies = [ "pin-project-lite", "postgres-protocol", "postgres-types", + "rand 0.8.5", "socket2 0.5.3", "tokio", "tokio-util", + "whoami", ] [[package]] @@ -2277,9 +2267,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240" +checksum = "8ff9e3abce27ee2c9a37f9ad37238c1bdd4e789c84ba37df76aa4d528f5072cc" dependencies = [ "serde", "serde_spanned", @@ -2289,20 +2279,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.11" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.0.0", + "indexmap", "serde", "serde_spanned", "toml_datetime", @@ -2343,9 +2333,9 @@ checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "ulid" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a3aaa69b04e5b66cc27309710a569ea23593612387d67daaf102e73aa974fd" +checksum = "7e37c4b6cbcc59a8dcd09a6429fbc7890286bcbb79215cea7b38a3c4c0921d93" dependencies = [ "rand 0.8.5", ] @@ -2403,9 +2393,9 @@ checksum = "74c1aa4511c38276c548406f0b1f5f8b793f000cfb51e18f278a102abd057e81" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -2414,21 +2404,22 @@ dependencies = [ [[package]] name = "uuid" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ "getrandom", ] [[package]] name = "uuid7" -version = "0.6.4" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e90e1dc12751e7a351ef15f5170a70ae1c57151ca3da854ac8a0b5181cdf5f" +checksum = "fcba843a27a44d6bfbc8852222af425ebd04da999d898df30fd2ed16abe469ac" dependencies = [ "fstr", "rand 0.8.5", + "rand_chacha", ] [[package]] @@ -2522,6 +2513,26 @@ version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +[[package]] +name = "web-sys" +version = "0.3.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "whoami" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + [[package]] name = "winapi" version = "0.3.9" @@ -2696,9 +2707,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 85755ad..1ecf601 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,11 +5,17 @@ edition = "2021" authors = [ "Victor Adossi " ] -rust-version = "1.69.0" +rust-version = "1.73.0" +description = """ +A Postgres extension for generating UUIDs +""" [lib] crate-type = ["cdylib"] +[badges] +maintenance = { status = "actively-maintained" } + [features] default = ["pg14"] pg11 = [ "pgrx/pg11", "pgrx-tests/pg11" ] @@ -20,21 +26,21 @@ pg15 = [ "pgrx/pg15", "pgrx-tests/pg15" ] pg_test = [] [dependencies] -cuid = "1.3.1" -cuid2 = "0.1.0" -getrandom = "0.2.8" +cuid = "1.3.2" +cuid2 = "0.1.2" +getrandom = "0.2.10" ksuid = "0.2.0" nanoid = "0.4.0" -pgrx = "=0.9.7" +pgrx = "=0.11.0" pushid = "0.0.1" sonyflake = "0.2.0" timeflake-rs = "0.3.0" -ulid = "1.0.0" -uuid7 = "0.6.4" +ulid = "1.1.0" +uuid7 = "0.7.2" xid = "1.0.3" [dev-dependencies] -pgrx-tests = "=0.9.7" +pgrx-tests = "=0.11.0" [profile.dev] panic = "unwind" diff --git a/Justfile b/Justfile index 322f3b4..3b36cf4 100644 --- a/Justfile +++ b/Justfile @@ -68,8 +68,8 @@ test: # Docker # ########## -pg_image_version := env_var_or_default("POSTGRES_IMAGE_VERSION", "15.1.0") -pg_image_tag := env_var_or_default("POSGRES_IMAGE_VERSION", pg_image_version + "-alpine") +pg_image_version := env_var_or_default("POSTGRES_IMAGE_VERSION", "14.9") +pg_image_tag := env_var_or_default("POSGRES_IMAGE_VERSION", pg_image_version + "-alpine3.18") pgkit_image_name := env_var_or_default("PGKIT_IMAGE_NAME", "postgres") pgkit_image_tag := env_var_or_default("PGKIT_IMAGE_TAG", pg_image_version + "-pg_idkit=" + version) @@ -86,7 +86,7 @@ docker_username_path := env_var_or_default("DOCKER_USERNAME_PATH", "secrets/dock docker_image_registry := env_var_or_default("DOCKER_IMAGE_REGISTRY", "ghcr.io/vadosware/pg_idkit") docker_config_dir := env_var_or_default("DOCKER_CONFIG", "secrets/docker") -## Ensure that that a given file is present +# Ensure that that a given file is present _ensure-file file: #!/usr/bin/env -S bash -euo pipefail @if [ ! -f "{{file}}" ]; then @@ -101,11 +101,14 @@ docker-login: cat {{docker_password_path}} | {{docker}} login {{docker_image_registry}} -u `cat {{docker_username_path}}` --password-stdin cp {{docker_config_dir}}/config.json {{docker_config_dir}}/.dockerconfigjson +# Build the docker image for pg_idkit image: {{docker}} build -f {{pgkit_dockerfile_path}} -t {{pgkit_image_name_full}} +# Build the docker image used in CI build-ci-image: {{docker}} build -f {{ci_dockerfile_path}} -t {{ci_image_name_full}} . +# Push the docker image used in CI (to GitHub Container Registry) push-ci-image: {{docker}} push {{ci_image_name_full}} diff --git a/README.md b/README.md index 0f9a973..743ee11 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ just build-watch Note that you can use the `pgrx`-documented development flow as well (using `cargo pgrx`) as well, for example: ```console -cargo pgrx run pg15 +cargo pgrx run pg14 ``` ## Run tests diff --git a/infra/docker/ci.Dockerfile b/infra/docker/ci.Dockerfile index 83ea03d..2ffb6a0 100644 --- a/infra/docker/ci.Dockerfile +++ b/infra/docker/ci.Dockerfile @@ -1,5 +1,5 @@ -# rust:1.69.0-slim-bullseye as of 2023/05/18 -FROM rust:1.69.0-slim-bullseye@sha256:caba086dac32589a2c4e5ac43212eb2fa2eb1ddb49b19dbd976c89115af56f70 +# rust:1.73.0-slim-bullseye as of 2023/10/29 +FROM rust:1.73.0-slim-bullseye@sha256:9f7ad33ce267070d8982f4503ec83fd0d7cd19c7e30baaa5eb4ac5e26ba23ae1 ENV CARGO_HOME=/usr/local/cargo ENV CARGO_TARGET_DIR=/usr/local/build/target @@ -25,7 +25,17 @@ RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" RUN apt -y update && apt -y upgrade && apt install -y postgresql-14 # Install NodeJS -RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - +RUN set -uex; \ + apt-get update; \ + apt-get install -y ca-certificates curl gnupg; \ + mkdir -p /etc/apt/keyrings; \ + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ + | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \ + NODE_MAJOR=20; \ + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \ + > /etc/apt/sources.list.d/nodesource.list; \ + apt-get update; \ + apt-get install nodejs -y; # Install dependencies for building postgres, NodeJS, etc RUN apt-get update && \ @@ -56,7 +66,7 @@ RUN chmod g+w -R /usr/local/build # Install development/build/testing deps # NOTE: version of cargo-pgrx must be handled speicfically -RUN su idkit -c "cargo install sccache cargo-cache cargo-pgrx@0.9.7" +RUN su idkit -c "cargo install sccache cargo-cache cargo-pgrx@0.11.0" # Initialize pgrx # NOTE: pgrx must be reinitialized if cargo-pgrx changes