From 9d0f3b10eb590b0bcaef7c469cf8bade85cd8def Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 28 Jun 2022 11:54:32 +0200 Subject: [PATCH] reflecting the deployment config changes (#344) * reflecting the deployment config changes * Try temporary CI fix (#345) Co-authored-by: igor Co-authored-by: Anatoly Laskaris --- .github/workflows/check-deploy.yml | 14 +++++------- .../workflows/test-aqua-ipfs-integration.yml | 10 ++++----- .github/workflows/test-js-projects.yml | 22 +++++++++---------- .../configs/ceramic_adapter_deploy_cfg.json | 16 +++++++------- .../configs/deployment_cfg.json | 2 +- .../services/configs/near_deploy_cfg.json | 6 ++--- .../configs/price_oracle_deploy_cfg.json | 8 +++---- aqua-examples/ts-oracle/aqua/builtin.aqua | 4 ++-- .../configs/ts_oracle_deploy_cfg.json | 2 +- marine-examples/call_parameters/config.json | 2 +- .../greeting/configs/greeting_deploy_cfg.json | 2 +- .../url-downloader/deployment_cfg.json | 18 +++++++-------- .../configs/hello_world_deployment_cfg.json | 2 +- .../configs/ts_oracle_deploy_cfg.json | 2 +- 14 files changed, 53 insertions(+), 57 deletions(-) diff --git a/.github/workflows/check-deploy.yml b/.github/workflows/check-deploy.yml index c6cd1af..60745ee 100644 --- a/.github/workflows/check-deploy.yml +++ b/.github/workflows/check-deploy.yml @@ -46,7 +46,7 @@ jobs: with: node-version: 16 - - run: npm install -g @fluencelabs/aqua@0.6.4-283 + - run: npm install -g @fluencelabs/aqua@0.7.4-320 - name: "Wait for aqua-ipfs service to start" run: | @@ -66,26 +66,22 @@ jobs: run: | set -o errexit -o nounset -o pipefail - set -x NODE="/ip4/127.0.0.1/tcp/4310/ws/p2p/12D3KooWKEprYXUXqoV5xSBeyqrWLpQLLH4PXfvVkDJtmcqmh5V3" SERVICE_ID=`./deploy.sh $NODE` INPUT=$GITHUB_WORKSPACE/.github/deploy.aqua - RESULT=$(aqua run --addr $NODE --sk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo= -f 'call(service_id)' -d '{"service_id": "'$SERVICE_ID'"}' --input $INPUT) - # RESULT=$(echo $RESULT | sed -e 's/Your peerId: [a-zA-Z0-9]*//g') + RESULT=$(aqua run --addr $NODE --sk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo= -f 'call(service_id)' -d '{"service_id": "'$SERVICE_ID'"}' --input $INPUT | jq -r) - EXPECTED_PEER_ID=$(echo -e "$RESULT" | sed -n '1p' | grep -o '12D3.*') - RESULT_PEER_ID=$(echo -e "$RESULT" | sed -n '2p' | tr -d \") + EXPECTED_PEER_ID=$(echo -e "$RESULT" | sed -n '1p') + RESULT_PEER_ID=$(echo -e "$RESULT" | sed -n '3p') if [ "$EXPECTED_PEER_ID" != "$RESULT_PEER_ID" ]; then echo "Expected $EXPECTED_PEER_ID, got $RESULT_PEER_ID" exit 1 fi - RESULT_SERVICE_ID=$(echo -e "$RESULT" | sed -n '3p') + RESULT_SERVICE_ID=$(echo -e "$RESULT" | sed -n '2p') if [ "$SERVICE_ID" != "$RESULT_SERVICE_ID" ]; then echo "Expected $SERVICE_ID, got $RESULT_SERVICE_ID" exit 1 fi - - remove --addr $NODE --sk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo= --id "$SERVICE_ID" working-directory: marine-examples/call_parameters diff --git a/.github/workflows/test-aqua-ipfs-integration.yml b/.github/workflows/test-aqua-ipfs-integration.yml index e7eda32..ad4008d 100644 --- a/.github/workflows/test-aqua-ipfs-integration.yml +++ b/.github/workflows/test-aqua-ipfs-integration.yml @@ -6,7 +6,7 @@ on: jobs: build: runs-on: ubuntu-latest - + strategy: matrix: node-version: [16.x] @@ -28,14 +28,14 @@ jobs: - name: Install Rust toolchain with wasm32-unknown-unknown uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-07-13 + toolchain: nightly-2022-06-27 target: wasm32-unknown-unknown profile: minimal override: true - name: Install wasm32-wasi uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-07-13 + toolchain: nightly-2022-06-27 target: wasm32-wasi profile: minimal @@ -56,9 +56,9 @@ jobs: ### === Rust tests === - name: run tests - working-directory: + working-directory: ./aqua-examples/aqua-ipfs-integration - env: + env: CI: true run: | npm i diff --git a/.github/workflows/test-js-projects.yml b/.github/workflows/test-js-projects.yml index 55a479e..32fb609 100644 --- a/.github/workflows/test-js-projects.yml +++ b/.github/workflows/test-js-projects.yml @@ -6,18 +6,18 @@ on: jobs: build: runs-on: ubuntu-latest - + strategy: matrix: node-version: [16.x] working-directory: [ - "./quickstart/1-browser-to-browser", - "./quickstart/3-browser-to-service", - "./fluence-js-examples/hello-world", - "./fluence-js-examples/browser-example", - "./fluence-js-examples/node-example", - "./aqua-examples/echo-greeter/client-peer", - "./aqua-examples/price-oracle/client-peer", + "./quickstart/1-browser-to-browser", + "./quickstart/3-browser-to-service", + "./fluence-js-examples/hello-world", + "./fluence-js-examples/browser-example", + "./fluence-js-examples/node-example", + "./aqua-examples/echo-greeter/client-peer", + "./aqua-examples/price-oracle/client-peer", "./aqua-examples/price-oracle/web" ] fail-fast: false @@ -37,14 +37,14 @@ jobs: - name: Install Rust toolchain with wasm32-unknown-unknown uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-07-13 + toolchain: nightly-2022-06-27 target: wasm32-unknown-unknown profile: minimal override: true - name: Install wasm32-wasi uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-07-13 + toolchain: nightly-2022-06-27 target: wasm32-wasi profile: minimal @@ -66,7 +66,7 @@ jobs: ### === Rust tests === - name: run tests working-directory: ${{ matrix.working-directory }} - env: + env: CI: true run: | npm i diff --git a/aqua-examples/aqua-ceramic-integration/configs/ceramic_adapter_deploy_cfg.json b/aqua-examples/aqua-ceramic-integration/configs/ceramic_adapter_deploy_cfg.json index 993d8f8..b25b2b9 100644 --- a/aqua-examples/aqua-ceramic-integration/configs/ceramic_adapter_deploy_cfg.json +++ b/aqua-examples/aqua-ceramic-integration/configs/ceramic_adapter_deploy_cfg.json @@ -5,18 +5,18 @@ { "name": "curl_adapter", "path": "./artifacts/curl_adapter.wasm", - "mounted_binaries": [["curl", "/usr/bin/curl"]], - "preopened_files": [], - "mapped_dirs": [], - "logger_enabled": [true] + "mounted_binaries": ["curl", "/usr/bin/curl"], + "preopened_files": null, + "mapped_dirs": null, + "logger_enabled": true }, { "name": "ceramic_adapter_custom", "path": "./artifacts/ceramic_adapter_custom.wasm", - "mounted_binaries": [["ceramic", "/usr/bin/ceramic"]], - "preopened_files": [], - "mapped_dirs": [], - "logger_enabled": [true] + "mounted_binaries": ["ceramic", "/usr/bin/ceramic"], + "preopened_files": null, + "mapped_dirs": null, + "logger_enabled": true } ] } diff --git a/aqua-examples/evm-integration/configs/deployment_cfg.json b/aqua-examples/evm-integration/configs/deployment_cfg.json index c7dc2bb..484509d 100644 --- a/aqua-examples/evm-integration/configs/deployment_cfg.json +++ b/aqua-examples/evm-integration/configs/deployment_cfg.json @@ -26,4 +26,4 @@ } ] } -} +} \ No newline at end of file diff --git a/aqua-examples/near-integration/services/configs/near_deploy_cfg.json b/aqua-examples/near-integration/services/configs/near_deploy_cfg.json index d7c99f1..b30d7e6 100644 --- a/aqua-examples/near-integration/services/configs/near_deploy_cfg.json +++ b/aqua-examples/near-integration/services/configs/near_deploy_cfg.json @@ -5,13 +5,13 @@ { "name": "curl_adapter", "path": "./artifacts/curl_adapter.wasm", - "mounted_binaries": [["curl", "/usr/bin/curl"]], - "logger_enabled": [true] + "mounted_binaries": ["curl", "/usr/bin/curl"], + "logger_enabled": true }, { "name": "near_rpc_services", "path": "./artifacts/near_rpc_services.wasm", - "logger_enabled": [true] + "logger_enabled": true } ] } diff --git a/aqua-examples/price-oracle/configs/price_oracle_deploy_cfg.json b/aqua-examples/price-oracle/configs/price_oracle_deploy_cfg.json index f869263..e5723d1 100644 --- a/aqua-examples/price-oracle/configs/price_oracle_deploy_cfg.json +++ b/aqua-examples/price-oracle/configs/price_oracle_deploy_cfg.json @@ -4,13 +4,13 @@ { "name": "curl_adapter", "path": "./artifacts/curl_adapter.wasm", - "mounted_binaries": [["curl", "/usr/bin/curl"]], - "logger_enabled": [true] + "mounted_binaries": ["curl", "/usr/bin/curl"], + "logger_enabled": true }, { "name": "price_getter_service", "path": "./artifacts/price_getter_service.wasm", - "logger_enabled": [true] + "logger_enabled": true } ] }, @@ -19,7 +19,7 @@ { "name": "mean_service", "path": "./artifacts/mean_service.wasm", - "logger_enabled": [true] + "logger_enabled": true } ] } diff --git a/aqua-examples/ts-oracle/aqua/builtin.aqua b/aqua-examples/ts-oracle/aqua/builtin.aqua index 53e594d..2058a6b 100644 --- a/aqua-examples/ts-oracle/aqua/builtin.aqua +++ b/aqua-examples/ts-oracle/aqua/builtin.aqua @@ -171,10 +171,10 @@ service Dist("dist"): -- logger_enabled - Defines whether Marine should provide a special host log_utf8_string function for this module -- preopened_files - Files available for this module. Module can access only files from this list -- envs - environment variables available for this module - -- mapped_dirs - Directory mapping, e.g. [["/sites", "./web/data"]] so all + -- mapped_dirs - Directory mapping, e.g. ["/sites", "./web/data"] so all -- reads & writes to /sites will actually to go ./web/data -- mounted_binaries - Mapping of host binaries available to call from module, - -- e.g. [["curl", "/usr/bin/curl"]] will allow module to + -- e.g. ["curl", "/usr/bin/curl"] will allow module to -- call /usr/bin/curl binary as function 'curl' -- logging_mask - Binary mask to enable & disable logging targets. Targets are -- configured in WasmLoggerBuilder::with_target_map diff --git a/aqua-examples/ts-oracle/configs/ts_oracle_deploy_cfg.json b/aqua-examples/ts-oracle/configs/ts_oracle_deploy_cfg.json index 0bb68d3..16cb62b 100644 --- a/aqua-examples/ts-oracle/configs/ts_oracle_deploy_cfg.json +++ b/aqua-examples/ts-oracle/configs/ts_oracle_deploy_cfg.json @@ -4,7 +4,7 @@ { "name": "ts_oracle", "path": "./artifacts/ts_oracle.wasm", - "logger_enabled": [true] + "logger_enabled": true } ] } diff --git a/marine-examples/call_parameters/config.json b/marine-examples/call_parameters/config.json index e8ab1eb..7d4d4fd 100644 --- a/marine-examples/call_parameters/config.json +++ b/marine-examples/call_parameters/config.json @@ -4,7 +4,7 @@ { "name": "call_parameters", "path": "./artifacts/call_parameters.wasm", - "logger_enabled": [true] + "logger_enabled": true } ] } diff --git a/marine-examples/greeting/configs/greeting_deploy_cfg.json b/marine-examples/greeting/configs/greeting_deploy_cfg.json index e8333d0..0c88ecb 100644 --- a/marine-examples/greeting/configs/greeting_deploy_cfg.json +++ b/marine-examples/greeting/configs/greeting_deploy_cfg.json @@ -4,7 +4,7 @@ { "name": "greeting", "path": "./artifacts/greeting.wasm", - "logger_enabled": [true] + "logger_enabled": true } ] } diff --git a/marine-examples/url-downloader/deployment_cfg.json b/marine-examples/url-downloader/deployment_cfg.json index 960c92e..313d692 100644 --- a/marine-examples/url-downloader/deployment_cfg.json +++ b/marine-examples/url-downloader/deployment_cfg.json @@ -5,20 +5,20 @@ { "name": "curl_adapter", "path": "./artifacts/curl_adapter.wasm", - "mounted_binaries": [["curl", "/usr/bin/curl"]], - "logger_enabled": [true] + "mounted_binaries": ["curl", "/usr/bin/curl"], + "logger_enabled": true }, { "name": "local_storage", "path": "./artifacts/local_storage.wasm", "preopened_files": ["/tmp"], - "mapped_dirs": [["sites", "/tmp"]], - "logger_enabled": [true] + "mapped_dirs": ["sites", "/tmp"], + "logger_enabled": true }, { "name": "url_dowloader", "path": "./artifacts/facade.wasm", - "logger_enabled": [true] + "logger_enabled": true } ] }, @@ -28,8 +28,8 @@ "name": "local_storage", "path": "./artifacts/local_storage.wasm", "preopened_files": ["/tmp"], - "mapped_dirs": [["sites", "/tmp"]], - "logger_enabled": [true] + "mapped_dirs": ["sites", "/tmp"], + "logger_enabled": true } ] }, @@ -38,8 +38,8 @@ { "name": "curl_adapter", "path": "./artifacts/curl_adapter.wasm", - "mounted_binaries": [["curl", "/usr/bin/curl"]], - "logger_enabled": [true] + "mounted_binaries": ["curl", "/usr/bin/curl"], + "logger_enabled": true } ] } diff --git a/quickstart/2-hosted-services/configs/hello_world_deployment_cfg.json b/quickstart/2-hosted-services/configs/hello_world_deployment_cfg.json index 7c04fed..065958f 100644 --- a/quickstart/2-hosted-services/configs/hello_world_deployment_cfg.json +++ b/quickstart/2-hosted-services/configs/hello_world_deployment_cfg.json @@ -4,7 +4,7 @@ { "name": "hello_world", "path": "./artifacts/hello_world.wasm", - "logger_enabled": [true] + "logger_enabled": true } ] } diff --git a/quickstart/5-oracle-service/configs/ts_oracle_deploy_cfg.json b/quickstart/5-oracle-service/configs/ts_oracle_deploy_cfg.json index 4cada24..555beb4 100644 --- a/quickstart/5-oracle-service/configs/ts_oracle_deploy_cfg.json +++ b/quickstart/5-oracle-service/configs/ts_oracle_deploy_cfg.json @@ -5,7 +5,7 @@ { "name": "ts_oracle", "path": "./artifacts/ts_oracle.wasm", - "logger_enabled": [true] + "logger_enabled": true } ] }