Skip to content

Commit

Permalink
ci: bump pinned Rust to 1.70 (#967)
Browse files Browse the repository at this point in the history
* ci: pin 1.70

* feat: replace OnceCell with std::sync::OnceCell

* feat: removed once_cell dependency from common (but this commit is actually just to trigger CI)

* fix: cargo fmt

* fix: typo

* fix: more typos

* fix: typo

* fix: clippy

* fix: clippy allow

* fix: change std::sync::OnceLock back to once_cell to check if that is what is causing Rocket to fail

* fix: cargo cmt

* fix: add default toolchain option

* fix: typo

* fix: refactor BufReader writing to not ignore clippy warning

* fix: unecessary if...let

---------

Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
  • Loading branch information
iamwacko and iulianbarbu authored Jun 7, 2023
1 parent 7c01a73 commit 316b7a3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 30 deletions.
25 changes: 6 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ orbs:
executors:
docker-rust:
docker:
- image: cimg/rust:1.68.0
- image: cimg/rust:1.70.0
resource_class: small
image-ubuntu:
machine:
Expand Down Expand Up @@ -115,7 +115,7 @@ commands:
- run:
name: Install Rust
command: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target add wasm32-wasi
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.70.0 --target add wasm32-wasi
sudo apt update && sudo apt install -y libssl1.1
install-protoc:
parameters:
Expand Down Expand Up @@ -172,8 +172,6 @@ jobs:
workspace:
executor: docker-rust
resource_class: xlarge
environment:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
steps:
- checkout
- restore-cargo-cache
Expand Down Expand Up @@ -206,8 +204,6 @@ jobs:
type: string
default: --all-features
executor: docker-rust
environment:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
steps:
- checkout
- restore-cargo-cache
Expand Down Expand Up @@ -255,8 +251,6 @@ jobs:
- save-cargo-cache
e2e-test:
executor: image-ubuntu
environment:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
steps:
- install-rust
- checkout
Expand Down Expand Up @@ -288,8 +282,6 @@ jobs:
when: always
build-and-push:
executor: image-ubuntu
environment:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
parameters:
aws-access-key-id:
description: "AWS cli access key id"
Expand Down Expand Up @@ -388,8 +380,6 @@ jobs:
machine:
image: << parameters.image >>
resource_class: << parameters.resource_class >>
environment:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
parameters:
target:
description: "Linux target to build for"
Expand All @@ -405,7 +395,7 @@ jobs:
- run: sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt install -y libssl-dev musl-tools clang
- run:
name: Install Rust
command: curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.68.0 --target << parameters.target >>
command: curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.70.0 --target << parameters.target >>
- run:
name: Build
command: |
Expand All @@ -422,15 +412,14 @@ jobs:
shell: bash.exe
environment:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
steps:
- checkout
- run: choco install -y strawberryperl
- run:
name: Install Rust
command: |
wget -OutFile "C:\rustup-init.exe" https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe
C:\rustup-init.exe -y --default-toolchain 1.68.0 --target x86_64-pc-windows-msvc
C:\rustup-init.exe -y --default-toolchain 1.70.0 --target x86_64-pc-windows-msvc
shell: powershell.exe
- run:
name: Build
Expand All @@ -448,13 +437,11 @@ jobs:
macos:
xcode: 12.5.1
resource_class: medium
environment:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
steps:
- checkout
- run:
name: Install Rust
command: curl --proto '=https' https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.68.0 --target x86_64-apple-darwin
command: curl --proto '=https' https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.70.0 --target x86_64-apple-darwin
- run:
name: Build
command: |
Expand Down Expand Up @@ -568,7 +555,7 @@ jobs:
name: Install Rust
command: |
wget -OutFile "C:\rustup-init.exe" https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe
C:\rustup-init.exe -y --default-toolchain 1.68.0 --target x86_64-pc-windows-msvc
C:\rustup-init.exe -y --default-toolchain 1.70.0 --target x86_64-pc-windows-msvc
- run:
name: "Install Shuttle"
command: ..\.cargo\bin\cargo.exe install cargo-shuttle --path ./cargo-shuttle
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ BUILDX_FLAGS=$(BUILDX_OP) $(PLATFORM_FLAGS) $(CACHE_FLAGS)

# the rust version used by our containers, and as an override for our deployers
# ensuring all user crates are compiled with the same rustc toolchain
RUSTUP_TOOLCHAIN=1.68.0
RUSTUP_TOOLCHAIN=1.70.0

TAG?=$(shell git describe --tags)
BACKEND_TAG?=$(TAG)
Expand Down
2 changes: 1 addition & 1 deletion common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ http-body = { version = "0.4.5", optional = true }
http-serde = { version = "1.1.2", optional = true }
hyper = { workspace = true, optional = true }
jsonwebtoken = { workspace = true, optional = true }
once_cell = { workspace = true, optional = true }
opentelemetry = { workspace = true, optional = true }
opentelemetry-http = { workspace = true, optional = true }
opentelemetry-otlp = { version = "0.12.0", optional = true }
Expand All @@ -36,6 +35,7 @@ strum = { workspace = true, features = ["derive"] }
sqlx = { workspace = true, optional = true, features = ["runtime-tokio-native-tls"] }
thiserror = { workspace = true, optional = true }
tonic = { workspace = true, optional = true }
once_cell = { workspace = true, optional = true }
tower = { workspace = true, optional = true }
tower-http = { workspace = true, optional = true }
tracing = { workspace = true, features = ["std"] }
Expand Down
13 changes: 5 additions & 8 deletions deployer/src/deployment/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,11 @@ async fn run_pre_deploy_tests(

let stdout = cmd.stdout.take().unwrap();
let stdout_reader = BufReader::new(stdout);
stdout_reader
.lines()
.filter_map(|line| line.ok())
.for_each(|line| {
if let Err(error) = write.send(format!("{}\n", line.trim_end_matches('\n'))) {
error!("failed to send line to pipe: {error}");
}
});
for line in stdout_reader.lines().flatten() {
if let Err(error) = write.send(format!("{}\n", line.trim_end_matches('\n'))) {
error!("failed to send to pipe: {error}");
}
}

if cmd.wait().map_err(TestError::Run)?.success() {
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ in
pkg-config
];
buildInputs = with nixpkgs; [
((rustChannelOf{ channel = "1.68.0"; }).rust.override {
((rustChannelOf{ channel = "1.70.0"; }).rust.override {
extensions = ["rust-src"];
targets = ["wasm32-wasi"];
})
Expand Down

0 comments on commit 316b7a3

Please sign in to comment.