diff --git a/.github/workflows/flow-build-application.yaml b/.github/workflows/flow-build-application.yaml index 379c6a6fc..404622268 100644 --- a/.github/workflows/flow-build-application.yaml +++ b/.github/workflows/flow-build-application.yaml @@ -91,7 +91,7 @@ jobs: - { name: "Node Delete - Separate commands", npm-test-script: "test-${{ needs.env-vars.outputs.e2e-node-delete-separate-commands-test-subdir }}", coverage-subdirectory: "${{ needs.env-vars.outputs.e2e-node-delete-separate-commands-test-subdir }}", coverage-report-name: "${{ needs.env-vars.outputs.e2e-node-delete-separate-commands-coverage-report }}" } - { name: "Node Upgrade", npm-test-script: "test-${{ needs.env-vars.outputs.e2e-node-upgrade-test-subdir }}", coverage-subdirectory: "${{ needs.env-vars.outputs.e2e-node-upgrade-test-subdir }}", coverage-report-name: "${{ needs.env-vars.outputs.e2e-node-upgrade-coverage-report }}" } - { name: "Relay", npm-test-script: "test-${{ needs.env-vars.outputs.e2e-relay-test-subdir }}", coverage-subdirectory: "${{ needs.env-vars.outputs.e2e-relay-test-subdir }}", coverage-report-name: "${{ needs.env-vars.outputs.e2e-relay-coverage-report }}" } - max-parallel: 4 + max-parallel: 3 with: custom-job-label: ${{ matrix.e2e-test-type.name }} npm-test-script: ${{ matrix.e2e-test-type.npm-test-script }} diff --git a/.github/workflows/flow-deploy-release-artifact.yaml b/.github/workflows/flow-deploy-release-artifact.yaml index 61385b39d..3dc0a6213 100644 --- a/.github/workflows/flow-deploy-release-artifact.yaml +++ b/.github/workflows/flow-deploy-release-artifact.yaml @@ -54,15 +54,10 @@ jobs: with: fetch-depth: 0 - - name: Setup Node with Retry - uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0 + - name: Setup Node + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - action: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: | - node-version: 20.14.0 - cache: npm - attempt_limit: 3 - attempt_delay: 5000 + node-version: 20.18.0 - name: Install Semantic Release run: | @@ -143,15 +138,10 @@ jobs: git_commit_gpgsign: true git_tag_gpgsign: false - - name: Setup Node with Retry - uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0 + - name: Setup Node + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - action: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: | - node-version: 20.14.0 - cache: npm - attempt_limit: 3 - attempt_delay: 5000 + node-version: 20.18.0 - name: Build Production Distribution run: | diff --git a/.github/workflows/flow-hugo-publish.yaml b/.github/workflows/flow-hugo-publish.yaml index 38ddd4a78..e66dbd7a6 100644 --- a/.github/workflows/flow-hugo-publish.yaml +++ b/.github/workflows/flow-hugo-publish.yaml @@ -76,15 +76,10 @@ jobs: with: fetch-depth: 0 - - name: Setup Node with Retry - uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0 + - name: Setup Node + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - action: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: | - node-version: 20.14.0 - cache: npm - attempt_limit: 3 - attempt_delay: 5000 + node-version: 20.18.0 - name: Setup Pages id: pages diff --git a/.github/workflows/flow-pull-request-checks.yaml b/.github/workflows/flow-pull-request-checks.yaml index c6e5ab4d3..bf2b38add 100644 --- a/.github/workflows/flow-pull-request-checks.yaml +++ b/.github/workflows/flow-pull-request-checks.yaml @@ -90,7 +90,7 @@ jobs: - { name: "Node Delete - Separate commands", npm-test-script: "test-${{ needs.env-vars.outputs.e2e-node-delete-separate-commands-test-subdir }}", coverage-subdirectory: "${{ needs.env-vars.outputs.e2e-node-delete-separate-commands-test-subdir }}", coverage-report-name: "${{ needs.env-vars.outputs.e2e-node-delete-separate-commands-coverage-report }}" } - { name: "Node Upgrade", npm-test-script: "test-${{ needs.env-vars.outputs.e2e-node-upgrade-test-subdir }}", coverage-subdirectory: "${{ needs.env-vars.outputs.e2e-node-upgrade-test-subdir }}", coverage-report-name: "${{ needs.env-vars.outputs.e2e-node-upgrade-coverage-report }}" } - { name: "Relay", npm-test-script: "test-${{ needs.env-vars.outputs.e2e-relay-test-subdir }}", coverage-subdirectory: "${{ needs.env-vars.outputs.e2e-relay-test-subdir }}", coverage-report-name: "${{ needs.env-vars.outputs.e2e-relay-coverage-report }}" } - max-parallel: 4 + max-parallel: 3 with: custom-job-label: ${{ matrix.e2e-test-type.name }} npm-test-script: ${{ matrix.e2e-test-type.npm-test-script }} diff --git a/.github/workflows/templates/template.flow-build-application.yaml b/.github/workflows/templates/template.flow-build-application.yaml index 74c82f1ad..67f587e7b 100644 --- a/.github/workflows/templates/template.flow-build-application.yaml +++ b/.github/workflows/templates/template.flow-build-application.yaml @@ -76,7 +76,7 @@ jobs: matrix: e2e-test-type: # {AUTOGENERATE-E2E-TEST-JOBS} - max-parallel: 4 + max-parallel: 3 with: custom-job-label: ${{ matrix.e2e-test-type.name }} npm-test-script: ${{ matrix.e2e-test-type.npm-test-script }} diff --git a/.github/workflows/templates/template.flow-pull-request-checks.yaml b/.github/workflows/templates/template.flow-pull-request-checks.yaml index 9a298abb6..126058b9c 100644 --- a/.github/workflows/templates/template.flow-pull-request-checks.yaml +++ b/.github/workflows/templates/template.flow-pull-request-checks.yaml @@ -75,7 +75,7 @@ jobs: matrix: e2e-test-type: # {AUTOGENERATE-E2E-TEST-JOBS} - max-parallel: 4 + max-parallel: 3 with: custom-job-label: ${{ matrix.e2e-test-type.name }} npm-test-script: ${{ matrix.e2e-test-type.npm-test-script }} diff --git a/.github/workflows/templates/template.zxc-code-analysis.yaml b/.github/workflows/templates/template.zxc-code-analysis.yaml index 74e861f6e..c04b71b57 100644 --- a/.github/workflows/templates/template.zxc-code-analysis.yaml +++ b/.github/workflows/templates/template.zxc-code-analysis.yaml @@ -49,7 +49,7 @@ on: description: "NodeJS Version:" type: string required: false - default: "20.14.0" + default: "20.18.0" custom-job-label: description: "Custom Job Label:" type: string @@ -90,15 +90,10 @@ jobs: ref: ${{ github.event.workflow_run.head_branch }} fetch-depth: ${{ inputs.enable-sonar-analysis && '0' || '' }} - - name: Setup Node with Retry - uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0 + - name: Setup Node + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - action: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: | - node-version: ${{ inputs.node-version }} - cache: npm - attempt_limit: 3 - attempt_delay: 5000 + node-version: ${{ inputs.node-version }} - name: Download Unit Test Coverage Report uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 diff --git a/.github/workflows/zxc-code-analysis.yaml b/.github/workflows/zxc-code-analysis.yaml index f80c02326..11eb69dff 100644 --- a/.github/workflows/zxc-code-analysis.yaml +++ b/.github/workflows/zxc-code-analysis.yaml @@ -49,7 +49,7 @@ on: description: "NodeJS Version:" type: string required: false - default: "20.14.0" + default: "20.18.0" custom-job-label: description: "Custom Job Label:" type: string @@ -253,15 +253,10 @@ jobs: ref: ${{ github.event.workflow_run.head_branch }} fetch-depth: ${{ inputs.enable-sonar-analysis && '0' || '' }} - - name: Setup Node with Retry - uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0 + - name: Setup Node + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - action: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: | - node-version: ${{ inputs.node-version }} - cache: npm - attempt_limit: 3 - attempt_delay: 5000 + node-version: ${{ inputs.node-version }} - name: Download Unit Test Coverage Report uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 diff --git a/.github/workflows/zxc-code-style.yaml b/.github/workflows/zxc-code-style.yaml index 368ea116d..3d506c2a7 100644 --- a/.github/workflows/zxc-code-style.yaml +++ b/.github/workflows/zxc-code-style.yaml @@ -27,7 +27,7 @@ on: description: "NodeJS Version:" type: string required: false - default: "20.14.0" + default: "20.18.0" custom-job-label: description: "Custom Job Label:" type: string @@ -59,15 +59,10 @@ jobs: - name: Checkout Code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Setup Node with Retry - uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0 + - name: Setup Node + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - action: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: | - node-version: ${{ inputs.node-version }} - cache: npm - attempt_limit: 3 - attempt_delay: 5000 + node-version: ${{ inputs.node-version }} - name: Install Dependencies id: npm-deps diff --git a/.github/workflows/zxc-e2e-test.yaml b/.github/workflows/zxc-e2e-test.yaml index 5ce136c65..d11b73b6d 100644 --- a/.github/workflows/zxc-e2e-test.yaml +++ b/.github/workflows/zxc-e2e-test.yaml @@ -27,7 +27,7 @@ on: description: "NodeJS Version:" type: string required: false - default: "20.14.0" + default: "20.18.0" custom-job-label: description: "Custom Job Label:" type: string @@ -119,15 +119,10 @@ jobs: # sudo cgclassify -g cpu,memory:${AGENT_GROUP_NAME} $(pgrep 'Runner.Worker' | tr '\n' ' ') # echo "::endgroup::" - - name: Setup Node with Retry - uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0 + - name: Setup Node + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - action: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: | - node-version: ${{ inputs.node-version }} - cache: npm - attempt_limit: 3 - attempt_delay: 5000 + node-version: ${{ inputs.node-version }} - name: Install wget run: | diff --git a/.github/workflows/zxc-unit-test.yaml b/.github/workflows/zxc-unit-test.yaml index 8ae911639..bd8bf9b27 100644 --- a/.github/workflows/zxc-unit-test.yaml +++ b/.github/workflows/zxc-unit-test.yaml @@ -27,7 +27,7 @@ on: description: "NodeJS Version:" type: string required: false - default: "20.14.0" + default: "20.18.0" custom-job-label: description: "Custom Job Label:" type: string diff --git a/.github/workflows/zxc-update-readme.yaml b/.github/workflows/zxc-update-readme.yaml index d5abd76ba..d01125208 100644 --- a/.github/workflows/zxc-update-readme.yaml +++ b/.github/workflows/zxc-update-readme.yaml @@ -66,15 +66,10 @@ jobs: fetch-depth: 0 token: ${{ secrets.GH_ACCESS_TOKEN }} - - name: Setup Node with Retry - uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0 + - name: Setup Node + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: - action: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: | - node-version: 20.14.0 - cache: npm - attempt_limit: 3 - attempt_delay: 5000 + node-version: 20.18.0 - name: Install wget run: | diff --git a/README.md b/README.md index b1a307dd7..3b67d5aed 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ An opinionated CLI tool to deploy and manage standalone test networks. |--------------|---------------------------|------------|-----------|----------|------------|------------|---------|------------|-------------------------|--------------| | 0.29.0 | >= 20.14.0 (lts/hydrogen) | >= v1.29.1 | v0.30.0 | v0.53.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 | >= 21.0.1+12 | | 0.30.0 | >= 20.14.0 (lts/hydrogen) | >= v1.29.1 | v0.30.0 | v0.54.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 | >= 21.0.1+12 | +| 0.31.4 | >= 20.18.0 (lts/iron) | >= v1.29.1 | v0.31.4 | v0.54.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 | >= 21.0.1+12 | ## Setup diff --git a/README.md.template b/README.md.template index 64910a440..ccb9f3f0d 100644 --- a/README.md.template +++ b/README.md.template @@ -34,6 +34,7 @@ An opinionated CLI tool to deploy and manage standalone test networks. |--------------|---------------------------|------------|-----------|----------|------------|------------|---------|------------|-------------------------|--------------| | 0.29.0 | >= 20.14.0 (lts/hydrogen) | >= v1.29.1 | v0.30.0 | v0.53.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 | >= 21.0.1+12 | | 0.30.0 | >= 20.14.0 (lts/hydrogen) | >= v1.29.1 | v0.30.0 | v0.54.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 | >= 21.0.1+12 | +| 0.31.4 | >= 20.18.0 (lts/iron) | >= v1.29.1 | v0.31.4 | v0.54.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 | >= 21.0.1+12 | ## Setup diff --git a/package-lock.json b/package-lock.json index 052884b49..8ca1b5c20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "stream-buffers": "^3.0.3", "tar": "^7.4.3", "ts-node": "^10.9.2", - "uuid": "^11.0.1", + "uuid": "^11.0.2", "winston": "^3.15.0", "yaml": "^2.6.0", "yargs": "^17.7.2" @@ -47,10 +47,10 @@ }, "devDependencies": { "@eslint/js": "^9.12.0", - "@swc/cli": "^0.4.1-nightly.20240914", + "@swc/cli": "^0.5.0", "@swc/core": "^1.7.40", - "@types/adm-zip": "^0.5.5", - "@types/chai": "^5.0.0", + "@types/adm-zip": "^0.5.6", + "@types/chai": "^5.0.1", "@types/chai-as-promised": "^8.0.1", "@types/dot-object": "^2.1.6", "@types/eslint__js": "^8.42.3", @@ -61,7 +61,7 @@ "@types/ip": "^1.1.3", "@types/mocha": "^10.0.9", "@types/mocha-each": "^2.0.4", - "@types/node": "^22.8.0", + "@types/node": "^22.8.4", "@types/semver": "^7.5.8", "@types/sinon": "^17.0.3", "@types/sinon-chai": "^4.0.0", @@ -69,7 +69,7 @@ "@types/tar": "^6.1.13", "@types/uuid": "^10.0.0", "@types/yargs": "^17.0.33", - "@typescript-eslint/utils": "^8.10.0", + "@typescript-eslint/utils": "^8.12.2", "c8": "^10.1.2", "chai": "^5.1.2", "chai-as-promised": "^8.0.0", @@ -78,12 +78,12 @@ "eslint-plugin-headers": "^1.2.0", "eslint-plugin-import": "^2.30.0", "eslint-plugin-mocha": "^10.5.0", - "eslint-plugin-n": "^17.11.1", + "eslint-plugin-n": "^17.12.0", "eslint-plugin-promise": "^7.1.0", "eslint-plugin-tsdoc": "^0.3.0", "globals": "^15.11.0", "jest-mock": "^29.7.0", - "mocha": "^10.7.3", + "mocha": "^10.8.1", "mocha-each": "^2.0.1", "mocha-junit-reporter": "^2.2.1", "mocha-multi-reporters": "^1.5.1", @@ -97,7 +97,7 @@ "sinon-chai": "^4.0.0", "typedoc": "^0.26.10", "typescript": "^5.6.3", - "typescript-eslint": "^8.11.0" + "typescript-eslint": "^8.12.2" }, "engines": { "node": ">=20.14.0", @@ -2383,11 +2383,10 @@ "license": "(Unlicense OR Apache-2.0)" }, "node_modules/@swc/cli": { - "version": "0.4.1-nightly.20240914", - "resolved": "https://registry.npmjs.org/@swc/cli/-/cli-0.4.1-nightly.20240914.tgz", - "integrity": "sha512-mpsF0+pq40uu9nZnhkzaA0gdivORTZnJNUFfuUGEzC1DgEEgmKDgisRWpBgA3p7xQPCpYlhkH5cTbsOkqar2Mg==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@swc/cli/-/cli-0.5.0.tgz", + "integrity": "sha512-eFsrNt85SbHTeX6svpBNcA5DQLP/wrSyCs3KVZjbuEHWD7JGpajZOIwH74lVhyrmrXOcGxgbnxXEbDIfRlLcSw==", "dev": true, - "license": "MIT", "dependencies": { "@mole-inc/bin-wrapper": "^8.0.1", "@swc/counter": "^0.1.3", @@ -2711,11 +2710,10 @@ "license": "MIT" }, "node_modules/@types/adm-zip": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.5.tgz", - "integrity": "sha512-YCGstVMjc4LTY5uK9/obvxBya93axZOVOyf2GSUulADzmLhYE45u2nAssCs/fWBs1Ifq5Vat75JTPwd5XZoPJw==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.6.tgz", + "integrity": "sha512-lRlcSLg5Yoo7C2H2AUiAoYlvifWoCx/se7iUNiCBTfEVVYFVn+Tr9ZGed4K73tYgLe9O4PjdJvbxlkdAOx/qiw==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } @@ -2739,11 +2737,13 @@ "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==" }, "node_modules/@types/chai": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.0.0.tgz", - "integrity": "sha512-+DwhEHAaFPPdJ2ral3kNHFQXnTfscEEFsUxzD+d7nlcLrFK23JtNjH71RGasTcHb88b4vVi4mTyfpf8u2L8bdA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.0.1.tgz", + "integrity": "sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA==", "dev": true, - "license": "MIT" + "dependencies": { + "@types/deep-eql": "*" + } }, "node_modules/@types/chai-as-promised": { "version": "8.0.1", @@ -2773,6 +2773,12 @@ "@types/ms": "*" } }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true + }, "node_modules/@types/dot-object": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/@types/dot-object/-/dot-object-2.1.6.tgz", @@ -3009,9 +3015,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "22.8.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.0.tgz", - "integrity": "sha512-84rafSBHC/z1i1E3p0cJwKA+CfYDNSXX9WSZBRopjIzLET8oNt6ht2tei4C7izwDeEiLLfdeSVBv1egOH916hg==", + "version": "22.8.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.4.tgz", + "integrity": "sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==", "dependencies": { "undici-types": "~6.19.8" } @@ -3187,16 +3193,16 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.11.0.tgz", - "integrity": "sha512-KhGn2LjW1PJT2A/GfDpiyOfS4a8xHQv2myUagTM5+zsormOmBlYsnQ6pobJ8XxJmh6hnHwa2Mbe3fPrDJoDhbA==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz", + "integrity": "sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.11.0", - "@typescript-eslint/type-utils": "8.11.0", - "@typescript-eslint/utils": "8.11.0", - "@typescript-eslint/visitor-keys": "8.11.0", + "@typescript-eslint/scope-manager": "8.12.2", + "@typescript-eslint/type-utils": "8.12.2", + "@typescript-eslint/utils": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -3220,15 +3226,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.11.0.tgz", - "integrity": "sha512-lmt73NeHdy1Q/2ul295Qy3uninSqi6wQI18XwSpm8w0ZbQXUpjCAWP1Vlv/obudoBiIjJVjlztjQ+d/Md98Yxg==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.12.2.tgz", + "integrity": "sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.11.0", - "@typescript-eslint/types": "8.11.0", - "@typescript-eslint/typescript-estree": "8.11.0", - "@typescript-eslint/visitor-keys": "8.11.0", + "@typescript-eslint/scope-manager": "8.12.2", + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/typescript-estree": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2", "debug": "^4.3.4" }, "engines": { @@ -3248,13 +3254,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.11.0.tgz", - "integrity": "sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.12.2.tgz", + "integrity": "sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.11.0", - "@typescript-eslint/visitor-keys": "8.11.0" + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3265,13 +3271,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.11.0.tgz", - "integrity": "sha512-ItiMfJS6pQU0NIKAaybBKkuVzo6IdnAhPFZA/2Mba/uBjuPQPet/8+zh5GtLHwmuFRShZx+8lhIs7/QeDHflOg==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.12.2.tgz", + "integrity": "sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.11.0", - "@typescript-eslint/utils": "8.11.0", + "@typescript-eslint/typescript-estree": "8.12.2", + "@typescript-eslint/utils": "8.12.2", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -3289,9 +3295,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.11.0.tgz", - "integrity": "sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.12.2.tgz", + "integrity": "sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3302,13 +3308,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.11.0.tgz", - "integrity": "sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.2.tgz", + "integrity": "sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.11.0", - "@typescript-eslint/visitor-keys": "8.11.0", + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/visitor-keys": "8.12.2", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -3354,15 +3360,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.11.0.tgz", - "integrity": "sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.12.2.tgz", + "integrity": "sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.11.0", - "@typescript-eslint/types": "8.11.0", - "@typescript-eslint/typescript-estree": "8.11.0" + "@typescript-eslint/scope-manager": "8.12.2", + "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/typescript-estree": "8.12.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3376,12 +3382,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.11.0.tgz", - "integrity": "sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.2.tgz", + "integrity": "sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.11.0", + "@typescript-eslint/types": "8.12.2", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -5234,10 +5240,13 @@ } }, "node_modules/eslint-compat-utils": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", - "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", + "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", "dev": true, + "dependencies": { + "semver": "^7.5.4" + }, "engines": { "node": ">=12" }, @@ -5296,21 +5305,22 @@ } }, "node_modules/eslint-plugin-es-x": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.5.0.tgz", - "integrity": "sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz", + "integrity": "sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==", "dev": true, + "funding": [ + "https://github.com/sponsors/ota-meshi", + "https://opencollective.com/eslint" + ], "dependencies": { "@eslint-community/eslint-utils": "^4.1.2", - "@eslint-community/regexpp": "^4.6.0", - "eslint-compat-utils": "^0.1.2" + "@eslint-community/regexpp": "^4.11.0", + "eslint-compat-utils": "^0.5.1" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ota-meshi" - }, "peerDependencies": { "eslint": ">=8" } @@ -5429,20 +5439,19 @@ } }, "node_modules/eslint-plugin-n": { - "version": "17.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.11.1.tgz", - "integrity": "sha512-93IUD82N6tIEgjztVI/l3ElHtC2wTa9boJHrD8iN+NyDxjxz/daZUZKfkedjBZNdg6EqDk4irybUsiPwDqXAEA==", + "version": "17.12.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.12.0.tgz", + "integrity": "sha512-zNAtz/erDn0v78bIY3MASSQlyaarV4IOTvP5ldHsqblRFrXriikB6ghkDTkHjUad+nMRrIbOy9euod2azjRfBg==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "enhanced-resolve": "^5.17.0", - "eslint-plugin-es-x": "^7.5.0", - "get-tsconfig": "^4.7.0", - "globals": "^15.8.0", - "ignore": "^5.2.4", + "enhanced-resolve": "^5.17.1", + "eslint-plugin-es-x": "^7.8.0", + "get-tsconfig": "^4.8.1", + "globals": "^15.11.0", + "ignore": "^5.3.2", "minimatch": "^9.0.5", - "semver": "^7.5.3" + "semver": "^7.6.3" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6310,9 +6319,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -8901,11 +8910,10 @@ } }, "node_modules/mocha": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", - "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", + "version": "10.8.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.1.tgz", + "integrity": "sha512-WxSpEWgF03HfgNKBuysfK40DUaOSVX5zxgLDoieMGO+zyE69iq2eQ1vBypvIJ5mOPKpuVAqWiTbt4Orj7L6wVw==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", @@ -12147,14 +12155,14 @@ } }, "node_modules/typescript-eslint": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.11.0.tgz", - "integrity": "sha512-cBRGnW3FSlxaYwU8KfAewxFK5uzeOAp0l2KebIlPDOT5olVi65KDG/yjBooPBG0kGW/HLkoz1c/iuBFehcS3IA==", + "version": "8.12.2", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.12.2.tgz", + "integrity": "sha512-UbuVUWSrHVR03q9CWx+JDHeO6B/Hr9p4U5lRH++5tq/EbFq1faYZe50ZSBePptgfIKLEti0aPQ3hFgnPVcd8ZQ==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "8.11.0", - "@typescript-eslint/parser": "8.11.0", - "@typescript-eslint/utils": "8.11.0" + "@typescript-eslint/eslint-plugin": "8.12.2", + "@typescript-eslint/parser": "8.12.2", + "@typescript-eslint/utils": "8.12.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -12541,9 +12549,9 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/uuid": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.1.tgz", - "integrity": "sha512-wt9UB5EcLhnboy1UvA1mvGPXkIIrHSu+3FmUksARfdVw9tuPf3CH/CohxO0Su1ApoKAeT6BVzAJIvjTuQVSmuQ==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.2.tgz", + "integrity": "sha512-14FfcOJmqdjbBPdDjFQyk/SdT4NySW4eM0zcG+HqbHP5jzuH56xO3J1DGhgs/cEMCfwYi3HQI1gnTO62iaG+tQ==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" diff --git a/package.json b/package.json index 47ab23403..c76c0dcdd 100644 --- a/package.json +++ b/package.json @@ -67,17 +67,17 @@ "stream-buffers": "^3.0.3", "tar": "^7.4.3", "ts-node": "^10.9.2", - "uuid": "^11.0.1", + "uuid": "^11.0.2", "winston": "^3.15.0", "yaml": "^2.6.0", "yargs": "^17.7.2" }, "devDependencies": { "@eslint/js": "^9.12.0", - "@swc/cli": "^0.4.1-nightly.20240914", + "@swc/cli": "^0.5.0", "@swc/core": "^1.7.40", - "@types/adm-zip": "^0.5.5", - "@types/chai": "^5.0.0", + "@types/adm-zip": "^0.5.6", + "@types/chai": "^5.0.1", "@types/chai-as-promised": "^8.0.1", "@types/dot-object": "^2.1.6", "@types/eslint__js": "^8.42.3", @@ -88,7 +88,7 @@ "@types/ip": "^1.1.3", "@types/mocha": "^10.0.9", "@types/mocha-each": "^2.0.4", - "@types/node": "^22.8.0", + "@types/node": "^22.8.4", "@types/semver": "^7.5.8", "@types/sinon": "^17.0.3", "@types/sinon-chai": "^4.0.0", @@ -96,7 +96,7 @@ "@types/tar": "^6.1.13", "@types/uuid": "^10.0.0", "@types/yargs": "^17.0.33", - "@typescript-eslint/utils": "^8.10.0", + "@typescript-eslint/utils": "^8.12.2", "c8": "^10.1.2", "chai": "^5.1.2", "chai-as-promised": "^8.0.0", @@ -105,12 +105,12 @@ "eslint-plugin-headers": "^1.2.0", "eslint-plugin-import": "^2.30.0", "eslint-plugin-mocha": "^10.5.0", - "eslint-plugin-n": "^17.11.1", + "eslint-plugin-n": "^17.12.0", "eslint-plugin-promise": "^7.1.0", "eslint-plugin-tsdoc": "^0.3.0", "globals": "^15.11.0", "jest-mock": "^29.7.0", - "mocha": "^10.7.3", + "mocha": "^10.8.1", "mocha-each": "^2.0.1", "mocha-junit-reporter": "^2.2.1", "mocha-multi-reporters": "^1.5.1", @@ -124,7 +124,7 @@ "sinon-chai": "^4.0.0", "typedoc": "^0.26.10", "typescript": "^5.6.3", - "typescript-eslint": "^8.11.0" + "typescript-eslint": "^8.12.2" }, "repository": { "type": "git", diff --git a/resources/hedera-explorer-values.yaml b/resources/hedera-explorer-values.yaml new file mode 100644 index 000000000..bb873a163 --- /dev/null +++ b/resources/hedera-explorer-values.yaml @@ -0,0 +1,49 @@ +ingress: + enabled: false + hosts: + - host: "explorer.solo.local" + paths: + - path: / + pathType: Prefix + tls: + - secretName: ca-secret-hedera-explorer + hosts: + - '{{ index .Values.ingress.hosts 0 "host" }}' +labels: + solo.hedera.com/testSuiteName: "" + solo.hedera.com/testName: "" + solo.hedera.com/testRunUID: "" + solo.hedera.com/testCreationTimestamp: "" + solo.hedera.com/testExpirationTimestamp: "" + solo.hedera.com/testRequester: "" +nodeSelector: {} +tolerations: + - key: "solo-scheduling.io/os" + operator: "Equal" + value: "linux" + effect: "NoSchedule" + - key: "solo-scheduling.io/role" + operator: "Equal" + value: "network" + effect: "NoSchedule" +#global: +# namespaceOverride: "{{ .Values.global.namespaceOverride }}" +# The hedera explorer UI /api url will proxy all request to mirror node +# +# Without this we would need to expose the mirror node rest API publicly and specify its public url in the network config below +proxyPass: + /api: "http://{{ .Release.Name }}-rest" + +# In the json config below we are using the url as "/", instead of a regular http://mainnet.url +# This makes the explorer UI make a relative request to its own url +# This in combination with proxyPass above saves us the need to expose mirror node URL publicly +config: | + [ + { + "name": "localnet", + "displayName": "LOCALNET", + "url": "/", + "ledgerID": "03" + } + ] + diff --git a/resources/mirror-node-values.yaml b/resources/mirror-node-values.yaml new file mode 100644 index 000000000..bb7c33f8c --- /dev/null +++ b/resources/mirror-node-values.yaml @@ -0,0 +1,175 @@ +labels: + solo.hedera.com/testSuiteName: "" + solo.hedera.com/testName: "" + solo.hedera.com/testRunUID: "" + solo.hedera.com/testCreationTimestamp: "" + solo.hedera.com/testExpirationTimestamp: "" + solo.hedera.com/testRequester: "" +graphql: # not needed for default use case + enabled: false +rosetta: # not needed for default use case + enabled: false +redis: + enabled: true +#global: +# namespaceOverride: "{{ tpl (.Values.global.namespaceOverride | toString) }}" + +# importer is a component of the hedera mirror node +# config for subchart hedera-mirror/importer +importer: + nodeSelector: {} + tolerations: + - key: "solo-scheduling.io/os" + operator: "Equal" + value: "linux" + effect: "NoSchedule" + - key: "solo-scheduling.io/role" + operator: "Equal" + value: "network" + effect: "NoSchedule" + envFrom: + - secretRef: + name: mirror-passwords + - secretRef: + name: "{{ .Release.Name }}-redis" + - secretRef: + name: uploader-mirror-secrets + # The addressbook.bin file updates will be handled by infrastructure code or solo + addressBook: "" + config: + # importer is a springboot app, its application.yaml configuration starts here + # This config is mounted at [/usr/etc/hedera/application.yaml] in the importer pod + hedera: + mirror: + importer: + network: other + downloader: + allowAnonymousAccess: false + bucketName: "solo-streams" + # for s3 configuration of mirror node look at uploader-mirror-secrets.yaml + parser: + record: + entity: + notify: + enabled: true + redis: + enabled: false + sidecar: + enabled: true + management: + endpoint: + health: + group: + readiness: + exclude: redis +grpc: + nodeSelector: {} + tolerations: + - key: "solo-scheduling.io/os" + operator: "Equal" + value: "linux" + effect: "NoSchedule" + - key: "solo-scheduling.io/role" + operator: "Equal" + value: "network" + effect: "NoSchedule" + config: + hedera: + mirror: + grpc: + listener: + type: NOTIFY + management: + endpoint: + health: + group: + readiness: + exclude: redis +postgresql: + postgresql: + nodeSelector: {} + tolerations: + - key: "solo-scheduling.io/os" + operator: "Equal" + value: "linux" + effect: "NoSchedule" + - key: "solo-scheduling.io/role" + operator: "Equal" + value: "network" + effect: "NoSchedule" + pgpool: + replicaCount: 0 +rest: + nodeSelector: {} + tolerations: + - key: "solo-scheduling.io/os" + operator: "Equal" + value: "linux" + effect: "NoSchedule" + - key: "solo-scheduling.io/role" + operator: "Equal" + value: "network" + effect: "NoSchedule" + monitor: + enabled: false + redis: + enabled: true +web3: + nodeSelector: {} + tolerations: + - key: "solo-scheduling.io/os" + operator: "Equal" + value: "linux" + effect: "NoSchedule" + - key: "solo-scheduling.io/role" + operator: "Equal" + value: "network" + effect: "NoSchedule" + +# config for subchart hedera-mirror/monitor +# Sets up a Pinger service that periodically submits CRYPTO_TRANSFER transactions +# Additional configuration for node addresses, operator id and key should be handled by infrastructure code or solo +monitor: + nodeSelector: {} + tolerations: + - key: "solo-scheduling.io/os" + operator: "Equal" + value: "linux" + effect: "NoSchedule" + - key: "solo-scheduling.io/role" + operator: "Equal" + value: "network" + effect: "NoSchedule" + envFrom: + - secretRef: + name: mirror-passwords + - secretRef: + name: "{{ .Release.Name }}-redis" + - secretRef: + name: uploader-mirror-secrets + config: + hedera: + mirror: + monitor: + publish: + scenarios: + pinger: + properties: + amount: 1 + maxTransactionFee: 10000 + senderAccountId: 0.0.2 + recipientAccountId: 0.0.55 + transferTypes: + - CRYPTO + receiptPercent: 1 + tps: 10 + type: CRYPTO_TRANSFER + subscribe: + grpc: + hcs: + enabled: false + rest: + transactionId: + enabled: true + samplePercent: 1 + network: OTHER diff --git a/src/commands/flags.ts b/src/commands/flags.ts index e7dc3e7bb..9e06de93d 100644 --- a/src/commands/flags.ts +++ b/src/commands/flags.ts @@ -323,7 +323,7 @@ export const enableHederaExplorerTls: CommandFlag = { constName: 'enableHederaExplorerTls', name: 'enable-hedera-explorer-tls', definition: { - describe: 'Enable the Hedera Explorer TLS, defaults to false', + describe: 'Enable the Hedera Explorer TLS, defaults to false, requires certManager and certManagerCrds, which can be deployed through solo-cluster-setup chart or standalone', defaultValue: false, type: 'boolean' } @@ -693,7 +693,17 @@ export const mirrorNodeVersion: CommandFlag = { name: 'mirror-node-version', definition: { describe: 'Mirror node chart version', - defaultValue: '', + defaultValue: version.MIRROR_NODE_VERSION, + type: 'string' + } +} + +export const hederaExplorerVersion: CommandFlag = { + constName: 'hederaExplorerVersion', + name: 'hedera-explorer-version', + definition: { + describe: 'Hedera explorer chart version', + defaultValue: version.HEDERA_EXPLORER_VERSION, type: 'string' } } @@ -761,6 +771,7 @@ export const allFlags: CommandFlag[] = [ updateAccountKeys, valuesFile, mirrorNodeVersion, + hederaExplorerVersion, inputDir, outputDir ] diff --git a/src/commands/mirror_node.ts b/src/commands/mirror_node.ts index 8055741c9..f32b803d4 100644 --- a/src/commands/mirror_node.ts +++ b/src/commands/mirror_node.ts @@ -47,9 +47,9 @@ export class MirrorNodeCommand extends BaseCommand { flags.chartDirectory, flags.deployHederaExplorer, flags.enableHederaExplorerTls, - flags.soloChartVersion, flags.hederaExplorerTlsHostName, flags.hederaExplorerTlsLoadBalancerIp, + flags.hederaExplorerVersion, flags.namespace, flags.profileFile, flags.profileName, @@ -60,6 +60,28 @@ export class MirrorNodeCommand extends BaseCommand { ] } + async prepareHederaExplorerValuesArg (config: any) { + let valuesArg = '' + + const profileName = this.configManager.getFlag(flags.profileName) + const profileValuesFile = await this.profileManager.prepareValuesHederaExplorerChart(profileName) + if (profileValuesFile) { + valuesArg += this.prepareValuesFiles(profileValuesFile) + } + + if (config.enableHederaExplorerTls) { + valuesArg += this.getTlsValueArguments(config.tlsClusterIssuerType, config.enableHederaExplorerTls, config.namespace, + config.hederaExplorerTlsLoadBalancerIp, config.hederaExplorerTlsHostName) + } + + if (config.valuesFile) { + valuesArg += this.prepareValuesFiles(config.valuesFile) + } + + valuesArg += ` --set proxyPass./api="http://${constants.MIRROR_NODE_RELEASE_NAME}-rest" ` + return valuesArg + } + getTlsValueArguments (tlsClusterIssuerType: string, enableHederaExplorerTls: boolean, namespace: string, hederaExplorerTlsLoadBalancerIp: string, hederaExplorerTlsHostName: string) { let valuesArg = '' @@ -69,20 +91,20 @@ export class MirrorNodeCommand extends BaseCommand { throw new Error(`Invalid TLS cluster issuer type: ${tlsClusterIssuerType}, must be one of: "acme-staging", "acme-prod", or "self-signed"`) } - valuesArg += ' --set hedera-explorer.ingress.enabled=true' - valuesArg += ' --set cloud.haproxyIngressController.enabled=true' - valuesArg += ` --set global.ingressClassName=${namespace}-hedera-explorer-ingress-class` - valuesArg += ` --set-json 'hedera-explorer.ingress.hosts[0]={"host":"${hederaExplorerTlsHostName}","paths":[{"path":"/","pathType":"Prefix"}]}'` + valuesArg += ' --set ingress.enabled=true' + valuesArg += ' --set haproxyIngressController.enabled=true' + valuesArg += ` --set ingressClassName=${namespace}-hedera-explorer-ingress-class` + valuesArg += ` --set-json 'ingress.hosts[0]={"host":"${hederaExplorerTlsHostName}","paths":[{"path":"/","pathType":"Prefix"}]}'` if (hederaExplorerTlsLoadBalancerIp !== '') { valuesArg += ` --set haproxy-ingress.controller.service.loadBalancerIP=${hederaExplorerTlsLoadBalancerIp}` } if (tlsClusterIssuerType === 'self-signed') { - valuesArg += ' --set cloud.selfSignedClusterIssuer.enabled=true' + valuesArg += ' --set selfSignedClusterIssuer.enabled=true' } else { - valuesArg += ' --set cloud.acmeClusterIssuer.enabled=true' - valuesArg += ` --set hedera-explorer.certClusterIssuerType=${tlsClusterIssuerType}` + valuesArg += ' --set acmeClusterIssuer.enabled=true' + valuesArg += ` --set certClusterIssuerType=${tlsClusterIssuerType}` } } @@ -98,17 +120,6 @@ export class MirrorNodeCommand extends BaseCommand { valuesArg += this.prepareValuesFiles(profileValuesFile) } - if (config.enableHederaExplorerTls) { - valuesArg += this.getTlsValueArguments(config.tlsClusterIssuerType, config.enableHederaExplorerTls, config.namespace, - config.hederaExplorerTlsLoadBalancerIp, config.hederaExplorerTlsHostName) - } - - if (config.mirrorNodeVersion) { - valuesArg += ` --set global.image.tag=${config.mirrorNodeVersion}` - } - - valuesArg += ` --set hedera-mirror-node.enabled=true --set hedera-explorer.enabled=${config.deployHederaExplorer}` - if (config.valuesFile) { valuesArg += this.prepareValuesFiles(config.valuesFile) } @@ -124,9 +135,9 @@ export class MirrorNodeCommand extends BaseCommand { chartDirectory: string deployHederaExplorer: boolean enableHederaExplorerTls: string - soloChartVersion: string hederaExplorerTlsHostName: string hederaExplorerTlsLoadBalancerIp: string + hederaExplorerVersion: string namespace: string profileFile: string profileName: string @@ -154,9 +165,9 @@ export class MirrorNodeCommand extends BaseCommand { flags.chartDirectory, flags.deployHederaExplorer, flags.enableHederaExplorerTls, - flags.soloChartVersion, flags.hederaExplorerTlsHostName, flags.hederaExplorerTlsLoadBalancerIp, + flags.hederaExplorerVersion, flags.tlsClusterIssuerType, flags.valuesFile, flags.mirrorNodeVersion @@ -167,11 +178,13 @@ export class MirrorNodeCommand extends BaseCommand { ctx.config = this.getConfig(MirrorNodeCommand.DEPLOY_CONFIGS_NAME, MirrorNodeCommand.DEPLOY_FLAGS_LIST, ['chartPath', 'valuesArg']) as MirrorNodeDeployConfigClass - ctx.config.chartPath = await self.prepareChartPath(ctx.config.chartDirectory, - constants.SOLO_TESTING_CHART, constants.SOLO_DEPLOYMENT_CHART) + ctx.config.chartPath = await self.prepareChartPath('', // don't use chartPath which is for local solo-charts only + constants.MIRROR_NODE_RELEASE_NAME, constants.MIRROR_NODE_CHART) ctx.config.valuesArg = await self.prepareValuesArg(ctx.config) + ctx.config.valuesArg += this.prepareValuesFiles(constants.MIRROR_NODE_VALUES_FILE) + if (!await self.k8.hasNamespace(ctx.config.namespace)) { throw new SoloError(`namespace ${ctx.config.namespace} does not exist`) } @@ -189,20 +202,26 @@ export class MirrorNodeCommand extends BaseCommand { title: 'Prepare address book', task: async (ctx) => { ctx.addressBook = await self.accountManager.prepareAddressBookBase64() - ctx.config.valuesArg += ` --set "hedera-mirror-node.importer.addressBook=${ctx.addressBook}"` + ctx.config.valuesArg += ` --set "importer.addressBook=${ctx.addressBook}"` } }, { title: 'Deploy mirror-node', task: async (ctx) => { - await self.chartManager.upgrade( - ctx.config.namespace, - constants.SOLO_DEPLOYMENT_CHART, - ctx.config.chartPath, - ctx.config.valuesArg, - ctx.config.soloChartVersion - ) + await self.chartManager.install(ctx.config.namespace, constants.MIRROR_NODE_RELEASE_NAME, ctx.config.chartPath, ctx.config.mirrorNodeVersion, ctx.config.valuesArg) } + }, + { + title: 'Deploy hedera-explorer', + task: async (ctx) => { + let exploreValuesArg = await self.prepareHederaExplorerValuesArg(ctx.config) + exploreValuesArg += this.prepareValuesFiles(constants.EXPLORER_VALUES_FILE) + + await self.chartManager.install(ctx.config.namespace, + constants.HEDERA_EXPLORER_CHART, constants.HEDERA_EXPLORER_CHART_UTL, ctx.config.hederaExplorerVersion, exploreValuesArg) + + }, + skip: (ctx) => !ctx.config.deployHederaExplorer } ], { concurrent: false, @@ -335,11 +354,8 @@ export class MirrorNodeCommand extends BaseCommand { interface Context { config: { - chartDirectory: string - soloChartVersion: string namespace: string - chartPath: string - valuesArg: string + isChartInstalled: boolean } } @@ -366,20 +382,15 @@ export class MirrorNodeCommand extends BaseCommand { // @ts-ignore ctx.config = { - chartDirectory: self.configManager.getFlag(flags.chartDirectory) as string, - soloChartVersion: self.configManager.getFlag(flags.soloChartVersion) as string, - namespace: self.configManager.getFlag(flags.namespace) as string + namespace: self.configManager.getFlag(flags.namespace) } - ctx.config.chartPath = await self.prepareChartPath(ctx.config.chartDirectory, - constants.SOLO_TESTING_CHART, constants.SOLO_DEPLOYMENT_CHART) - - ctx.config.valuesArg = ' --set hedera-mirror-node.enabled=false --set hedera-explorer.enabled=false' - if (!await self.k8.hasNamespace(ctx.config.namespace)) { throw new SoloError(`namespace ${ctx.config.namespace} does not exist`) } + ctx.config.isChartInstalled = await this.chartManager.isChartInstalled(ctx.config.namespace, constants.MIRROR_NODE_RELEASE_NAME) + await self.accountManager.loadNodeClient(ctx.config.namespace) return lease.buildAcquireTask(task) @@ -388,14 +399,10 @@ export class MirrorNodeCommand extends BaseCommand { { title: 'Destroy mirror-node', task: async (ctx) => { - await self.chartManager.upgrade( - ctx.config.namespace, - constants.SOLO_DEPLOYMENT_CHART, - ctx.config.chartPath, - ctx.config.valuesArg, - ctx.config.soloChartVersion - ) - } + await this.chartManager.uninstall(ctx.config.namespace, constants.MIRROR_NODE_RELEASE_NAME) + await this.chartManager.uninstall(ctx.config.namespace, constants.HEDERA_EXPLORER_CHART) + }, + skip: (ctx) => !ctx.config.isChartInstalled }, { title: 'Delete PVCs', @@ -411,8 +418,9 @@ export class MirrorNodeCommand extends BaseCommand { await self.k8.deletePvc(pvc, ctx.config.namespace) } } - } - } + }, + skip: (ctx) => !ctx.config.isChartInstalled + }, ], { concurrent: false, rendererOptions: constants.LISTR_DEFAULT_RENDERER_OPTION @@ -462,7 +470,6 @@ export class MirrorNodeCommand extends BaseCommand { builder: (y: any) => flags.setCommandFlags(y, flags.chartDirectory, flags.force, - flags.soloChartVersion, flags.namespace ), handler: (argv: any) => { diff --git a/src/commands/network.ts b/src/commands/network.ts index e0f58fb8b..bdd58cfa5 100644 --- a/src/commands/network.ts +++ b/src/commands/network.ts @@ -125,7 +125,6 @@ export class NetworkCommand extends BaseCommand { } // do not deploy mirror node until after we have the updated address book - valuesArg += ' --set "hedera-mirror-node.enabled=false" --set "hedera-explorer.enabled=false"' valuesArg += ` --set "telemetry.prometheus.svcMonitor.enabled=${config.enablePrometheusSvcMonitor}"` if (config.releaseTag) { diff --git a/src/commands/prompts.ts b/src/commands/prompts.ts index 90b6f2d3f..f368f1411 100644 --- a/src/commands/prompts.ts +++ b/src/commands/prompts.ts @@ -20,7 +20,7 @@ import { SoloError, IllegalArgumentError } from '../core/errors.ts' import { ConfigManager, constants } from '../core/index.ts' import * as flags from './flags.ts' import * as helpers from '../core/helpers.ts' -import { resetDisabledPrompts } from './flags.ts' +import { hederaExplorerVersion, resetDisabledPrompts } from './flags.ts' import type { ListrTaskWrapper } from 'listr2' import { type CommandFlag } from '../types/index.ts' @@ -438,6 +438,14 @@ export async function promptMirrorNodeVersion (task: ListrTaskWrapper, input: any) { + return await promptToggle(task, input, + flags.hederaExplorerVersion.definition.defaultValue, + 'Would you like to choose hedera explorer version? ', + null, + flags.hederaExplorerVersion.name) +} + export async function promptInputDir (task: ListrTaskWrapper, input: any) { return await promptToggle(task, input, flags.inputDir.definition.defaultValue, @@ -495,6 +503,7 @@ export function getPromptMap (): Map { .set(flags.grpcEndpoints.name, promptGrpcEndpoints) .set(flags.endpointType.name, promptEndpointType) .set(flags.mirrorNodeVersion.name, promptMirrorNodeVersion) + .set(flags.hederaExplorerVersion, promptHederaExplorerVersion) .set(flags.inputDir.name, promptInputDir) .set(flags.outputDir.name, promptOutputDir) } diff --git a/src/core/constants.ts b/src/core/constants.ts index faae35a86..2ee27101f 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -60,11 +60,14 @@ export const JSON_RPC_RELAY_CHART_URL = 'https://hashgraph.github.io/hedera-json export const JSON_RPC_RELAY_CHART = 'hedera-json-rpc-relay' export const MIRROR_NODE_CHART_URL = 'https://hashgraph.github.io/hedera-mirror-node/charts' export const MIRROR_NODE_CHART = 'hedera-mirror' +export const MIRROR_NODE_RELEASE_NAME = 'mirror' +export const HEDERA_EXPLORER_CHART_UTL = 'oci://ghcr.io/hashgraph/hedera-mirror-node-explorer/hedera-explorer' +export const HEDERA_EXPLORER_CHART = 'hedera-explorer' export const DEFAULT_CHART_REPO: Map = new Map() -.set(SOLO_TESTING_CHART, SOLO_TESTING_CHART_URL) -.set(JSON_RPC_RELAY_CHART, JSON_RPC_RELAY_CHART_URL) -.set(MIRROR_NODE_CHART, MIRROR_NODE_CHART_URL) + .set(SOLO_TESTING_CHART, SOLO_TESTING_CHART_URL) + .set(JSON_RPC_RELAY_CHART, JSON_RPC_RELAY_CHART_URL) + .set(MIRROR_NODE_RELEASE_NAME, MIRROR_NODE_CHART_URL) // ------------------- Hedera Account related --------------------------------------------------------------------------------- export const OPERATOR_ID = process.env.SOLO_OPERATOR_ID || '0.0.2' @@ -87,6 +90,9 @@ export const POD_CONDITION_READY = 'Ready' export const POD_CONDITION_POD_SCHEDULED = 'PodScheduled' export const POD_CONDITION_STATUS_TRUE = 'True' +export const EXPLORER_VALUES_FILE = path.join('resources', 'hedera-explorer-values.yaml') +export const MIRROR_NODE_VALUES_FILE = path.join('resources', 'mirror-node-values.yaml') + /** * Listr related * @return a object that defines the default color options diff --git a/src/core/profile_manager.ts b/src/core/profile_manager.ts index 1772dc5f8..271239b75 100644 --- a/src/core/profile_manager.ts +++ b/src/core/profile_manager.ts @@ -241,7 +241,7 @@ export class ProfileManager { resourcesForHederaExplorerPod (profile: any, yamlRoot: object) { if (!profile) throw new MissingArgumentError('profile is required') if (!profile.explorer) return - return this._setChartItems('hedera-explorer', profile.explorer, yamlRoot) + return this._setChartItems('', profile.explorer, yamlRoot) } resourcesForMinioTenantPod (profile: any, yamlRoot: object) { @@ -355,6 +355,26 @@ export class ProfileManager { }) } + prepareValuesHederaExplorerChart (profileName: string) { + if (!profileName) throw new MissingArgumentError('profileName is required') + const profile = this.getProfile(profileName) as any + // generate the yaml + const yamlRoot = {} + this.resourcesForHederaExplorerPod(profile, yamlRoot) + + // write the yaml + const cachedValuesFile = path.join(this.cacheDir, `explorer-${profileName}.yaml`) + return new Promise((resolve, reject) => { + fs.writeFile(cachedValuesFile, yaml.dump(yamlRoot), (err) => { + if (err) { + reject(err) + } + + resolve(cachedValuesFile) + }) + }) + } + /** * Prepare a values file for mirror-node Helm chart * @param profileName - resource profile name @@ -369,18 +389,17 @@ export class ProfileManager { const yamlRoot = {} if (profile.mirror.postgresql) { if (profile.mirror.postgresql.persistence) { - this._setValue('hedera-mirror-node.postgresql.persistence.size', profile.mirror.postgresql.persistence.size, yamlRoot) + this._setValue('postgresql.persistence.size', profile.mirror.postgresql.persistence.size, yamlRoot) } - this._setChartItems('hedera-mirror-node.postgresql.postgresql', profile.mirror.postgresql.postgresql, yamlRoot) + this._setChartItems('postgresql.postgresql', profile.mirror.postgresql.postgresql, yamlRoot) } - this._setChartItems('hedera-mirror-node.importer', profile.mirror.importer, yamlRoot) - this._setChartItems('hedera-mirror-node.rest', profile.mirror.rest, yamlRoot) - this._setChartItems('hedera-mirror-node.web3', profile.mirror.web3, yamlRoot) - this._setChartItems('hedera-mirror-node.grpc', profile.mirror.grpc, yamlRoot) - this._setChartItems('hedera-mirror-node.monitor', profile.mirror.monitor, yamlRoot) - this.resourcesForHederaExplorerPod(profile, yamlRoot) + this._setChartItems('importer', profile.mirror.importer, yamlRoot) + this._setChartItems('rest', profile.mirror.rest, yamlRoot) + this._setChartItems('web3', profile.mirror.web3, yamlRoot) + this._setChartItems('grpc', profile.mirror.grpc, yamlRoot) + this._setChartItems('monitor', profile.mirror.monitor, yamlRoot) // write the yaml const cachedValuesFile = path.join(this.cacheDir, `mirror-${profileName}.yaml`) diff --git a/src/index.ts b/src/index.ts index a18388ac5..910a028e4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -96,7 +96,9 @@ export function main (argv: any) { logger.showUser(chalk.cyan('Version\t\t\t:'), chalk.yellow(configManager.getVersion())) logger.showUser(chalk.cyan('Kubernetes Context\t:'), chalk.yellow(context.name)) logger.showUser(chalk.cyan('Kubernetes Cluster\t:'), chalk.yellow(configManager.getFlag(flags.clusterName))) - logger.showUser(chalk.cyan('Kubernetes Namespace\t:'), chalk.yellow(configManager.getFlag(flags.namespace))) + if (configManager.getFlag(flags.namespace) !== undefined) { + logger.showUser(chalk.cyan('Kubernetes Namespace\t:'), chalk.yellow(configManager.getFlag(flags.namespace))) + } logger.showUser(chalk.cyan('**********************************************************************************')) return argv diff --git a/test/e2e/commands/mirror_node.test.ts b/test/e2e/commands/mirror_node.test.ts index 7084edc27..6dc75842b 100644 --- a/test/e2e/commands/mirror_node.test.ts +++ b/test/e2e/commands/mirror_node.test.ts @@ -91,6 +91,7 @@ e2eTestSuite(testName, argv, undefined, undefined, undefined, undefined, undefin } expect(mirrorNodeCmd.getUnusedConfigs(MirrorNodeCommand.DEPLOY_CONFIGS_NAME)).to.deep.equal([ + flags.chartDirectory.constName, flags.hederaExplorerTlsHostName.constName, flags.hederaExplorerTlsLoadBalancerIp.constName, flags.profileFile.constName, @@ -208,23 +209,5 @@ e2eTestSuite(testName, argv, undefined, undefined, undefined, undefined, undefin expect.fail() } }).timeout(MINUTES) - - it('should apply the mirror node version from the --mirror-node-version flag', async () => { - const mirrorNodeVersion = '0.111.1' - const customArgv = { [flags.mirrorNodeVersion.constName]: mirrorNodeVersion, ...argv } - - const valuesArg = await mirrorNodeCmd.prepareValuesArg(customArgv) - - expect(valuesArg).to.contain(`--set global.image.tag=${mirrorNodeVersion}`) - }).timeout(5 * SECONDS) - - it('should not apply the mirror node version from the --mirror-node-version flag if left empty', async () => { - const mirrorNodeVersion = '' - const customArgv = { [flags.mirrorNodeVersion.constName]: mirrorNodeVersion, ...argv } - - const valuesArg = await mirrorNodeCmd.prepareValuesArg(customArgv) - - expect(valuesArg).not.to.contain('--set global.image.tag=') - }).timeout(5 * SECONDS) }) }) diff --git a/test/unit/commands/init.test.ts b/test/e2e/integration/commands/init.test.ts similarity index 66% rename from test/unit/commands/init.test.ts rename to test/e2e/integration/commands/init.test.ts index 756806966..f6f8002d6 100644 --- a/test/unit/commands/init.test.ts +++ b/test/e2e/integration/commands/init.test.ts @@ -17,16 +17,16 @@ import { describe, it } from 'mocha' import { expect } from 'chai' -import { InitCommand } from '../../../src/commands/init.ts' +import { InitCommand } from '../../../../src/commands/init.ts' import { HelmDependencyManager, DependencyManager -} from '../../../src/core/dependency_managers/index.ts' +} from '../../../../src/core/dependency_managers/index.ts' import { - ChartManager, ConfigManager, constants, Helm, KeyManager, LeaseManager, logging, PackageDownloader, Zippy -} from '../../../src/core/index.ts' -import { getK8Instance } from '../../test_util.ts' -import { SECONDS } from '../../../src/core/constants.ts' + ChartManager, ConfigManager, constants, Helm, K8, KeyManager, LeaseManager, logging, PackageDownloader, Zippy +} from '../../../../src/core/index.ts' +import { SECONDS } from '../../../../src/core/constants.ts' +import sinon from 'sinon' const testLogger = logging.NewLogger('debug', true) describe('InitCommand', () => { @@ -44,18 +44,32 @@ describe('InitCommand', () => { const keyManager = new KeyManager(testLogger) - const k8 = getK8Instance(configManager) - const leaseManager = new LeaseManager(k8, testLogger, configManager) + let leaseManager: LeaseManager + let k8 : K8 - // @ts-ignore - const initCmd = new InitCommand({ - logger: testLogger, helm, k8, chartManager, configManager, depManager, keyManager, leaseManager + let sandbox = sinon.createSandbox() + let initCmd: InitCommand + + before(() => { + sandbox = sinon.createSandbox() + sandbox.stub(K8.prototype, 'init').callsFake(() => this) + k8 = new K8(configManager, testLogger) + leaseManager = new LeaseManager(k8, testLogger, configManager) + // @ts-ignore + initCmd = new InitCommand({ + logger: testLogger, helm, k8, chartManager, configManager, depManager, keyManager, leaseManager + }) }) + after(() => { + sandbox.restore() + }) + + describe('commands', () => { it('init execution should succeed', async () => { await expect(initCmd.init({})).to.eventually.equal(true) - }).timeout(20 * SECONDS) + }).timeout(60 * SECONDS) }) describe('methods', () => { diff --git a/test/unit/core/dependency_managers/helm_dependency_manager.test.ts b/test/e2e/integration/core/dependency_managers/helm_dependency_manager.test.ts similarity index 92% rename from test/unit/core/dependency_managers/helm_dependency_manager.test.ts rename to test/e2e/integration/core/dependency_managers/helm_dependency_manager.test.ts index c2de9653b..9ef67ec5c 100644 --- a/test/unit/core/dependency_managers/helm_dependency_manager.test.ts +++ b/test/e2e/integration/core/dependency_managers/helm_dependency_manager.test.ts @@ -20,10 +20,10 @@ import each from 'mocha-each' import fs from 'fs' import path from 'path' -import { HelmDependencyManager } from '../../../../src/core/dependency_managers/index.ts' -import { PackageDownloader, Zippy } from '../../../../src/core/index.ts' -import { getTestCacheDir, getTmpDir, testLogger } from '../../../test_util.ts' -import * as version from '../../../../version.ts' +import { HelmDependencyManager } from '../../../../../src/core/dependency_managers/index.ts' +import { PackageDownloader, Zippy } from '../../../../../src/core/index.ts' +import { getTestCacheDir, getTmpDir, testLogger } from '../../../../test_util.ts' +import * as version from '../../../../../version.ts' describe('HelmDependencyManager', () => { const downloader = new PackageDownloader(testLogger) diff --git a/test/test_util.ts b/test/test_util.ts index 97bdbf832..f35c35a6e 100644 --- a/test/test_util.ts +++ b/test/test_util.ts @@ -62,6 +62,7 @@ import type { SoloLogger } from '../src/core/logging.ts' import type { BaseCommand } from '../src/commands/base.ts' import type { NodeAlias } from '../src/types/aliases.ts' import type { NetworkNodeServices } from '../src/core/network_node_services.ts' +import sinon from 'sinon' export const testLogger = logging.NewLogger('debug', true) export const TEST_CLUSTER = 'solo-e2e' diff --git a/test/unit/commands/base.test.ts b/test/unit/commands/base.test.ts index e84d4566e..5f31ae2cb 100644 --- a/test/unit/commands/base.test.ts +++ b/test/unit/commands/base.test.ts @@ -22,11 +22,12 @@ import { ConfigManager, Helm, logging, PackageDownloader, Zippy, - constants + constants, + K8 } from '../../../src/core/index.ts' import { BaseCommand } from '../../../src/commands/base.ts' import * as flags from '../../../src/commands/flags.ts' -import { getK8Instance } from '../../test_util.ts' +import sinon from 'sinon' const testLogger = logging.NewLogger('debug', true) @@ -42,19 +43,31 @@ describe('BaseCommand', () => { const depManagerMap = new Map().set(constants.HELM, helmDepManager) const depManager = new DependencyManager(testLogger, depManagerMap) - const k8 = getK8Instance(configManager) + let sandbox = sinon.createSandbox() - // @ts-ignore - const baseCmd = new BaseCommand({ - logger: testLogger, - helm, - k8, - chartManager, - configManager, - depManager - }) + let baseCmd : BaseCommand describe('runShell', () => { + before(() => { + sandbox = sinon.createSandbox() + sandbox.stub(K8.prototype, 'init').callsFake(() => this) + const k8 = new K8(configManager, testLogger) + + // @ts-ignore + baseCmd = new BaseCommand({ + logger: testLogger, + helm, + k8, + chartManager, + configManager, + depManager + }) + }) + + after(() => { + sandbox.restore() + }) + it('should fail during invalid program check', async () => { await expect(baseCmd.run('INVALID_PROGRAM')).to.be.rejected }) diff --git a/test/unit/core/profile_manager.test.ts b/test/unit/core/profile_manager.test.ts index cf720a3ad..7a53fe419 100644 --- a/test/unit/core/profile_manager.test.ts +++ b/test/unit/core/profile_manager.test.ts @@ -146,17 +146,29 @@ describe('ProfileManager', () => { // validate yaml const valuesYaml: any = yaml.load(fs.readFileSync(valuesFile).toString()) - expect(valuesYaml['hedera-mirror-node'].postgresql.persistence.size).not.to.be.null - expect(valuesYaml['hedera-mirror-node'].postgresql.postgresql.resources.limits.cpu).not.to.be.null - expect(valuesYaml['hedera-mirror-node'].postgresql.postgresql.resources.limits.memory).not.to.be.null + expect(valuesYaml.postgresql.persistence.size).not.to.be.null + expect(valuesYaml.postgresql.postgresql.resources.limits.cpu).not.to.be.null + expect(valuesYaml.postgresql.postgresql.resources.limits.memory).not.to.be.null for (const component of ['grpc', 'rest', 'web3', 'importer']) { - expect(valuesYaml['hedera-mirror-node'][component].resources.limits.cpu).not.to.be.null - expect(valuesYaml['hedera-mirror-node'][component].resources.limits.memory).not.to.be.null - expect(valuesYaml['hedera-mirror-node'][component].readinessProbe.failureThreshold).to.equal(60) - expect(valuesYaml['hedera-mirror-node'][component].livenessProbe.failureThreshold).to.equal(60) + expect(valuesYaml[component].resources.limits.cpu).not.to.be.null + expect(valuesYaml[component].resources.limits.memory).not.to.be.null + expect(valuesYaml[component].readinessProbe.failureThreshold).to.equal(60) + expect(valuesYaml[component].livenessProbe.failureThreshold).to.equal(60) } - expect(valuesYaml['hedera-explorer'].resources.limits.cpu).not.to.be.null - expect(valuesYaml['hedera-explorer'].resources.limits.memory).not.to.be.null + }) + + it(`should determine hedera-explorer chart values [profile = ${input.profileName}]`, async () => { + configManager.setFlag(flags.profileFile, input.profileFile) + configManager.setFlag(flags.cacheDir, getTestCacheDir('ProfileManager')) + configManager.setFlag(flags.releaseTag, version.HEDERA_PLATFORM_VERSION) + profileManager.loadProfiles(true) + const valuesFile = await profileManager.prepareValuesHederaExplorerChart(input.profileName) as string + expect(fs.existsSync(valuesFile)).to.be.ok + + // validate yaml + const valuesYaml: any = yaml.load(fs.readFileSync(valuesFile).toString()) + expect(valuesYaml.resources.limits.cpu).not.to.be.null + expect(valuesYaml.resources.limits.memory).not.to.be.null }) it(`should determine rpc-relay chart values [profile = ${input.profileName}]`, async () => { diff --git a/version.ts b/version.ts index 308219437..c41fd49dc 100644 --- a/version.ts +++ b/version.ts @@ -23,3 +23,5 @@ export const JAVA_VERSION = '21.0.1+12' export const HELM_VERSION = 'v3.14.2' export const SOLO_CHART_VERSION = 'v0.33.0' export const HEDERA_PLATFORM_VERSION = 'v0.56.0' +export const MIRROR_NODE_VERSION = '0.116.0' +export const HEDERA_EXPLORER_VERSION = '0.2.1'