From fe1793dde15d1c168f8c53553972ad348cde02c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 07:55:47 +0000 Subject: [PATCH 01/10] build(deps-dev): bump eslint from 8.49.0 to 8.50.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.49.0 to 8.50.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.49.0...v8.50.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 114f0672a..555f4ae16 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "@typescript-eslint/parser": "^6.0.0", "buffer": "^6.0.3", "cypress": "13.2.0", - "eslint": "~8.49.0", + "eslint": "~8.50.0", "eslint-config-prettier": "^9.0.0", "express": "^4.18.2", "husky": "^8.0.3", From cafc736d8573a9a131a34f0ae95d0d31b05d5f17 Mon Sep 17 00:00:00 2001 From: jalas167 Date: Thu, 28 Sep 2023 20:02:06 +0200 Subject: [PATCH 02/10] test(examples) changed examples to run on testnet --- .../examples/selecting-providers/custom-price.mjs | 2 +- .../examples/selecting-providers/whitelist.mjs | 9 ++++++++- .../docs-examples/examples/working-with-images/tag.mjs | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/docs-examples/examples/selecting-providers/custom-price.mjs b/examples/docs-examples/examples/selecting-providers/custom-price.mjs index ce6db0f37..b3e785812 100644 --- a/examples/docs-examples/examples/selecting-providers/custom-price.mjs +++ b/examples/docs-examples/examples/selecting-providers/custom-price.mjs @@ -16,7 +16,7 @@ const myFilter = async (proposal) => { else { costData.shift(); let averageProposedCost = costData.reduce((part, x) => part + x, 0) / 10; - if (proposedCost <= averageProposedCost) decision = true; + if (proposedCost <= 1.2 * averageProposedCost) decision = true; if (decision) { console.log(proposedCost, averageProposedCost); } diff --git a/examples/docs-examples/examples/selecting-providers/whitelist.mjs b/examples/docs-examples/examples/selecting-providers/whitelist.mjs index 202c8c454..e25dd6e1e 100644 --- a/examples/docs-examples/examples/selecting-providers/whitelist.mjs +++ b/examples/docs-examples/examples/selecting-providers/whitelist.mjs @@ -5,7 +5,14 @@ import { TaskExecutor, ProposalFilters } from "@golem-sdk/golem-js"; * which only allows offers from a provider whose ID is in the array */ -const whiteListIds = ["0x3fc1d65ddc5258dc8807df30a29f71028e965e1b", "0x4506550de84d207f3ab90add6336f68119015836"]; +const whiteListIds = [ + "0x3a21c608925ddbc745afab6375d1f5e77283538e", + "0xd79f83f1108d1fcbe0cf57e13b452305eb38a325", + "0x677c5476f3b0e1f03d5c3abd2e2e2231e36fddde", + "0x06c03165aaa676680b9d02c1f3ee846c3806fec7", + "0x17ec8597ff92c3f44523bdc65bf0f1be632917ff", // goth provider-1: + "0x63fc2ad3d021a4d7e64323529a55a9442c444da0" // goth provider-2: +]; console.log("Will accept only proposals from:"); for (let i = 0; i < whiteListIds.length; i++) { console.log(whiteListIds[i]); diff --git a/examples/docs-examples/examples/working-with-images/tag.mjs b/examples/docs-examples/examples/working-with-images/tag.mjs index aae331455..a7cb628a7 100644 --- a/examples/docs-examples/examples/working-with-images/tag.mjs +++ b/examples/docs-examples/examples/working-with-images/tag.mjs @@ -3,7 +3,7 @@ import { TaskExecutor } from "@golem-sdk/golem-js"; (async () => { const executor = await TaskExecutor.create({ package: "golem/alpine:latest", - yagnaOptions: { appKey: "try_golem" }, + yagnaOptions: { apiKey: "try_golem" }, }); const result = await executor.run(async (ctx) => (await ctx.run("node -v")).stdout); From 81d0c633267f5fc3252ee5fdfcf3042272ed06a2 Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Fri, 29 Sep 2023 10:59:33 +0200 Subject: [PATCH 03/10] test(examples): fixed linter and enabled whitelist test in goth --- .../examples/selecting-providers/whitelist.mjs | 6 +++--- tests/examples/examples.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/docs-examples/examples/selecting-providers/whitelist.mjs b/examples/docs-examples/examples/selecting-providers/whitelist.mjs index e25dd6e1e..26bdcd6fe 100644 --- a/examples/docs-examples/examples/selecting-providers/whitelist.mjs +++ b/examples/docs-examples/examples/selecting-providers/whitelist.mjs @@ -7,11 +7,11 @@ import { TaskExecutor, ProposalFilters } from "@golem-sdk/golem-js"; const whiteListIds = [ "0x3a21c608925ddbc745afab6375d1f5e77283538e", - "0xd79f83f1108d1fcbe0cf57e13b452305eb38a325", + "0xd79f83f1108d1fcbe0cf57e13b452305eb38a325", "0x677c5476f3b0e1f03d5c3abd2e2e2231e36fddde", "0x06c03165aaa676680b9d02c1f3ee846c3806fec7", - "0x17ec8597ff92c3f44523bdc65bf0f1be632917ff", // goth provider-1: - "0x63fc2ad3d021a4d7e64323529a55a9442c444da0" // goth provider-2: + "0x17ec8597ff92c3f44523bdc65bf0f1be632917ff", // goth provider-1: + "0x63fc2ad3d021a4d7e64323529a55a9442c444da0", // goth provider-2: ]; console.log("Will accept only proposals from:"); for (let i = 0; i < whiteListIds.length; i++) { diff --git a/tests/examples/examples.json b/tests/examples/examples.json index 3e6bb188c..b7427852e 100644 --- a/tests/examples/examples.json +++ b/tests/examples/examples.json @@ -15,7 +15,7 @@ { "cmd": "node", "path": "examples/docs-examples/examples/selecting-providers/custom-price.mjs", "noGoth": true }, { "cmd": "node", "path": "examples/docs-examples/examples/selecting-providers/demand.mjs" }, - { "cmd": "node", "path": "examples/docs-examples/examples/selecting-providers/whitelist.mjs", "noGoth": true }, + { "cmd": "node", "path": "examples/docs-examples/examples/selecting-providers/whitelist.mjs" }, { "cmd": "node", "path": "examples/docs-examples/examples/sending-data/downloading-file.mjs" }, { "cmd": "node", "path": "examples/docs-examples/examples/sending-data/uploading-file.mjs" }, From af3fe14bfec3fd0f5a0a6c67ea3cfb97ebc447c6 Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Fri, 29 Sep 2023 11:42:56 +0200 Subject: [PATCH 04/10] test(examples): fixed python in runners --- .github/workflows/cypress-nightly.yml | 1 + .github/workflows/examples-nightly.yml | 1 + .github/workflows/goth-nightly.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/cypress-nightly.yml b/.github/workflows/cypress-nightly.yml index f54eacc87..495a806b5 100644 --- a/.github/workflows/cypress-nightly.yml +++ b/.github/workflows/cypress-nightly.yml @@ -34,6 +34,7 @@ jobs: npm run build - name: Configure python + continue-on-error: true uses: actions/setup-python@v4 with: python-version: "3.10" diff --git a/.github/workflows/examples-nightly.yml b/.github/workflows/examples-nightly.yml index 9a2458887..ecf3ca45b 100644 --- a/.github/workflows/examples-nightly.yml +++ b/.github/workflows/examples-nightly.yml @@ -46,6 +46,7 @@ jobs: npm install ts-node - name: Configure python + continue-on-error: true uses: actions/setup-python@v4 with: python-version: "3.10" diff --git a/.github/workflows/goth-nightly.yml b/.github/workflows/goth-nightly.yml index 622ca67aa..b0dc2390e 100644 --- a/.github/workflows/goth-nightly.yml +++ b/.github/workflows/goth-nightly.yml @@ -44,6 +44,7 @@ jobs: npm run build - name: Configure python + continue-on-error: true uses: actions/setup-python@v4 with: python-version: "3.10" From 0f2b24c84b7f9019a104823c7b5f896d20b221dd Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Fri, 29 Sep 2023 11:44:18 +0200 Subject: [PATCH 05/10] test(examples): fixed python in runners --- .github/workflows/cypress-nightly.yml | 2 +- .github/workflows/examples-nightly.yml | 2 +- .github/workflows/goth-nightly.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cypress-nightly.yml b/.github/workflows/cypress-nightly.yml index 495a806b5..c2ed3acee 100644 --- a/.github/workflows/cypress-nightly.yml +++ b/.github/workflows/cypress-nightly.yml @@ -10,7 +10,7 @@ on: jobs: cypress-tests: - runs-on: goth2 + runs-on: [goth2, ubuntu-22.10] steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/examples-nightly.yml b/.github/workflows/examples-nightly.yml index ecf3ca45b..4833088ca 100644 --- a/.github/workflows/examples-nightly.yml +++ b/.github/workflows/examples-nightly.yml @@ -21,7 +21,7 @@ jobs: run: echo "::set-output name=matrix::{\"include\":[{\"branch\":\"master\"}]}" goth-tests: - runs-on: goth2 + runs-on: [goth2, ubuntu-22.10] needs: prepare-matrix-master-only strategy: matrix: ${{ fromJson(needs.prepare-matrix-master-only.outputs.matrix-json) }} diff --git a/.github/workflows/goth-nightly.yml b/.github/workflows/goth-nightly.yml index b0dc2390e..1106a7b26 100644 --- a/.github/workflows/goth-nightly.yml +++ b/.github/workflows/goth-nightly.yml @@ -21,7 +21,7 @@ jobs: run: echo "::set-output name=matrix::{\"include\":[{\"branch\":\"master\"}]}" goth-tests: - runs-on: goth2 + runs-on: [goth2, ubuntu-22.10] needs: prepare-matrix-master-only strategy: matrix: ${{ fromJson(needs.prepare-matrix-master-only.outputs.matrix-json) }} From b7af44eaa439f15b5885c5e624c14394c2e89dc5 Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Fri, 29 Sep 2023 12:31:10 +0200 Subject: [PATCH 06/10] test(examples): increased timeout --- tests/examples/examples.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/examples/examples.test.ts b/tests/examples/examples.test.ts index 85ce0ea47..e61e534b2 100644 --- a/tests/examples/examples.test.ts +++ b/tests/examples/examples.test.ts @@ -21,7 +21,7 @@ type Example = { skip?: boolean; }; -async function test(cmd: string, path: string, args: string[] = [], timeout = 120) { +async function test(cmd: string, path: string, args: string[] = [], timeout = 180) { const file = basename(path); const cwd = dirname(path); const spawnedExample = spawn(cmd, [file, ...args], { cwd }); From 1dec323b4168a9623acc16c93065da8ddb001846 Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Fri, 29 Sep 2023 13:14:33 +0200 Subject: [PATCH 07/10] test(examples): fixed goth --- .github/workflows/examples-nightly.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/examples-nightly.yml b/.github/workflows/examples-nightly.yml index 4833088ca..8f978b809 100644 --- a/.github/workflows/examples-nightly.yml +++ b/.github/workflows/examples-nightly.yml @@ -57,7 +57,6 @@ jobs: rm -rf ../goth/assets python -m goth create-assets ../goth/assets sed -Ezi 's/(use\-proxy:\s)(True)/\1False/mg' ../goth/assets/goth-config.yml - sed -Ezi 's/(use\-prerelease:\s)(false)/\1true\n release-tag: "0.13.0-rc21"/mg' ../goth/assets/goth-config.yml sed -i '/^ENTRYPOINT/i ENV YAGNA_AUTOCONF_APPKEY=try_golem' ../goth/assets/docker/yagna-goth-deb.Dockerfile - name: Cleanup Docker From ace4906cf4a98b1f95f55a520a6c9a0f23d0508e Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Sat, 30 Sep 2023 14:24:12 +0200 Subject: [PATCH 08/10] test(examples): skip test for goth with batch and transfer JST-363: Bug in goth for parsing batch command in gftp wrapper --- tests/examples/examples.json | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/examples/examples.json b/tests/examples/examples.json index b7427852e..688cc6718 100644 --- a/tests/examples/examples.json +++ b/tests/examples/examples.json @@ -1,7 +1,15 @@ [ - { "cmd": "node", "path": "examples/docs-examples/examples/composing-tasks/batch-end.mjs" }, - { "cmd": "node", "path": "examples/docs-examples/examples/composing-tasks/batch-endstream-chunks.mjs" }, - { "cmd": "node", "path": "examples/docs-examples/examples/composing-tasks/batch-endstream-forawait.mjs" }, + { "cmd": "node", "path": "examples/docs-examples/examples/composing-tasks/batch-end.mjs", "noGoth": true }, + { + "cmd": "node", + "path": "examples/docs-examples/examples/composing-tasks/batch-endstream-chunks.mjs", + "noGoth": true + }, + { + "cmd": "node", + "path": "examples/docs-examples/examples/composing-tasks/batch-endstream-forawait.mjs", + "noGoth": true + }, { "cmd": "node", "path": "examples/docs-examples/examples/composing-tasks/multiple-run-prosaic.mjs" }, { "cmd": "node", "path": "examples/docs-examples/examples/composing-tasks/single-command.mjs" }, { "cmd": "node", "path": "examples/docs-examples/examples/composing-tasks/single-command.cjs" }, @@ -33,7 +41,11 @@ { "cmd": "node", "path": "examples/docs-examples/examples/working-with-images/tag.mjs" }, { "cmd": "node", "path": "examples/docs-examples/examples/working-with-results/multi-command-end.mjs" }, - { "cmd": "node", "path": "examples/docs-examples/examples/working-with-results/multi-command-endstream.mjs" }, + { + "cmd": "node", + "path": "examples/docs-examples/examples/working-with-results/multi-command-endstream.mjs", + "noGoth": true + }, { "cmd": "node", "path": "examples/docs-examples/examples/working-with-results/multi-command-fail.mjs", From d43061ee957ea83e378da9a18a7fc4f44cbc3b94 Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Sat, 30 Sep 2023 15:44:02 +0200 Subject: [PATCH 09/10] test(examples): fixed CI --- .github/workflows/examples-nightly.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/examples-nightly.yml b/.github/workflows/examples-nightly.yml index 8f978b809..ecf3ca45b 100644 --- a/.github/workflows/examples-nightly.yml +++ b/.github/workflows/examples-nightly.yml @@ -21,7 +21,7 @@ jobs: run: echo "::set-output name=matrix::{\"include\":[{\"branch\":\"master\"}]}" goth-tests: - runs-on: [goth2, ubuntu-22.10] + runs-on: goth2 needs: prepare-matrix-master-only strategy: matrix: ${{ fromJson(needs.prepare-matrix-master-only.outputs.matrix-json) }} @@ -57,6 +57,7 @@ jobs: rm -rf ../goth/assets python -m goth create-assets ../goth/assets sed -Ezi 's/(use\-proxy:\s)(True)/\1False/mg' ../goth/assets/goth-config.yml + sed -Ezi 's/(use\-prerelease:\s)(false)/\1true\n release-tag: "0.13.0-rc21"/mg' ../goth/assets/goth-config.yml sed -i '/^ENTRYPOINT/i ENV YAGNA_AUTOCONF_APPKEY=try_golem' ../goth/assets/docker/yagna-goth-deb.Dockerfile - name: Cleanup Docker From 1a1682590aebee1bbd5020a88e3538085de3d694 Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Sat, 30 Sep 2023 15:51:11 +0200 Subject: [PATCH 10/10] test(examples): fixed CI --- .github/workflows/examples-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/examples-nightly.yml b/.github/workflows/examples-nightly.yml index ecf3ca45b..4833088ca 100644 --- a/.github/workflows/examples-nightly.yml +++ b/.github/workflows/examples-nightly.yml @@ -21,7 +21,7 @@ jobs: run: echo "::set-output name=matrix::{\"include\":[{\"branch\":\"master\"}]}" goth-tests: - runs-on: goth2 + runs-on: [goth2, ubuntu-22.10] needs: prepare-matrix-master-only strategy: matrix: ${{ fromJson(needs.prepare-matrix-master-only.outputs.matrix-json) }}