From 483f1f0b2d56f3a2334765427d7519a8c7fbab93 Mon Sep 17 00:00:00 2001 From: Peter Somogyvari Date: Wed, 12 Jan 2022 15:42:37 -0800 Subject: [PATCH] test(test-tooling): fix flaky rustc-container-target-nodejs.test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The problem was that the Rust compiler version we were using (v1.52.x) seem to have gotten outdated and it would no longer work with wasm-pack. To provide a fix I upgraded the base image of the container to come with Rust v1.57.x and now the build error[1] is no longer present and the test case is passing with the new image that was pushed to ghcr.io. The image tag this was pushed as is: ghcr.io/hyperledger/cactus-rust-compiler:2022-01-12-15d4793c---fix-1646 which is now also the default tag that the RustcContainer class uses in the test-tooling package. [1]: ```sh Compiling bumpalo v3.9.1 error[E0658]: arbitrary expressions in key-value attributes are unstable --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/bumpalo-3.9.1/src/lib.rs:1:10 | 1 | #![doc = include_str!("../README.md")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #78835 for more information Compiling wasm-bindgen v0.2.78 error: aborting due to previous error For more information about this error, try `rustc --explain E0658`. error: could not compile `bumpalo` ``` Fixes #1646 Signed-off-by: Peter Somogyvari Signed-off-by: aldousalvarez --- .../src/main/typescript/rustc-container/rustc-container.ts | 2 +- tools/docker/rust-compiler/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cactus-test-tooling/src/main/typescript/rustc-container/rustc-container.ts b/packages/cactus-test-tooling/src/main/typescript/rustc-container/rustc-container.ts index 5030ec31c7..3d4718f628 100644 --- a/packages/cactus-test-tooling/src/main/typescript/rustc-container/rustc-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/rustc-container/rustc-container.ts @@ -89,7 +89,7 @@ export class RustcContainer { this.hostSourceDir = Optional.ofNullable(opts.hostSourceDir); this.imageName = opts.imageName || "ghcr.io/hyperledger/cactus-rust-compiler"; - this.imageTag = opts.imageTag || "1.0.3"; + this.imageTag = opts.imageTag || "2022-01-12-15d4793c---fix-1646"; this.imageFqn = `${this.imageName}:${this.imageTag}`; this.envVars = opts.envVars || new Map(); this.emitContainerLogs = Bools.isBooleanStrict(opts.emitContainerLogs) diff --git a/tools/docker/rust-compiler/Dockerfile b/tools/docker/rust-compiler/Dockerfile index 8f67060dfd..e70466317e 100644 --- a/tools/docker/rust-compiler/Dockerfile +++ b/tools/docker/rust-compiler/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.52.1-slim-bullseye +FROM rust:1.57.0-slim-bullseye RUN apt update