Skip to content
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

joystream-node docker build failing with recent cargo-chef #4745

Closed
mnaamani opened this issue Apr 24, 2023 · 1 comment · Fixed by #4744
Closed

joystream-node docker build failing with recent cargo-chef #4745

mnaamani opened this issue Apr 24, 2023 · 1 comment · Fixed by #4744
Assignees

Comments

@mnaamani
Copy link
Member

Attempting to build joystream/node docker image from a clean slate is failing.

docker system prune --all
docker build . --file joystream-node.Dockerfile --tag joystream/node:testbuild
   Compiling cargo-chef v0.1.59
    Finished release [optimized] target(s) in 44.23s
  Installing /usr/local/cargo/bin/cargo-chef
   Installed package `cargo-chef v0.1.59` (executable `cargo-chef`)
Removing intermediate container 74f0c28f8cfc
 ---> c55bfa6faf31
Step 11/57 : FROM rust AS planner
 ---> c55bfa6faf31
Step 12/57 : LABEL description="Cargo chef prepare"
 ---> Running in 653203b36bac
Removing intermediate container 653203b36bac
 ---> b5234f05fe06
Step 13/57 : WORKDIR /joystream
 ---> Running in f28cf3396fdb
Removing intermediate container f28cf3396fdb
 ---> 198355b01ff4
Step 14/57 : COPY Cargo.toml .
 ---> d8bbfbf5b73f
Step 15/57 : COPY Cargo.lock .
 ---> f031046d02e4
Step 16/57 : COPY bin ./bin
 ---> f2c6700a3ed2
Step 17/57 : COPY runtime ./runtime
 ---> 589828bdacaf
Step 18/57 : COPY runtime-modules ./runtime-modules
 ---> 330a085d0683
Step 19/57 : RUN cargo chef prepare --recipe-path /joystream/recipe.json
 ---> Running in d3c929fc5585
Removing intermediate container d3c929fc5585
 ---> a53ca675d637
Step 20/57 : FROM rust AS cacher
 ---> c55bfa6faf31
Step 21/57 : LABEL description="Cargo chef cook dependencies"
 ---> Running in 6208505118b2
Removing intermediate container 6208505118b2
 ---> d417dec3c014
Step 22/57 : WORKDIR /joystream
 ---> Running in 685f999edfee
Removing intermediate container 685f999edfee
 ---> c8ff8e544137
Step 23/57 : COPY --from=planner /joystream/recipe.json /joystream/recipe.json
 ---> 7429da54c320
Step 24/57 : ARG WASM_BUILD_TOOLCHAIN=nightly-2022-05-11
 ---> Running in 5ec53ca588ab
Removing intermediate container 5ec53ca588ab
 ---> 50376716af41
Step 25/57 : RUN cargo chef cook --release --recipe-path /joystream/recipe.json
 ---> Running in 792a91aacefe
    Updating git repository `https://github.com/bwhm/ss58-registry`
    Updating crates.io index
    Updating git repository `https://github.com/joystream/substrate.git`
error: no matching package found
searched package name: `pallet-utility`
prerelease package needs to be specified explicitly
pallet-utility = { version = "4.0.0-dev" }
location searched: https://github.com/joystream/substrate.git?rev=d29a53b11c3e530d1656eef502cb0f1f8fff3522#d29a53b1
required by package `joystream-node-runtime v0.0.1 (/joystream/runtime)`
thread 'main' panicked at 'Exited with status code: 101', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-chef-0.1.59/src/recipe.rs:189:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The command '/bin/sh -c cargo chef cook --release --recipe-path /joystream/recipe.json' returned a non-zero code: 101

Possible issues, we don't install a specific version of cargo-chef so it may be new behavior that is problematic.

@mnaamani mnaamani self-assigned this Apr 24, 2023
@mnaamani mnaamani changed the title Recent docker build fails for joystream-node joystream-node docker build failing with recent cargo-chef Apr 24, 2023
@mnaamani
Copy link
Member Author

mnaamani commented Apr 25, 2023

Latest version of cargo-chef is v0.1.59, build also fails also with v0.1.58 same error.
Build is successful with cargo-chef@0.1.57, will confirm that produced wasm blob is identical to previous builds.

The breaking change

Proposed fix for master branch, update joystream-node.Dockerfile to install cargo-chef@0.1.57
Proposed long term fix, rename the joystream pallet-utility crate to not clash with the create from substrate repo. Will add this to #4705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant