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

Sync main 20240702 #128

Merged
merged 4 commits into from
Jul 2, 2024
Merged

Sync main 20240702 #128

merged 4 commits into from
Jul 2, 2024

Conversation

jiqiang90
Copy link
Contributor

@jiqiang90 jiqiang90 commented Jul 1, 2024

Description

Follow up pr #127, this sync with main sdk

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

Copy link

github-actions bot commented Jul 1, 2024

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🔴 Statements 22.28% 734/3294
🔴 Branches 57.27% 63/110
🔴 Functions 26.32% 35/133
🔴 Lines 22.28% 734/3294

Test suite run failed

Failed tests: 2/17. Failed suites: 2/4.
  ● ApiService › waits on pending block to fetch hash

    URLTokenBaseHTTPError: Network request error. Received status 404 (Not Found): error while looking up block for round '40279608': block not found

      43 |   async getBlockByHeight(height: number): Promise<AlgorandBlock> {
      44 |     try {
    > 45 |       const blockInfo = await this.api.lookupBlock(height).do();
         |                         ^
      46 |       return this.constructBlock(camelCaseObjectKey(blockInfo));
      47 |     } catch (error) {
      48 |       if (error.message.includes('Max transactions limit exceeded')) {

      at Function.checkHttpError (node_modules/algosdk/src/client/urlTokenBaseHTTPClient.ts:135:11)
      at Function.formatFetchResponse (node_modules/algosdk/src/client/urlTokenBaseHTTPClient.ts:145:5)
      at HTTPClient.get (node_modules/algosdk/src/client/client.ts:239:19)
      at LookupBlock.do (node_modules/algosdk/src/client/v2/jsonrequest.ts:61:17)
      at AlgorandApi.getBlockByHeight (packages/node/src/algorand/api.algorand.ts:45:25)
      at AlgorandApi.getBlockHash (packages/node/src/algorand/api.algorand.ts:223:28)
      at packages/node/src/algorand/api.algorand.ts:192:22
          at async Promise.all (index 0)
      at AlgorandApi.fetchBlocks (packages/node/src/algorand/api.algorand.ts:190:29)
      at fetchLatestBlock (packages/node/src/indexer/api.service.spec.ts:83:8)

  ● ApiService › waits on pending block to fetch hash

    URLTokenBaseHTTPError: Network request error. Received status 404 (Not Found): error while looking up block for round '40279608': block not found

      43 |   async getBlockByHeight(height: number): Promise<AlgorandBlock> {
      44 |     try {
    > 45 |       const blockInfo = await this.api.lookupBlock(height).do();
         |                         ^
      46 |       return this.constructBlock(camelCaseObjectKey(blockInfo));
      47 |     } catch (error) {
      48 |       if (error.message.includes('Max transactions limit exceeded')) {

      at Function.checkHttpError (node_modules/algosdk/src/client/urlTokenBaseHTTPClient.ts:135:11)
      at Function.formatFetchResponse (node_modules/algosdk/src/client/urlTokenBaseHTTPClient.ts:145:5)
      at HTTPClient.get (node_modules/algosdk/src/client/client.ts:239:19)
      at LookupBlock.do (node_modules/algosdk/src/client/v2/jsonrequest.ts:61:17)
      at AlgorandApi.getBlockByHeight (packages/node/src/algorand/api.algorand.ts:45:25)
      at AlgorandApi.getBlockHash (packages/node/src/algorand/api.algorand.ts:223:28)
      at packages/node/src/algorand/api.algorand.ts:192:22
          at async Promise.all (index 0)
      at AlgorandApi.fetchBlocks (packages/node/src/algorand/api.algorand.ts:190:29)
      at fetchLatestBlock (packages/node/src/indexer/api.service.spec.ts:83:8)
      at Object.<anonymous> (packages/node/src/indexer/api.service.spec.ts:87:19)


  ● dictionary v1 › build correct dictionary entries and remove undefined fields in filter

    thrown: "Exceeded timeout of 5000 ms for a hook.
    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."

      60 | describe('dictionary v1', () => {
      61 |   let dictionary: AlgorandDictionaryV1;
    > 62 |   beforeEach(async () => {
         |   ^
      63 |     const testDictionaryService = new TestDictionaryService(
      64 |       project.network.chainId,
      65 |       nodeConfig,

      at packages/node/src/indexer/dictionary/v1/algorandDictionaryV1.spec.ts:62:3
      at Object.<anonymous> (packages/node/src/indexer/dictionary/v1/algorandDictionaryV1.spec.ts:60:1)

Report generated by 🧪jest coverage report action from f744ff2

@jiqiang90 jiqiang90 merged commit 9a74013 into main Jul 2, 2024
2 of 3 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