From 9188741ee4bc34820ee0a92d517a529adc4657c3 Mon Sep 17 00:00:00 2001 From: Sebastian Wolfram Date: Wed, 27 Nov 2024 16:45:43 +0100 Subject: [PATCH 1/4] update grpc platform to 'ubuntu-24.04' --- .github/workflows/build-and-test-grpc.yml | 4 ++-- .github/workflows/grpc-publish-to-dockerhub.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test-grpc.yml b/.github/workflows/build-and-test-grpc.yml index 2a561bd952..3dbfeba606 100644 --- a/.github/workflows/build-and-test-grpc.yml +++ b/.github/workflows/build-and-test-grpc.yml @@ -19,7 +19,7 @@ on: jobs: check-for-run-condition: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: should-run: ${{ !github.event.pull_request || github.event.pull_request.draft == false }} steps: @@ -27,7 +27,7 @@ jobs: # this run step does nothing, but is needed to get the job output build-and-test: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out the repo uses: actions/checkout@v4 diff --git a/.github/workflows/grpc-publish-to-dockerhub.yml b/.github/workflows/grpc-publish-to-dockerhub.yml index 348bf8c564..802d093ffb 100644 --- a/.github/workflows/grpc-publish-to-dockerhub.yml +++ b/.github/workflows/grpc-publish-to-dockerhub.yml @@ -20,7 +20,7 @@ jobs: push_to_registry: environment: release name: Push Docker image to Docker Hub - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out the repo uses: actions/checkout@v4 From 3488e7688e05ed09938b360d3370c7deb6c22fab Mon Sep 17 00:00:00 2001 From: Sebastian Wolfram Date: Wed, 27 Nov 2024 17:13:23 +0100 Subject: [PATCH 2/4] revert ubuntu change for gRPC and add libssl-dev install to Dockerfile --- .github/workflows/build-and-test-grpc.yml | 4 ++-- .github/workflows/grpc-publish-to-dockerhub.yml | 2 +- bindings/grpc/Dockerfile | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test-grpc.yml b/.github/workflows/build-and-test-grpc.yml index 3dbfeba606..2a561bd952 100644 --- a/.github/workflows/build-and-test-grpc.yml +++ b/.github/workflows/build-and-test-grpc.yml @@ -19,7 +19,7 @@ on: jobs: check-for-run-condition: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest outputs: should-run: ${{ !github.event.pull_request || github.event.pull_request.draft == false }} steps: @@ -27,7 +27,7 @@ jobs: # this run step does nothing, but is needed to get the job output build-and-test: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: - name: Check out the repo uses: actions/checkout@v4 diff --git a/.github/workflows/grpc-publish-to-dockerhub.yml b/.github/workflows/grpc-publish-to-dockerhub.yml index 802d093ffb..348bf8c564 100644 --- a/.github/workflows/grpc-publish-to-dockerhub.yml +++ b/.github/workflows/grpc-publish-to-dockerhub.yml @@ -20,7 +20,7 @@ jobs: push_to_registry: environment: release name: Push Docker image to Docker Hub - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: - name: Check out the repo uses: actions/checkout@v4 diff --git a/bindings/grpc/Dockerfile b/bindings/grpc/Dockerfile index b7faca7c63..f18e3bb727 100644 --- a/bindings/grpc/Dockerfile +++ b/bindings/grpc/Dockerfile @@ -1,7 +1,11 @@ FROM rust:bookworm as builder +# update packages +RUN apt-get update # install protobuf -RUN apt-get update && apt-get install -y protobuf-compiler libprotobuf-dev musl-tools +RUN apt-get install -y protobuf-compiler libprotobuf-dev musl-tools +# install openssl dev dependencies +RUN apt-get install -y libssl-dev COPY . /usr/src/app/ WORKDIR /usr/src/app/bindings/grpc From 77380afa9cec1b8f22605a121c9752ed0b737df8 Mon Sep 17 00:00:00 2001 From: Sebastian Wolfram Date: Wed, 27 Nov 2024 18:17:33 +0100 Subject: [PATCH 3/4] re-add openssl dep to gRPC bindings, revert apt-get changes in docker build --- bindings/grpc/Cargo.toml | 1 + bindings/grpc/Dockerfile | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bindings/grpc/Cargo.toml b/bindings/grpc/Cargo.toml index cf06a08316..c6f5b180c6 100644 --- a/bindings/grpc/Cargo.toml +++ b/bindings/grpc/Cargo.toml @@ -26,6 +26,7 @@ identity_storage = { path = "../../identity_storage", features = ["memstore"] } identity_stronghold = { path = "../../identity_stronghold", features = ["send-sync-storage"] } iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", rev = "39c83ddcf07894cdee2abd146381d8704205e6e9" } iota-sdk-legacy = { package = "iota-sdk", version = "1.1.2", features = ["stronghold"] } +openssl = { version = "0.10", features = ["vendored"] } # this is not an unused dependency but required for the docker build prost = "0.13" rand = "0.8.5" serde = { version = "1.0", features = ["derive", "alloc"] } diff --git a/bindings/grpc/Dockerfile b/bindings/grpc/Dockerfile index f18e3bb727..b7faca7c63 100644 --- a/bindings/grpc/Dockerfile +++ b/bindings/grpc/Dockerfile @@ -1,11 +1,7 @@ FROM rust:bookworm as builder -# update packages -RUN apt-get update # install protobuf -RUN apt-get install -y protobuf-compiler libprotobuf-dev musl-tools -# install openssl dev dependencies -RUN apt-get install -y libssl-dev +RUN apt-get update && apt-get install -y protobuf-compiler libprotobuf-dev musl-tools COPY . /usr/src/app/ WORKDIR /usr/src/app/bindings/grpc From 64cca92492295e547a4041f083167cc188a779bf Mon Sep 17 00:00:00 2001 From: Sebastian Wolfram Date: Wed, 27 Nov 2024 18:31:34 +0100 Subject: [PATCH 4/4] limit openssl dependency for `x86_64-unknown-linux-musl` target in gRPC bindings --- bindings/grpc/Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bindings/grpc/Cargo.toml b/bindings/grpc/Cargo.toml index c6f5b180c6..85c26daa78 100644 --- a/bindings/grpc/Cargo.toml +++ b/bindings/grpc/Cargo.toml @@ -26,7 +26,6 @@ identity_storage = { path = "../../identity_storage", features = ["memstore"] } identity_stronghold = { path = "../../identity_stronghold", features = ["send-sync-storage"] } iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", rev = "39c83ddcf07894cdee2abd146381d8704205e6e9" } iota-sdk-legacy = { package = "iota-sdk", version = "1.1.2", features = ["stronghold"] } -openssl = { version = "0.10", features = ["vendored"] } # this is not an unused dependency but required for the docker build prost = "0.13" rand = "0.8.5" serde = { version = "1.0", features = ["derive", "alloc"] } @@ -39,6 +38,9 @@ tracing = { version = "0.1.40", features = ["async-await"] } tracing-subscriber = "0.3.18" url = { version = "2.5", default-features = false } +[target.x86_64-unknown-linux-musl.dependencies] +openssl = { version = "0.10", features = ["vendored"] } # this is not an unused dependency but required for the docker build + [dev-dependencies] fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "5f2c63266a065996d53f98156f0412782b468597", package = "fastcrypto" } identity_storage = { path = "../../identity_storage", features = ["memstore"] }