Skip to content

Update rust version to 1.77, chrono to 0.4.35 #26273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 62 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ resolver = "2"

[workspace.package]
edition = "2021"
rust-version = "1.76.0"
rust-version = "1.77.0"

[profile.dev]
split-debuginfo = "unpacked"
Expand Down
2 changes: 1 addition & 1 deletion bin/ci-builder
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

set -euo pipefail

NIGHTLY_RUST_DATE=2024-01-01
NIGHTLY_RUST_DATE=2024-02-01

cd "$(dirname "$0")/.."

Expand Down
2 changes: 1 addition & 1 deletion bin/lint-versions
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#
# lint-versions - Check rust version

grep "rust-version = " Cargo.toml | grep -q "1\.76\.0" || \
grep "rust-version = " Cargo.toml | grep -q "1\.77\.0" || \
(echo "Please validate new Rust versions for compilation time performance regressions or ask Team Testing to do so. Afterwards change the tested version in bin/lint-versions" && exit 1)
12 changes: 6 additions & 6 deletions ci/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,18 @@ RUN mkdir rust \
&& tar -xzf rust-src.tar.gz -C /usr/local/lib/rustlib/src/rust --strip-components=1 \
&& rm -f rust-src.asc rust-src.tar.gz \
&& case $RUST_COMPONENTS in *miri*) \
PATH=$PATH:/root/.cargo/bin cargo miri setup \
;; \
PATH=$PATH:/root/.cargo/bin cargo miri setup \
;; \
esac \
&& curl -fsSL https://static.rust-lang.org/dist$RUST_DATE/rust-std-$RUST_VERSION-wasm32-unknown-unknown.tar.gz > rust.tar.gz \
&& curl -fsSL https://static.rust-lang.org/dist$RUST_DATE/rust-std-$RUST_VERSION-wasm32-unknown-unknown.tar.gz.asc > rust.asc \
&& gpg --verify rust.asc rust.tar.gz \
&& tar -xzf rust.tar.gz -C /usr/local/lib/rustlib/ --strip-components=4 \
&& rm -rf rust.asc rust.tar.gz rust \
&& cargo install --root /usr/local --version "=0.8.0" --locked cargo-vet \
&& cargo install --root /usr/local --version "=0.6.0" --locked cargo-about \
&& cargo install --root /usr/local --version "=0.6.1" --locked cargo-about \
&& cargo install --root /usr/local --version "=2.0.2" --locked cargo-deb \
&& cargo install --root /usr/local --version "=0.12.2" --locked cargo-deny \
&& cargo install --root /usr/local --version "=0.14.20" --locked cargo-deny \
&& cargo install --root /usr/local --version "=0.1.0" --locked cargo-deplint \
&& cargo install --root /usr/local --version ="0.9.28" --locked cargo-hakari \
&& cargo install --root /usr/local --version "=0.9.63" --locked cargo-nextest \
Expand Down Expand Up @@ -261,13 +261,13 @@ RUN if [ $ARCH_GCC = x86_64 ]; then \
# Install KinD and kubectl

RUN curl -fsSL https://kind.sigs.k8s.io/dl/v0.14.0/kind-linux-$ARCH_GO > /usr/local/bin/kind \
&& chmod +x /usr/local/bin/kind
&& chmod +x /usr/local/bin/kind

RUN if [ $ARCH_GO = amd64 ]; then echo 'af5e8331f2165feab52ec2ae07c427c7b66f4ad044d09f253004a20252524c8b /usr/local/bin/kind' | sha256sum --check; fi
RUN if [ $ARCH_GO = arm64 ]; then echo '95c9601f21fdb2c286442339d5e370149b4fe2fc7c49f615647e4e27bdfb17e2 /usr/local/bin/kind' | sha256sum --check; fi

RUN curl -fsSL https://dl.k8s.io/release/v1.24.3/bin/linux/$ARCH_GO/kubectl > /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl
&& chmod +x /usr/local/bin/kubectl

RUN if [ $ARCH_GO = amd64 ]; then echo '8a45348bdaf81d46caf1706c8bf95b3f431150554f47d444ffde89e8cdd712c1 /usr/local/bin/kubectl' | sha256sum --check; fi
RUN if [ $ARCH_GO = arm64 ]; then echo 'bdad4d3063ddb7bfa5ecf17fb8b029d5d81d7d4ea1650e4369aafa13ed97149a /usr/local/bin/kubectl' | sha256sum --check; fi
Expand Down
9 changes: 9 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ skip = [
{ name = "windows_x86_64_gnullvm", version = "0.42.0" },
{ name = "windows_x86_64_gnu", version = "0.42.0" },
{ name = "windows_x86_64_msvc", version = "0.42.0" },
{ name = "windows-targets", version = "0.48.0" },
{ name = "windows-sys", version = "0.48.0" },
{ name = "windows_aarch64_gnullvm", version = "0.48.0" },
{ name = "windows_aarch64_msvc", version = "0.48.0" },
{ name = "windows_i686_gnu", version = "0.48.0" },
{ name = "windows_i686_msvc", version = "0.48.0" },
{ name = "windows_x86_64_gnullvm", version = "0.48.0" },
{ name = "windows_x86_64_gnu", version = "0.48.0" },
{ name = "windows_x86_64_msvc", version = "0.48.0" },
# Newer versions of crates like `tempfile` are held back by crates like `atty`.
# This is very Unfortunate as we don't actually use these platforms.
{ name = "hermit-abi", version = "0.1.6" },
Expand Down
60 changes: 60 additions & 0 deletions misc/cargo-vet/audits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@ who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "1.0.1"

[[audits.chrono]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.4.35"

[[audits.chrono-tz]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.8.1"

[[audits.chrono-tz-build]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.1.0"

[[audits.chrono-tz-build]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.2.1"

[[audits.core_affinity]]
who = "Jan Teske <jteske@posteo.net>"
criteria = "safe-to-deploy"
Expand Down Expand Up @@ -316,6 +336,46 @@ who = "Gus Wynn <gus@materialize.com>"
criteria = "maintained-and-necessary"
version = "0.2.4"

[[audits.windows-targets]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.52.4"

[[audits.windows_aarch64_gnullvm]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.52.4"

[[audits.windows_aarch64_msvc]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.52.4"

[[audits.windows_i686_gnu]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.52.4"

[[audits.windows_i686_msvc]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.52.4"

[[audits.windows_x86_64_gnu]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.52.4"

[[audits.windows_x86_64_gnullvm]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.52.4"

[[audits.windows_x86_64_msvc]]
who = "Roshan Jobanputra <roshan@materialize.com>"
criteria = "safe-to-deploy"
version = "0.52.4"

[[audits.winreg]]
who = "Matt Jibson <matt.jibson@gmail.com>"
criteria = "safe-to-deploy"
Expand Down
12 changes: 0 additions & 12 deletions misc/cargo-vet/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,6 @@ criteria = "safe-to-deploy"
version = "0.3.0"
criteria = "safe-to-deploy"

[[exemptions.chrono]]
version = "0.4.25"
criteria = "safe-to-deploy"

[[exemptions.chrono-tz]]
version = "0.8.1"
criteria = "safe-to-deploy"

[[exemptions.chrono-tz-build]]
version = "0.1.0"
criteria = "safe-to-deploy"

[[exemptions.chunked_transfer]]
version = "1.4.0"
criteria = "safe-to-deploy"
Expand Down
19 changes: 15 additions & 4 deletions misc/python/materialize/mzbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,11 @@ def generate_cargo_build_command(
rustflags = (
rustc_flags.coverage
if rd.coverage
else rustc_flags.sanitizer[rd.sanitizer]
if rd.sanitizer != Sanitizer.none
else ["--cfg=tokio_unstable"]
else (
rustc_flags.sanitizer[rd.sanitizer]
if rd.sanitizer != Sanitizer.none
else ["--cfg=tokio_unstable"]
)
)
cflags = (
[
Expand Down Expand Up @@ -428,7 +430,16 @@ def copy(exe: Path) -> None:
# Some crates are built for both the host and the target.
# Ignore the built-for-host out dir.
continue
package = message["package_id"].split()[0]
# parse the package name from a package_id that looks like one of:
# git+https://github.com/MaterializeInc/rust-server-sdk#launchdarkly-server-sdk@1.0.0
# path+file:///Users/roshan/materialize/src/catalog#mz-catalog@0.0.0
# registry+https://github.com/rust-lang/crates.io-index#num-rational@0.4.0
# file:///path/to/my-package#0.1.0
package_id = message["package_id"]
if "@" in package_id:
package = package_id.split("@")[0].split("#")[-1]
else:
package = message["package_id"].split("#")[0].split("/")[-1]
Comment on lines +433 to +442
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this change required? Maybe the upgrade to Rust 1.77 changed output of cargo build?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the spec of package-id was updated in the json output: rust-lang/cargo#13311

took a while to figure this out.

for src, dst in self.extract.get(package, {}).items():
spawn.runv(["cp", "-R", out_dir / src, self.path / dst])

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ anyhow = "1.0.66"
async-trait = "0.1.68"
bytes = "1.3.0"
bytesize = "1.1.0"
chrono = { version = "0.4.23", default-features = false, features = ["std"] }
chrono = { version = "0.4.35", default-features = false, features = ["std"] }
dec = "0.4.8"
deadpool-postgres = "0.10.3"
derivative = "2.2.0"
Expand Down
2 changes: 0 additions & 2 deletions src/adapter/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4134,7 +4134,6 @@ impl SessionCatalog for ConnCatalog<'_> {
mod tests {
use std::collections::{BTreeMap, BTreeSet};
use std::sync::Arc;
use std::time::{Duration, Instant};
use std::{env, iter};

use itertools::Itertools;
Expand Down Expand Up @@ -5247,7 +5246,6 @@ mod tests {

// Execute the function as much as possible, ensuring no panics occur, but
// otherwise ignoring eval errors. We also do various other checks.
let start = Instant::now();
let res = (op.0)(&ecx, scalars, &imp.params, vec![]);
if let Ok(hir) = res {
if let Ok(mut mir) = hir.lower_uncorrelated() {
Expand Down
Loading