Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 [Bug]: grid-client ZDB test is failing #3717

Open
1 task done
Tracked by #3711
khaledyoussef24 opened this issue Dec 8, 2024 · 0 comments
Open
1 task done
Tracked by #3711

🐞 [Bug]: grid-client ZDB test is failing #3717

khaledyoussef24 opened this issue Dec 8, 2024 · 0 comments
Labels
type_bug Something isn't working
Milestone

Comments

@khaledyoussef24
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

which package/s did you face the problem with?

grid_client

What happened?

ZDB deployment test is failing (at the connection test to the deployed zdb)
FAIL tests/modules/zdb.test.ts (321.142 s)
✕ TC1236 - ZDB: Deploy ZDBs (310386 ms)

● TC1236 - ZDB: Deploy ZDBs

connect EHOSTUNREACH 4bf:1549:7c17:5f7e:ccb8:9071:1089:4c25:9900 - Local (:::65278)

● TC1236 - ZDB: Deploy ZDBs

thrown: "Exceeded timeout of 300000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  18 | });
  19 |
> 20 | test("TC1236 - ZDB: Deploy ZDBs", async () => {
     | ^
  21 |   /**********************************************
  22 |      Test Suite: Grid3_Client_TS (Automated)
  23 |      Test Cases: TC1236 - ZDB: Deploy ZDBs

  at Object.<anonymous> (tests/modules/zdb.test.ts:20:1)

Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 321.212 s

Steps To Reproduce

No response

which network/s did you face the problem on?

QA

version

2.6.1

Twin ID/s

No response

Node ID/s

No response

Farm ID/s

No response

Contract ID/s

No response

Relevant screenshots/screen records

Screenshot 2024-12-08 at 2 02 56 PM

Relevant log output

khaledyoussef@Khaleds-MacBook-Air grid_client % yarn workspace @threefold/grid_client test tests/modules/zdb.test.ts       
yarn workspace v1.19.0
yarn run v1.19.0
$ jest tests/modules/zdb.test.ts
  console.log
    Credentials not all found in env variables. Loading all credentials from default config.json...

      at Object.<anonymous> (tests/client_loader.ts:16:11)

  console.log
    GridProxy on https://gridproxy.qa.grid.tf Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 0)

  console.log
    TFChain on wss://tfchain.qa.grid.tf/ws Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 2)

  console.log
    RMB on wss://relay.qa.grid.tf Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 1)

  console.log
    Activation on https://activation.qa.grid.tf/activation/activate Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 4)

  console.log
    GraphQl on https://graphql.qa.grid.tf/graphql Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 3)

  console.warn
    2024-12-08 13:53:57        REGISTRY: Unknown signed extensions ContractIdProvides found, treating them as no-effect

      at apply (../../node_modules/@polkadot/util/cjs/logger.js:62:22)
      at Object.warn (../../node_modules/@polkadot/util/cjs/logger.js:131:14)
      at TypeRegistry.setSignedExtensions (../../node_modules/@polkadot/types/cjs/create/registry.js:594:9)
      at TypeRegistry.setMetadata (../../node_modules/@polkadot/types/cjs/create/registry.js:574:10)
      at ApiPromise._initRegistry (../../node_modules/@polkadot/api/cjs/base/Init.js:136:14)
      at ApiPromise._metaFromChain (../../node_modules/@polkadot/api/cjs/base/Init.js:354:10)
      at ApiPromise._loadMeta (../../node_modules/@polkadot/api/cjs/base/Init.js:284:229)
      at ApiPromise._onProviderConnect2 (../../node_modules/@polkadot/api/cjs/base/Init.js:429:21)

  console.warn
    2024-12-08 13:53:57        API/INIT: RPC methods not decorated: chainHead_unstable_body, chainHead_unstable_call, chainHead_unstable_continue, chainHead_unstable_follow, chainHead_unstable_genesisHash, chainHead_unstable_header, chainHead_unstable_stopOperation, chainHead_unstable_storage, chainHead_unstable_unfollow, chainHead_unstable_unpin, transaction_unstable_submitAndWatch, transaction_unstable_unwatch

      at apply (../../node_modules/@polkadot/util/cjs/logger.js:62:22)
      at Object.warn (../../node_modules/@polkadot/util/cjs/logger.js:131:14)
      at ApiPromise._filterRpcMethods (../../node_modules/@polkadot/api/cjs/base/Decorate.js:342:9)
      at ApiPromise._filterRpc (../../node_modules/@polkadot/api/cjs/base/Decorate.js:305:10)
      at ApiPromise._metaFromChain (../../node_modules/@polkadot/api/cjs/base/Init.js:356:10)
      at ApiPromise._loadMeta (../../node_modules/@polkadot/api/cjs/base/Init.js:284:229)
      at ApiPromise._onProviderConnect2 (../../node_modules/@polkadot/api/cjs/base/Init.js:429:21)

  console.warn
    2024-12-08 13:53:57        API/INIT: Not decorating runtime apis without matching versions: TransactionPaymentApi/4 (1 known), Metadata/2 (1 known)

      at apply (../../node_modules/@polkadot/util/cjs/logger.js:62:22)
      at Object.warn (../../node_modules/@polkadot/util/cjs/logger.js:131:14)
      at ApiPromise._decorateCalls (../../node_modules/@polkadot/api/cjs/base/Decorate.js:538:9)
      at ApiPromise._createDecorated (../../node_modules/@polkadot/api/cjs/base/Decorate.js:183:26)
      at ApiPromise._injectMetadata (../../node_modules/@polkadot/api/cjs/base/Decorate.js:219:14)
      at ApiPromise._initFromMeta (../../node_modules/@polkadot/api/cjs/base/Init.js:382:10)
      at ApiPromise._loadMeta (../../node_modules/@polkadot/api/cjs/base/Init.js:285:17)
      at ApiPromise._onProviderConnect2 (../../node_modules/@polkadot/api/cjs/base/Init.js:429:21)

  console.log
    TFChain on wss://tfchain.qa.grid.tf/ws Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 2)

  console.log
    GraphQl on https://graphql.qa.grid.tf/graphql Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 3)

  console.log
    GridProxy on https://gridproxy.qa.grid.tf Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 0)

  console.log
    RMB on wss://relay.qa.grid.tf Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 1)

  console.log
    Activation on https://activation.qa.grid.tf/activation/activate Success!

      at MonitorEventEmitter.monitorLogsHandler (../monitoring/dist/node/helpers/events.js:35:21)
          at async Promise.all (index 4)

  console.log
    { zos: '3.12.10', zinit: 'v0.2.11' }

      at log (tests/utils.ts:12:11)

  console.log
    Start creating the ZDB deployment with name bebf0m7khjtbp8t

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    Creating a zdb on node: 2

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    Merging workloads

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    Deploying on node_id: 2

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    Lock acquired

      at TFClient.applyExtrinsic (../tfchain_client/dist/node/client.js:366:17)

  console.warn
    2024-12-08 13:54:12        API/INIT: Not decorating runtime apis without matching versions: TransactionPaymentApi/4 (1 known), Metadata/2 (1 known)

      at apply (../../node_modules/@polkadot/util/cjs/logger.js:62:22)
      at Object.warn (../../node_modules/@polkadot/util/cjs/logger.js:131:14)
      at ApiPromise._decorateCalls (../../node_modules/@polkadot/api/cjs/base/Decorate.js:538:9)
      at ApiPromise._createDecorated (../../node_modules/@polkadot/api/cjs/base/Decorate.js:183:26)
      at ApiPromise.at (../../node_modules/@polkadot/api/cjs/base/Init.js:161:17)

  console.log
    phase: {"applyExtrinsic":1}, section: balances, method: Withdraw, data: ["5GRa2v317RjNwqVddXDbCcsgERk9PaShEUwGDTL5SnVj3LGh",10241]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: smartContractModule, method: ContractCreated, data: [{"version":4,"state":{"created":null},"contractId":50063,"twinId":56,"contractType":{"nodeContract":{"nodeId":2,"deploymentHash":"0x3165383133333538626435366164383930333034653836353862643632663233","deploymentData":"0x7b2276657273696f6e223a332c2274797065223a227a6462222c226e616d65223a2262656266306d376b686a7462703874222c2270726f6a6563744e616d65223a227a64622f6468317033707433306176796a6d30227d","publicIps":0,"publicIpsList":[]}},"solutionProviderId":null}]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: utility, method: ItemCompleted, data: []

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: utility, method: BatchCompleted, data: []

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: balances, method: Deposit, data: ["5DaCgDYD4crAkttVYBHQvs9uHqBK9afiX3g4UkubfH18EkSw",10241]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: transactionPayment, method: TransactionFeePaid, data: ["5GRa2v317RjNwqVddXDbCcsgERk9PaShEUwGDTL5SnVj3LGh",10241,0]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: system, method: ExtrinsicSuccess, data: [{"weight":{"refTime":1294912416,"proofSize":4333},"class":"Normal","paysFee":"Yes"}]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    Lock released

      at TFClient.applyExtrinsic (../tfchain_client/dist/node/client.js:373:21)

  console.log
    Sending deployment to node_id: 2

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    A deployment has been created on node_id: 2 with contract_id: 50063

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    Waiting for deployment with contract_id: 50063 to be ready

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)
          at Array.map (<anonymous>)

  console.log
    {
      contracts: {
        created: [
          {
            version: 4,
            state: { created: null },
            contractId: 50063,
            twinId: 56,
            contractType: {
              nodeContract: {
                nodeId: 2,
                deploymentHash: '1e813358bd56ad890304e8658bd62f23',
                deploymentData: '{"version":3,"type":"zdb","name":"bebf0m7khjtbp8t","projectName":"zdb/dh1p3pt30avyjm0"}',
                publicIps: 0,
                publicIpsList: []
              }
            },
            solutionProviderId: null
          }
        ],
        updated: [],
        deleted: []
      }
    }

      at log (tests/utils.ts:12:11)

  console.log
    [
      {
        version: 0,
        contractId: 50063,
        nodeId: 2,
        name: 'dh1p3pt30avyjm0',
        created: 1733658852,
        status: 'ok',
        message: '',
        size: 13958643712,
        mode: 'user',
        publicNamespace: false,
        password: '4yk8dq2c6uqv8jb',
        metadata: '"deploymentType": "zdb"',
        description: 'test deploying zdbs via ts grid3 client',
        resData: {
          Namespace: '56-50063-dh1p3pt30avyjm0',
          IPs: [
            '300:170b:469a:2ed8:e735:ea0a:b409:8959',
            '4bf:1549:7c17:5f7e:ccb8:9071:1089:4c25'
          ],
          Port: 9900
        }
      }
    ]

      at log (tests/utils.ts:12:11)

  console.warn
    2024-12-08 13:54:31        API/INIT: Not decorating runtime apis without matching versions: TransactionPaymentApi/4 (1 known), Metadata/2 (1 known)

      at apply (../../node_modules/@polkadot/util/cjs/logger.js:62:22)
      at Object.warn (../../node_modules/@polkadot/util/cjs/logger.js:131:14)
      at ApiPromise._decorateCalls (../../node_modules/@polkadot/api/cjs/base/Decorate.js:538:9)
      at ApiPromise._createDecorated (../../node_modules/@polkadot/api/cjs/base/Decorate.js:183:26)
      at ApiPromise.at (../../node_modules/@polkadot/api/cjs/base/Init.js:161:17)

  console.log
    Start deleting the ZDB deployment with name bebf0m7khjtbp8t

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    Merging workloads

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    Deleting deployment with contract_id: 50063

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    Lock acquired

      at TFClient.applyExtrinsic (../tfchain_client/dist/node/client.js:366:17)

  console.warn
    2024-12-08 13:59:12        API/INIT: Not decorating runtime apis without matching versions: TransactionPaymentApi/4 (1 known), Metadata/2 (1 known)

      at apply (../../node_modules/@polkadot/util/cjs/logger.js:62:22)
      at Object.warn (../../node_modules/@polkadot/util/cjs/logger.js:131:14)
      at ApiPromise._decorateCalls (../../node_modules/@polkadot/api/cjs/base/Decorate.js:538:9)
      at ApiPromise._createDecorated (../../node_modules/@polkadot/api/cjs/base/Decorate.js:183:26)
      at ApiPromise.at (../../node_modules/@polkadot/api/cjs/base/Init.js:161:17)

  console.log
    phase: {"applyExtrinsic":1}, section: balances, method: Withdraw, data: ["5GRa2v317RjNwqVddXDbCcsgERk9PaShEUwGDTL5SnVj3LGh",10119]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: balances, method: Reserved, data: ["5GRa2v317RjNwqVddXDbCcsgERk9PaShEUwGDTL5SnVj3LGh",1286]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: smartContractModule, method: ContractBilled, data: [{"contractId":50063,"timestamp":1733659152,"discountLevel":"Gold","amountBilled":1286}]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: balances, method: ReserveRepatriated, data: ["5GRa2v317RjNwqVddXDbCcsgERk9PaShEUwGDTL5SnVj3LGh","5CNposRewardAccount11111111111111111111111111FSU",129,"Free"]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: balances, method: ReserveRepatriated, data: ["5GRa2v317RjNwqVddXDbCcsgERk9PaShEUwGDTL5SnVj3LGh","5FR2PuAfkpXKbcLtTjNR8sPSt9yDHZR5tHHL6Ux9TdV4YE4M",643,"Free"]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: balances, method: ReserveRepatriated, data: ["5GRa2v317RjNwqVddXDbCcsgERk9PaShEUwGDTL5SnVj3LGh","5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",514,"Free"]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: smartContractModule, method: RewardDistributed, data: [50063,1286,0]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: smartContractModule, method: NodeContractCanceled, data: [50063,2,56]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: utility, method: ItemCompleted, data: []

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: utility, method: BatchCompleted, data: []

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: balances, method: Deposit, data: ["5CJo3yK6pt5XRAcr2Rh3uYqej4NUQcoB6UVDByjdaCzs7Xxg",10119]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: transactionPayment, method: TransactionFeePaid, data: ["5GRa2v317RjNwqVddXDbCcsgERk9PaShEUwGDTL5SnVj3LGh",10119,0]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    phase: {"applyExtrinsic":1}, section: system, method: ExtrinsicSuccess, data: [{"weight":{"refTime":1249147416,"proofSize":7590},"class":"Normal","paysFee":"Yes"}]

      at ../tfchain_client/dist/node/client.js:315:33
          at Array.forEach (<anonymous>)

  console.log
    Lock released

      at TFClient.applyExtrinsic (../tfchain_client/dist/node/client.js:373:21)

  console.log
    Deployment has been deleted with contract_id: 50063

      at EventEmitter.logsHandler (src/helpers/events.ts:6:11)

  console.log
    { created: [], deleted: [ { contractId: 50063 } ], updated: [] }

      at log (tests/utils.ts:12:11)

  console.log
    disconnecting

      at Client.disconnect (../tfchain_client/dist/node/client.js:141:21)

 FAIL  tests/modules/zdb.test.ts (321.142 s)
  ✕ TC1236 - ZDB: Deploy ZDBs (310386 ms)

  ● TC1236 - ZDB: Deploy ZDBs

    connect EHOSTUNREACH 4bf:1549:7c17:5f7e:ccb8:9071:1089:4c25:9900 - Local (:::65278)



  ● TC1236 - ZDB: Deploy ZDBs

    thrown: "Exceeded timeout of 300000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      18 | });
      19 |
    > 20 | test("TC1236 - ZDB: Deploy ZDBs", async () => {
         | ^
      21 |   /**********************************************
      22 |      Test Suite: Grid3_Client_TS (Automated)
      23 |      Test Cases: TC1236 - ZDB: Deploy ZDBs

      at Object.<anonymous> (tests/modules/zdb.test.ts:20:1)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        321.212 s
Ran all test suites matching /tests\/modules\/zdb.test.ts/i.
Jest did not exit one second after the test run has completed.

'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /Users/khaledyoussef/.nvm/versions/node/v18.20.5/bin/node
Arguments: /Users/khaledyoussef/work/new/tfgrid-sdk-ts/.yarn/releases/yarn-1.19.0.cjs test tests/modules/zdb.test.ts
Directory: /Users/khaledyoussef/work/new/tfgrid-sdk-ts/packages/grid_client
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
khaledyoussef@Khaleds-MacBook-Air grid_client %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type_bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants