router
router copied to clipboard
Rust v1.78.0 router-bridge startup panic
Upgrading Rust Toolchain to 1.78.0 causes panic on startup in router-bridge for --release builds
Steps to reproduce the behavior:
- Upgrade Rust toolchain to 1.78.0
- Build and Start router with
cargo run --release --(env vars omitted) - See error on startup
Output
2024-05-03T21:42:30.961533Z ERROR panicked at /Users/[redacted]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/router-bridge-0.5.18+v2.7.2/src/worker.rs:101:38: called 'Result::unwrap()' on an 'Err' value: TypeError: Error parsing args at position 1: serde_v8 error: invalid type; expected: object, got: string at send (worker.js:54:25) at run (worker.js:171:19)
Desktop (please complete the following information):
- OS: macOS / Linux
- Version macOS 13.6.1 /
public.ecr.aws/docker/library/rust:1.78.0
We'll need to look into this — and we will — but we haven't yet made the jump to Rust v1.78.0 (currently, we are on Rust 1.76.0). We'll take some time to make the jump, so we would recommend using 1.76.0 for now.
Rust 1.76 is now over 6 months old, is there any timeline on when we can move forward on rust versions?
I agree, some of my dependencies sqlx have released security vulnerability fixes in latest versions that will only compile on rust 1.80+. Unfortunately I can't take them since this won't compile.
@abernix is it something the community can help? Is it quite easy, like updating the rust version, and fixing all warnings? Or is it something more complex, as updating dependencies first, then the project?
i have the same issue over rust 1.76 - it builds but doesn't run.
on the side i'm not sure of why we need worker.js on that project. could it be separated/optional deps?
Rust 1.76 has now been unsupported for 8 months.
@Dr-Emann i was just mentioning that it may be something bigger than rust version since i also had it for another (previous) version :|
@abernix now getting further blocked in my pipelines because cargo-platform v0.1.9` cannot be built because it requires rustc 1.78 or newer. It's a pretty common cargo dependency (cargo-machete, cargo-tarpaulin) use this, so now I'm expected to pin these to older version now to :<
Honestly, I think bumping your rust version needs to be a priority now. As mentioned previously 1.76 has been unsupported for 8 months now.
The latest dev branch dropped deno and is now on the latest rustc! It's planned to be in the next release.
I think it'd be great to release this soon-ish. CI pipelines are being blocked as many dependencies are asking for newer rustc version.
Had this problem with apollo-router: 1.57.1 but when updating to 1.59.0 it stopped. Hope this can help someone.
1.59 helps at runtime since it uses the native query planner by default, which skips invoking deno and the legacy query planner. But, the next release 1.60 will drop deno entirely and won't pin old crate versions any more at compile time, so the latest stable Rust version can be used.
Since we removed Deno from the router in 1.60.0 it is safe to update rust version. Therefore I am closing this issue.
It is advised to use the version of rust that is specified in the rust-toolchain.toml at the point of release, as this is the version that Apollo will have used for testing.