From 6e248249ec7bcc239c54344a33b919a88c12a67b Mon Sep 17 00:00:00 2001 From: Varun Dhananjaya Date: Thu, 7 Nov 2024 17:06:56 -0500 Subject: [PATCH] Upgrade to Rust 1.81 Summary: Rust 1.81 introduced new [lifetime rules](https://github.com/rust-lang/rust/pull/117967), which opaque-ke, a crate we depend on, violated. The maintainers of that crate have introduced a new version that satisifies these new rules, and we have upgraded to this version in D13895. Now that we've upgraded the dependency, we should bump Rust to the latest stable version. EDIT: we can't upgrade to 1.82, the latest stable version, because of an issue with `wasm-bindgen`: https://linear.app/comm/issue/ENG-9892/cant-upgrade-to-rust-182 Depends on D13895 Test Plan: All crates build locally and in Docker (CI) Reviewers: will, bartek Reviewed By: will, bartek Subscribers: ashoat, tomek Differential Revision: https://phab.comm.dev/D13896 --- keyserver/Dockerfile | 2 +- rust-toolchain.toml | 2 +- services/backup/Dockerfile | 2 +- services/blob/Dockerfile | 2 +- services/commtest/Dockerfile | 2 +- services/feature-flags/Dockerfile | 2 +- services/identity/Dockerfile | 2 +- services/reports/Dockerfile | 2 +- services/search-index-lambda/Cargo.lock | 16 ++++++++++++---- services/tunnelbroker/Dockerfile | 2 +- 10 files changed, 21 insertions(+), 13 deletions(-) diff --git a/keyserver/Dockerfile b/keyserver/Dockerfile index 2f573f53f7..6f3a1ed591 100644 --- a/keyserver/Dockerfile +++ b/keyserver/Dockerfile @@ -88,7 +88,7 @@ RUN mkdir /home/comm/backups # Install Rust and add Cargo's bin directory to the $PATH environment variable RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ - --default-toolchain 1.76 + --default-toolchain 1.81 ENV PATH /home/comm/.cargo/bin:$PATH #------------------------------------------------------------------------------- diff --git a/rust-toolchain.toml b/rust-toolchain.toml index af663bde66..6f4d5bc316 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.76" +channel = "1.81" profile = "default" diff --git a/services/backup/Dockerfile b/services/backup/Dockerfile index ebc8004d3c..de20c2d1c2 100644 --- a/services/backup/Dockerfile +++ b/services/backup/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76-bullseye as builder +FROM rust:1.81-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ diff --git a/services/blob/Dockerfile b/services/blob/Dockerfile index 18735a8180..9d682ec31d 100644 --- a/services/blob/Dockerfile +++ b/services/blob/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76-bullseye as builder +FROM rust:1.81-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ diff --git a/services/commtest/Dockerfile b/services/commtest/Dockerfile index c6138d1db4..d8c576d642 100644 --- a/services/commtest/Dockerfile +++ b/services/commtest/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76-bullseye +FROM rust:1.81-bullseye RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ diff --git a/services/feature-flags/Dockerfile b/services/feature-flags/Dockerfile index 198fc35e1e..1bc1ff9a88 100644 --- a/services/feature-flags/Dockerfile +++ b/services/feature-flags/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76-bullseye as builder +FROM rust:1.81-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ diff --git a/services/identity/Dockerfile b/services/identity/Dockerfile index 6073c91d99..ee5c3ac852 100644 --- a/services/identity/Dockerfile +++ b/services/identity/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76-bullseye as builder +FROM rust:1.81-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ diff --git a/services/reports/Dockerfile b/services/reports/Dockerfile index 2d80bebb4f..eccc11d72b 100644 --- a/services/reports/Dockerfile +++ b/services/reports/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76-bullseye as builder +FROM rust:1.81-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ diff --git a/services/search-index-lambda/Cargo.lock b/services/search-index-lambda/Cargo.lock index b2410ffa52..a5c2e7c0b5 100644 --- a/services/search-index-lambda/Cargo.lock +++ b/services/search-index-lambda/Cargo.lock @@ -807,6 +807,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.45" @@ -1387,12 +1393,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -1407,10 +1414,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] diff --git a/services/tunnelbroker/Dockerfile b/services/tunnelbroker/Dockerfile index 7191452cfb..27f35812cd 100644 --- a/services/tunnelbroker/Dockerfile +++ b/services/tunnelbroker/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76-bullseye as builder +FROM rust:1.81-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \