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

Implement assigning args to runtime dynamic ds #265

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

stwiname
Copy link
Contributor

@stwiname stwiname commented Jun 21, 2024

Description

Creating dynamic data sources would not set any of the filter options. This now allows setting values and attributes to filter by.

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

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
Contributor

github-actions bot commented Jun 21, 2024

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🔴 Statements 39.32% 2110/5366
🟡 Branches 74.92% 233/311
🔴 Functions 45.45% 110/242
🔴 Lines 39.32% 2110/5366

Test suite run failed

Failed tests: 20/66. Failed suites: 4/8.
  ● CosmosUtils › filter message data for true

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › filter message data for false

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › filter nested message data for true

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › filter nested message data for false

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › filter nested message data for invalid path

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › does not wrap events of failed transaction

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › does not lazy decode failed message filters

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › lazy decode passed message filters

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › can filter long type decoded msg for true

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › can filter long type decoded msg for number filter

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › can filter long type decoded msg for false

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › filterMessageData function › contractCall filtering › should return true for non-object contractCall in msg

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › filterMessageData function › contractCall filtering › should return false for non-object contractCall not in msg

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › filterMessageData function › contractCall filtering › should return false for object contractCall not in msg

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)

  ● CosmosUtils › filterMessageData function › contractCall filtering › should return true for object contractCall in msg

    Request failed with status code 502

      at createError (node_modules/axios/lib/core/createError.js:16:15)
      at settle (node_modules/axios/lib/core/settle.js:17:12)
      at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)


  ● Dictionary Queries › Message Filter Queries › Basic wasm filter works

    ApolloError: Response not successful: Received status code 500

      at new ApolloError (node_modules/@apollo/client/errors/index.js:39:28)
      at node_modules/@apollo/client/core/QueryManager.js:772:71
      at both (node_modules/@apollo/client/utilities/observables/asyncMap.js:22:31)
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:11:72
      at Object.then (node_modules/@apollo/client/utilities/observables/asyncMap.js:11:24)
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:24:49)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/utilities/observables/iteration.js:7:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/utilities/observables/iteration.js:7:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:76:21)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at handleError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:167:14)
      at node_modules/@apollo/client/link/http/createHttpLink.js:145:17

  ● Dictionary Queries › Message Filter Queries › Wasm with contract filter builds a valid query

    ApolloError: Response not successful: Received status code 500

      at new ApolloError (node_modules/@apollo/client/errors/index.js:39:28)
      at node_modules/@apollo/client/core/QueryManager.js:772:71
      at both (node_modules/@apollo/client/utilities/observables/asyncMap.js:22:31)
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:11:72
      at Object.then (node_modules/@apollo/client/utilities/observables/asyncMap.js:11:24)
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:24:49)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/utilities/observables/iteration.js:7:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/utilities/observables/iteration.js:7:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:76:21)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at handleError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:167:14)
      at node_modules/@apollo/client/link/http/createHttpLink.js:145:17

  ● Dictionary Queries › Message Filter Queries › Wasm with nested filter works

    ApolloError: Response not successful: Received status code 500

      at new ApolloError (node_modules/@apollo/client/errors/index.js:39:28)
      at node_modules/@apollo/client/core/QueryManager.js:772:71
      at both (node_modules/@apollo/client/utilities/observables/asyncMap.js:22:31)
      at node_modules/@apollo/client/utilities/observables/asyncMap.js:11:72
      at Object.then (node_modules/@apollo/client/utilities/observables/asyncMap.js:11:24)
      at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:24:49)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@apollo/client/utilities/observables/iteration.js:7:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@apollo/client/utilities/observables/iteration.js:7:25)
      at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:76:21)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at handleError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:167:14)
      at node_modules/@apollo/client/link/http/createHttpLink.js:145:17


  ● project.yaml › Validate incorrect chaintypes

    expect(received).toThrow(expected)

    Expected substring: "failed to parse project.yaml"
    Received message:   "Failed to parse project. Please see below for more information.
    An instance of DeploymentV1_0_0 has failed the validation:
     - property network.chaintypes.osmosis.gamm.v1beta1.file has failed the following constraints: isString·
     - property network.chaintypes.osmosis.gamm.v1beta1.messages has failed the following constraints: isArray·
    "

          49 |
          50 |   validate(): void {
        > 51 |     return this._impl.validate();
             |                       ^
          52 |   }
          53 |
          54 |   get dataSources(): CosmosDatasource[] {

      at ProjectManifestV1_0_0Impl.validate (node_modules/@subql/common/src/project/versioned/base.ts:49:13)
      at CosmosProjectManifestVersioned.validate (packages/common-cosmos/src/project/versioned/ProjectManifestVersioned.ts:51:23)
      at parseCosmosProjectManifest (packages/common-cosmos/src/project/load.ts:8:19)
      at packages/common-cosmos/src/project/project.spec.ts:47:44
      at Object.<anonymous> (node_modules/expect/build/toThrowMatchers.js:74:11)
      at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:320:21)
      at Object.<anonymous> (packages/common-cosmos/src/project/project.spec.ts:47:62)
      at Object.<anonymous> (packages/common-cosmos/src/project/project.spec.ts:47:62)


  ● KyveApi › able to fetch/write/read blocks using Kyve api

    ENOENT: no such file or directory, open '/tmp/p0qklx/bundle_2_0.json'



Report generated by 🧪jest coverage report action from 1b67a56

@stwiname stwiname merged commit 36d77ff into main Jun 21, 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