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

Fix docker file monitor service #295

Merged
merged 4 commits into from
Jun 5, 2024
Merged

Conversation

jiqiang90
Copy link

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I have tested locally
  • I have performed a self review of my changes
  • Updated any relevant documentation
  • Linked to any relevant issues
  • I have added tests relevant to my changes
  • Any dependent changes have been merged and published in downstream modules
  • My code is up to date with the base branch
  • I have updated relevant changelogs. We suggest using chan

@jiqiang90 jiqiang90 requested a review from icezohu June 5, 2024 06:25
Copy link

github-actions bot commented Jun 5, 2024

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🔴 Statements 46.14% 2969/6435
🟡 Branches 66.53% 318/478
🔴 Functions 44.01% 125/284
🔴 Lines 46.14% 2969/6435

Test suite run failed

Failed tests: 20/86. Failed suites: 3/14.
  ● rawBlockToEthBlock › successfully converts a block

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● rawBlockToEthBlock › can fetch receipts

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15


  ● ApiService › can fetch blocks

    expect(received).resolves.toHaveLength()

    Received promise rejected instead of resolved
    Rejected to value: [Error: eth_getLogs range is too large, max is 10k blocks]

      79 |
      80 |   it('can fetch blocks', async () => {
    > 81 |     await expect(
         |           ^
      82 |       apiService.api.fetchBlocks(range(12369621, 12369625)),
      83 |     ).resolves.toHaveLength(4);
      84 |   });

      at expect (node_modules/expect/build/index.js:105:15)
      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:81:11)

  ● ApiService › can get the finalized height

    expect(received).toBeGreaterThan(expected)

    Expected: > 16000000
    Received:   0

      88 |
      89 |     console.log('Finalized height', height);
    > 90 |     expect(height).toBeGreaterThan(16_000_000);
         |                    ^
      91 |   });
      92 |
      93 |   it('ensure api errorCode is exposed when throwing', async () => {

      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:90:20)


  ● Api.ethereum › Should format transaction in logs, and the transaction gas should be bigInt type

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › should have the ability to get receipts via transactions from all types

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Decode nested logs in transactions

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Should decode transaction data and not clone object

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Should return raw logs, if decode fails

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Should not clone logs when parsing args

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Null filter support

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › !null filter support for logs, expect to filter out

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Null and 0x (empty) filter support for transaction data

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Null filter support, for undefined transaction.to

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Should return all tx if filter.to is not defined

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › filter.to Should support only null not undefined

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › If transaction is undefined, with null filter, should be supported

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Resolves the correct tags for finalization

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Assert blockHash on logs and block

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Should able to check is fullBlock

    eth_getLogs range is too large, max is 10k blocks

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

Report generated by 🧪jest coverage report action from 08c20fd

@jiqiang90 jiqiang90 requested a review from stwiname June 5, 2024 06:27
@jiqiang90 jiqiang90 merged commit 78aa675 into main Jun 5, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants