From ee31582966a7a99f6d6ce592effc39463ceaeb6f Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 10:22:28 -0800 Subject: [PATCH 01/21] chore: fix lint, cargo build CI steps failing (exploratory) --- .github/workflows/cargo-build.yml | 3 ++- .github/workflows/lint.yml | 3 ++- .github/workflows/prepare-dfx-assets.yml | 32 ++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/prepare-dfx-assets.yml diff --git a/.github/workflows/cargo-build.yml b/.github/workflows/cargo-build.yml index 82ee2adc76..28da0db844 100644 --- a/.github/workflows/cargo-build.yml +++ b/.github/workflows/cargo-build.yml @@ -9,9 +9,10 @@ jobs: builds: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: rust: [ '1.55.0' ] - os: [ ubuntu-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest, ubuntu-20.04 ] steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f739011575..9659e183ed 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,9 +7,10 @@ jobs: name: lint runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: rust: [ '1.55.0' ] - os: [ ubuntu-latest, macos-latest ] + os: [ ubuntu-latest, macos-latest, ubuntu-20.04 ] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/prepare-dfx-assets.yml b/.github/workflows/prepare-dfx-assets.yml new file mode 100644 index 0000000000..4a1fc159b7 --- /dev/null +++ b/.github/workflows/prepare-dfx-assets.yml @@ -0,0 +1,32 @@ +name: Check prepare dfx assets +on: + pull_request: + push: + branches: + - master + +jobs: + builds: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + rust: [ '1.55.0' ] + os: [ ubuntu-latest, macos-latest, ubuntu-20.04 ] + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Install Rust + run: | + rustup update ${{ matrix.rust }} --no-self-update + rustup component add clippy + rustup default ${{ matrix.rust }} + + - name: Prepare dfx assets + run: scripts/prepare-dfx-assets.sh From e0c105051e47fa04839155b8b1ee37c3fc03f091 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 10:24:33 -0800 Subject: [PATCH 02/21] output dir --- .github/workflows/prepare-dfx-assets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-dfx-assets.yml b/.github/workflows/prepare-dfx-assets.yml index 4a1fc159b7..074e7c0753 100644 --- a/.github/workflows/prepare-dfx-assets.yml +++ b/.github/workflows/prepare-dfx-assets.yml @@ -29,4 +29,4 @@ jobs: rustup default ${{ matrix.rust }} - name: Prepare dfx assets - run: scripts/prepare-dfx-assets.sh + run: scripts/prepare-dfx-assets.sh aaa From 1aeb79b959d23f5178a8f6651934ddf7345a4127 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 10:46:59 -0800 Subject: [PATCH 03/21] Modify linux replica.gz sha256 --- nix/sources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/sources.json b/nix/sources.json index 62d40ab349..971f7ab18f 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -131,7 +131,7 @@ "replica-x86_64-linux": { "builtin": false, "rev": "5ba08e57d607fc8fb159013fe30e46302cb4667d", - "sha256": "1faaxsklhqbc3pjw1fvnhzqlap3zzgjw4g07phzpz9drm8d0zah2", + "sha256": "1mngh4v9rk37yn3c0lmm7j5kg3wi6mpijhshl4gzsqkkm5ivcbpj", "type": "file", "url": "https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/replica.gz", "url_template": "https://download.dfinity.systems/ic//nix-release/replica.gz" From 5d123e4fd8fbb55a2ad3cd90577de064c9b2336d Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 10:49:44 -0800 Subject: [PATCH 04/21] but why does e2e work --- .github/workflows/e2e.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e0ff59809a..acc6194ed8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -29,6 +29,10 @@ jobs: rustup update ${{ matrix.rust }} --no-self-update rustup default ${{ matrix.rust }} rustup component add rustfmt + - name: Prepare dfx assets + run: scripts/prepare-dfx-assets.sh aaaa + env: + OPENSSL_STATIC: yes - name: Build run: cargo build --locked --release env: From 9ed8c0861317fa3457a84732236be4671c0bd9a4 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 10:52:05 -0800 Subject: [PATCH 05/21] write dfx assets sources --- scripts/dfx-asset-sources.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dfx-asset-sources.sh b/scripts/dfx-asset-sources.sh index bc929a98e5..3114c526a4 100644 --- a/scripts/dfx-asset-sources.sh +++ b/scripts/dfx-asset-sources.sh @@ -13,7 +13,7 @@ MOTOKO_X86_64_LINUX_SHA256="5ee769d7dd6b3a5d3daf84ced9bf50fa42a39925188d46b5f4be MOTOKO_X86_64_LINUX_URL="https://github.com/dfinity/motoko/releases/download/0.6.14/motoko-linux64-0.6.14.tar.gz" REPLICA_X86_64_DARWIN_SHA256="a61dd1c68dab0a0a99557b2919002dd94233af281339f00e4dfd4f3191107fd4" REPLICA_X86_64_DARWIN_URL="https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/replica.gz" -REPLICA_X86_64_LINUX_SHA256="02aa0f1aaab9a57f3fbc073cc2e5fb7f5c45f18776bbc0e51d6c6148a7ee4ab9" +REPLICA_X86_64_LINUX_SHA256="f22eb663a97362fd1fa15043196f35918f378b3cb552c086f567cc9c3681cfd6" REPLICA_X86_64_LINUX_URL="https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/replica.gz" ICX_PROXY_BRANCH="main" ICX_PROXY_REV="d2cd4d822be4fa8d0af2f27e4dcc635d2032fcfb" From 5aac69b9a09e7ccace4f52bd2a3f739a89a6e178 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 10:54:41 -0800 Subject: [PATCH 06/21] Revert "write dfx assets sources" This reverts commit 9ed8c0861317fa3457a84732236be4671c0bd9a4. --- scripts/dfx-asset-sources.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dfx-asset-sources.sh b/scripts/dfx-asset-sources.sh index 3114c526a4..bc929a98e5 100644 --- a/scripts/dfx-asset-sources.sh +++ b/scripts/dfx-asset-sources.sh @@ -13,7 +13,7 @@ MOTOKO_X86_64_LINUX_SHA256="5ee769d7dd6b3a5d3daf84ced9bf50fa42a39925188d46b5f4be MOTOKO_X86_64_LINUX_URL="https://github.com/dfinity/motoko/releases/download/0.6.14/motoko-linux64-0.6.14.tar.gz" REPLICA_X86_64_DARWIN_SHA256="a61dd1c68dab0a0a99557b2919002dd94233af281339f00e4dfd4f3191107fd4" REPLICA_X86_64_DARWIN_URL="https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/replica.gz" -REPLICA_X86_64_LINUX_SHA256="f22eb663a97362fd1fa15043196f35918f378b3cb552c086f567cc9c3681cfd6" +REPLICA_X86_64_LINUX_SHA256="02aa0f1aaab9a57f3fbc073cc2e5fb7f5c45f18776bbc0e51d6c6148a7ee4ab9" REPLICA_X86_64_LINUX_URL="https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/replica.gz" ICX_PROXY_BRANCH="main" ICX_PROXY_REV="d2cd4d822be4fa8d0af2f27e4dcc635d2032fcfb" From bb40a5d8db221bb51a7d3d32cd93521ad535efe4 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 10:54:55 -0800 Subject: [PATCH 07/21] Revert "Modify linux replica.gz sha256" This reverts commit 1aeb79b959d23f5178a8f6651934ddf7345a4127. --- nix/sources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/sources.json b/nix/sources.json index 971f7ab18f..62d40ab349 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -131,7 +131,7 @@ "replica-x86_64-linux": { "builtin": false, "rev": "5ba08e57d607fc8fb159013fe30e46302cb4667d", - "sha256": "1mngh4v9rk37yn3c0lmm7j5kg3wi6mpijhshl4gzsqkkm5ivcbpj", + "sha256": "1faaxsklhqbc3pjw1fvnhzqlap3zzgjw4g07phzpz9drm8d0zah2", "type": "file", "url": "https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/replica.gz", "url_template": "https://download.dfinity.systems/ic//nix-release/replica.gz" From ab839237e0c496851d73d4db5b5b32f9d5982e53 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 10:57:14 -0800 Subject: [PATCH 08/21] still, why does e2e build: try cleaning first --- .github/workflows/e2e.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index acc6194ed8..ca92989c19 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -29,12 +29,14 @@ jobs: rustup update ${{ matrix.rust }} --no-self-update rustup default ${{ matrix.rust }} rustup component add rustfmt - - name: Prepare dfx assets - run: scripts/prepare-dfx-assets.sh aaaa - env: - OPENSSL_STATIC: yes +# - name: Prepare dfx assets +# run: scripts/prepare-dfx-assets.sh aaaa +# env: +# OPENSSL_STATIC: yes - name: Build - run: cargo build --locked --release + run: | + cargo clean + cargo build --locked --release env: OPENSSL_STATIC: yes - name: Strip binaries From d39989da91fe704d6ce5465ad16a06802642e3d6 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 11:49:27 -0800 Subject: [PATCH 09/21] note caching of dfx assets --- .github/workflows/e2e.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ca92989c19..a218c5320a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -29,14 +29,10 @@ jobs: rustup update ${{ matrix.rust }} --no-self-update rustup default ${{ matrix.rust }} rustup component add rustfmt -# - name: Prepare dfx assets -# run: scripts/prepare-dfx-assets.sh aaaa -# env: -# OPENSSL_STATIC: yes - name: Build - run: | - cargo clean - cargo build --locked --release + # note: since there is no 'cargo clean' here, the results of scripts/prepare-dfx-assets.sh + # are often cached. + run: cargo build --locked --release env: OPENSSL_STATIC: yes - name: Strip binaries From 0a9892fb2248579ed35f2d1a4b95fd48e33ed6f3 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 11:58:22 -0800 Subject: [PATCH 10/21] use blessed urls --- nix/sources.json | 8 ++++---- scripts/dfx-asset-sources.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 62d40ab349..0c81d76abe 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -60,7 +60,7 @@ "rev": "5ba08e57d607fc8fb159013fe30e46302cb4667d", "sha256": "1jshdygx7pr0v7s4v2bm277y8jqyrpd9gdhwqmx1762nk7rqq8q0", "type": "file", - "url": "https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/ic-starter.gz", + "url": "https://download.dfinity.systems/blessed/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/ic-starter.gz", "url_template": "https://download.dfinity.systems/ic//nix-release/x86_64-darwin/ic-starter.gz" }, "ic-starter-x86_64-linux": { @@ -68,7 +68,7 @@ "rev": "5ba08e57d607fc8fb159013fe30e46302cb4667d", "sha256": "1cnib147bwmxi1hp8kwl002d0hp3pxdrmjy1s47fr3i3la18mw55", "type": "file", - "url": "https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/ic-starter.gz", + "url": "https://download.dfinity.systems/blessed/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/ic-starter.gz", "url_template": "https://download.dfinity.systems/ic//nix-release/ic-starter.gz" }, "icx-proxy": { @@ -125,7 +125,7 @@ "rev": "5ba08e57d607fc8fb159013fe30e46302cb4667d", "sha256": "1m3z228k2kzx9l7g0f8k52pk6hnr5l01jabvanchl2mbip3d27d6", "type": "file", - "url": "https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/replica.gz", + "url": "https://download.dfinity.systems/blessed/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/replica.gz", "url_template": "https://download.dfinity.systems/ic//nix-release/x86_64-darwin/replica.gz" }, "replica-x86_64-linux": { @@ -133,7 +133,7 @@ "rev": "5ba08e57d607fc8fb159013fe30e46302cb4667d", "sha256": "1faaxsklhqbc3pjw1fvnhzqlap3zzgjw4g07phzpz9drm8d0zah2", "type": "file", - "url": "https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/replica.gz", + "url": "https://download.dfinity.systems/blessed/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/replica.gz", "url_template": "https://download.dfinity.systems/ic//nix-release/replica.gz" } } diff --git a/scripts/dfx-asset-sources.sh b/scripts/dfx-asset-sources.sh index bc929a98e5..db07e552ca 100644 --- a/scripts/dfx-asset-sources.sh +++ b/scripts/dfx-asset-sources.sh @@ -4,17 +4,17 @@ IC_REF_X86_64_DARWIN_URL="https://download.dfinity.systems/ic-ref/ic-ref-0.0.1-a IC_REF_X86_64_LINUX_SHA256="9342175f9c2c4ff9174f7859f5f5c43d9f944fe91cd0237fbed448b6cf029f4b" IC_REF_X86_64_LINUX_URL="https://download.dfinity.systems/ic-ref/ic-ref-0.0.1-a432156f-x86_64-linux.tar.gz" IC_STARTER_X86_64_DARWIN_SHA256="00238cf3995698137ac51cb697dacd1e4be4cf1175894df4d920dfd39f6f50cb" -IC_STARTER_X86_64_DARWIN_URL="https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/ic-starter.gz" +IC_STARTER_X86_64_DARWIN_URL="https://download.dfinity.systems/blessed/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/ic-starter.gz" IC_STARTER_X86_64_LINUX_SHA256="a5f08a82a2238eec0ed1c1cb9a5bbfe342d00400944f746188bdf2754858d1b2" -IC_STARTER_X86_64_LINUX_URL="https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/ic-starter.gz" +IC_STARTER_X86_64_LINUX_URL="https://download.dfinity.systems/blessed/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/ic-starter.gz" MOTOKO_X86_64_DARWIN_SHA256="7c769856afaacfa435dded80daa3b7970611dc4420b48f5edee9f9d1c58f9d22" MOTOKO_X86_64_DARWIN_URL="https://github.com/dfinity/motoko/releases/download/0.6.14/motoko-macos-0.6.14.tar.gz" MOTOKO_X86_64_LINUX_SHA256="5ee769d7dd6b3a5d3daf84ced9bf50fa42a39925188d46b5f4be3a8a766327a1" MOTOKO_X86_64_LINUX_URL="https://github.com/dfinity/motoko/releases/download/0.6.14/motoko-linux64-0.6.14.tar.gz" REPLICA_X86_64_DARWIN_SHA256="a61dd1c68dab0a0a99557b2919002dd94233af281339f00e4dfd4f3191107fd4" -REPLICA_X86_64_DARWIN_URL="https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/replica.gz" +REPLICA_X86_64_DARWIN_URL="https://download.dfinity.systems/blessed/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/x86_64-darwin/replica.gz" REPLICA_X86_64_LINUX_SHA256="02aa0f1aaab9a57f3fbc073cc2e5fb7f5c45f18776bbc0e51d6c6148a7ee4ab9" -REPLICA_X86_64_LINUX_URL="https://download.dfinity.systems/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/replica.gz" +REPLICA_X86_64_LINUX_URL="https://download.dfinity.systems/blessed/ic/5ba08e57d607fc8fb159013fe30e46302cb4667d/nix-release/replica.gz" ICX_PROXY_BRANCH="main" ICX_PROXY_REV="d2cd4d822be4fa8d0af2f27e4dcc635d2032fcfb" ICX_PROXY_REPO="https://github.com/dfinity/icx-proxy" From 7ac5c92e74710f783769661ce4241788714a3502 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 12:16:27 -0800 Subject: [PATCH 11/21] . --- .github/workflows/prepare-dfx-assets.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prepare-dfx-assets.yml b/.github/workflows/prepare-dfx-assets.yml index 074e7c0753..33af78daa3 100644 --- a/.github/workflows/prepare-dfx-assets.yml +++ b/.github/workflows/prepare-dfx-assets.yml @@ -1,4 +1,7 @@ -name: Check prepare dfx assets +name: Check dfx asset preparation +# The cargo build steps in other workflows often benefit from caching of the results of this process, +# so this workflow runs it separately. + on: pull_request: push: @@ -12,7 +15,7 @@ jobs: fail-fast: false matrix: rust: [ '1.55.0' ] - os: [ ubuntu-latest, macos-latest, ubuntu-20.04 ] + os: [ ubuntu-latest, macos-latest ] steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 @@ -29,4 +32,4 @@ jobs: rustup default ${{ matrix.rust }} - name: Prepare dfx assets - run: scripts/prepare-dfx-assets.sh aaa + run: scripts/prepare-dfx-assets.sh "$(mktemp -d)" From 59efaa5df511cbbd23bd06a6c70991d67f656d02 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 12:16:36 -0800 Subject: [PATCH 12/21] cleanup --- .github/workflows/cargo-build.yml | 2 +- .github/workflows/lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cargo-build.yml b/.github/workflows/cargo-build.yml index 28da0db844..859db72d3b 100644 --- a/.github/workflows/cargo-build.yml +++ b/.github/workflows/cargo-build.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: rust: [ '1.55.0' ] - os: [ ubuntu-latest, macos-latest, ubuntu-20.04 ] + os: [ ubuntu-latest, macos-latest ] steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9659e183ed..15289a9db4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: rust: [ '1.55.0' ] - os: [ ubuntu-latest, macos-latest, ubuntu-20.04 ] + os: [ ubuntu-latest, macos-latest ] steps: - uses: actions/checkout@v2 From 4074be943971c12903c6947447eff63fa0092196 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 12:23:00 -0800 Subject: [PATCH 13/21] aggregate to required check --- .github/workflows/prepare-dfx-assets.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/prepare-dfx-assets.yml b/.github/workflows/prepare-dfx-assets.yml index 33af78daa3..1261febf68 100644 --- a/.github/workflows/prepare-dfx-assets.yml +++ b/.github/workflows/prepare-dfx-assets.yml @@ -33,3 +33,13 @@ jobs: - name: Prepare dfx assets run: scripts/prepare-dfx-assets.sh "$(mktemp -d)" + + aggregate: + name: prepare-dfx-assets:required + if: ${{ always() }} + needs: builds + runs-on: ubuntu-latest + steps: + - name: check step result directly + if: ${{ needs.builds.result != 'success' }} + run: exit 1 From caeb04f3a2fe7e7432a2b18c004fb1988c9f7bf8 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 12:24:04 -0800 Subject: [PATCH 14/21] naming is hard --- .github/workflows/prepare-dfx-assets.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prepare-dfx-assets.yml b/.github/workflows/prepare-dfx-assets.yml index 1261febf68..091394e088 100644 --- a/.github/workflows/prepare-dfx-assets.yml +++ b/.github/workflows/prepare-dfx-assets.yml @@ -9,7 +9,7 @@ on: - master jobs: - builds: + prepare: runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -37,9 +37,9 @@ jobs: aggregate: name: prepare-dfx-assets:required if: ${{ always() }} - needs: builds + needs: prepare runs-on: ubuntu-latest steps: - name: check step result directly - if: ${{ needs.builds.result != 'success' }} + if: ${{ needs.prepare.result != 'success' }} run: exit 1 From 44a0c31eb3e3874fc6fa332b5744e23c58620bad Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 14:58:06 -0800 Subject: [PATCH 15/21] diagnose pyparsing --- scripts/workflows/provision-linux.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/workflows/provision-linux.sh b/scripts/workflows/provision-linux.sh index 2d126dbd9c..615096439a 100755 --- a/scripts/workflows/provision-linux.sh +++ b/scripts/workflows/provision-linux.sh @@ -22,6 +22,13 @@ if [ "$E2E_TEST" = "tests-dfx/certificate.bash" ]; then sudo apt-get install --yes mitmproxy fi +echo "What is happening with pyparsing" +python3 --version +python3 -c " +import pyparsing as pp +print(pp.__version__) +" + # Set environment variables. BATS_SUPPORT="/usr/local/lib/bats-support" echo "BATSLIB=${BATS_SUPPORT}" >> "$GITHUB_ENV" From ade1d9e7323ce67e469d9b4d1dcce65fec24e4da Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 15:28:54 -0800 Subject: [PATCH 16/21] try pyparsing 2.4.6 --- scripts/workflows/provision-linux.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/workflows/provision-linux.sh b/scripts/workflows/provision-linux.sh index 615096439a..f502996d66 100755 --- a/scripts/workflows/provision-linux.sh +++ b/scripts/workflows/provision-linux.sh @@ -19,7 +19,10 @@ rm v$version.tar.gz # Packages needed for some tests if [ "$E2E_TEST" = "tests-dfx/certificate.bash" ]; then - sudo apt-get install --yes mitmproxy + sudo apt-get install --yes mitmproxy python3-pip + # pyparsing 3.x renamed something, resulting in this error: + # # AttributeError: module 'pyparsing' has no attribute 'operatorPrecedence' + pip3 install pyparsing==2.4.6 fi echo "What is happening with pyparsing" From 055b3bfdb675f5ad62ea2deb9bff45384955bfd8 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 16:01:24 -0800 Subject: [PATCH 17/21] why still using what seems like a newer version? --- scripts/workflows/provision-linux.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/workflows/provision-linux.sh b/scripts/workflows/provision-linux.sh index f502996d66..f36b9e0e0e 100755 --- a/scripts/workflows/provision-linux.sh +++ b/scripts/workflows/provision-linux.sh @@ -22,6 +22,7 @@ if [ "$E2E_TEST" = "tests-dfx/certificate.bash" ]; then sudo apt-get install --yes mitmproxy python3-pip # pyparsing 3.x renamed something, resulting in this error: # # AttributeError: module 'pyparsing' has no attribute 'operatorPrecedence' + pip3 uninstall --yes pyparsing pip3 install pyparsing==2.4.6 fi From 90af136c7d4fd28ce1b6493dade4d74bc3f433e3 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 16:16:39 -0800 Subject: [PATCH 18/21] try installing python3-pyparsing=2.4.6-1 --- scripts/workflows/provision-linux.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/workflows/provision-linux.sh b/scripts/workflows/provision-linux.sh index f36b9e0e0e..722f7656a4 100755 --- a/scripts/workflows/provision-linux.sh +++ b/scripts/workflows/provision-linux.sh @@ -19,14 +19,15 @@ rm v$version.tar.gz # Packages needed for some tests if [ "$E2E_TEST" = "tests-dfx/certificate.bash" ]; then - sudo apt-get install --yes mitmproxy python3-pip # pyparsing 3.x renamed something, resulting in this error: # # AttributeError: module 'pyparsing' has no attribute 'operatorPrecedence' - pip3 uninstall --yes pyparsing - pip3 install pyparsing==2.4.6 + sudo apt-get install --yes mitmproxy python3-pyparsing=2.4.6-1 fi echo "What is happening with pyparsing" +apt-cache policy mitmproxy +apt-cache policy python3-pyparsing +apt-cache policy python-pyparsing python3 --version python3 -c " import pyparsing as pp From e061ebf034bbbd85e872ea65fd20f2520db4b40d Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 30 Nov 2021 16:36:49 -0800 Subject: [PATCH 19/21] . --- scripts/workflows/provision-linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/workflows/provision-linux.sh b/scripts/workflows/provision-linux.sh index 722f7656a4..ea973cd822 100755 --- a/scripts/workflows/provision-linux.sh +++ b/scripts/workflows/provision-linux.sh @@ -21,7 +21,7 @@ rm v$version.tar.gz if [ "$E2E_TEST" = "tests-dfx/certificate.bash" ]; then # pyparsing 3.x renamed something, resulting in this error: # # AttributeError: module 'pyparsing' has no attribute 'operatorPrecedence' - sudo apt-get install --yes mitmproxy python3-pyparsing=2.4.6-1 + sudo apt-get install --yes mitmproxy python-pyparsing=2.4.6-1 python3-pyparsing=2.4.6-1 fi echo "What is happening with pyparsing" From c39dac0180a0c91252327a4e6d465b15ed7799ea Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Wed, 1 Dec 2021 08:40:38 -0800 Subject: [PATCH 20/21] disable certificate test on linux because of mitmproxy / pyparsing incompatibility --- e2e/tests-dfx/certificate.bash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/e2e/tests-dfx/certificate.bash b/e2e/tests-dfx/certificate.bash index 8af7afb26f..e9f4b1552a 100644 --- a/e2e/tests-dfx/certificate.bash +++ b/e2e/tests-dfx/certificate.bash @@ -10,6 +10,8 @@ setup() { install_asset certificate dfx_start + (uname -a | grep Linux) && return 0 + dfx deploy BACKEND="$(jq -r .networks.local.bind dfx.json)" @@ -64,11 +66,14 @@ teardown() { } @test "mitm attack - update: attack fails because certificate verification fails" { + (uname -a | grep Linux) && skip "See SDK-221: mitmproxy / pyparsing incompatibility on ubuntu-latest" + assert_command_fail dfx canister call certificate hello_update '("Buckaroo")' assert_match 'Certificate verification failed.' } @test "mitm attack - query: attack succeeds because there is no certificate to verify" { + (uname -a | grep Linux) && skip "See SDK-221: mitmproxy / pyparsing incompatibility on ubuntu-latest" # The wallet does not have a query call forward method (currently calls forward from wallet's update method) # So call with users Identity as sender here # There may need to be a query version of wallet_call From 1cf3a3f394b982a76b46726dbae59989c11490b5 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Wed, 1 Dec 2021 08:40:51 -0800 Subject: [PATCH 21/21] remove pyparsing discovery stduff --- scripts/workflows/provision-linux.sh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scripts/workflows/provision-linux.sh b/scripts/workflows/provision-linux.sh index ea973cd822..2d126dbd9c 100755 --- a/scripts/workflows/provision-linux.sh +++ b/scripts/workflows/provision-linux.sh @@ -19,21 +19,9 @@ rm v$version.tar.gz # Packages needed for some tests if [ "$E2E_TEST" = "tests-dfx/certificate.bash" ]; then - # pyparsing 3.x renamed something, resulting in this error: - # # AttributeError: module 'pyparsing' has no attribute 'operatorPrecedence' - sudo apt-get install --yes mitmproxy python-pyparsing=2.4.6-1 python3-pyparsing=2.4.6-1 + sudo apt-get install --yes mitmproxy fi -echo "What is happening with pyparsing" -apt-cache policy mitmproxy -apt-cache policy python3-pyparsing -apt-cache policy python-pyparsing -python3 --version -python3 -c " -import pyparsing as pp -print(pp.__version__) -" - # Set environment variables. BATS_SUPPORT="/usr/local/lib/bats-support" echo "BATSLIB=${BATS_SUPPORT}" >> "$GITHUB_ENV"