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

Expose ledger-subquery version to GQL API #125

Closed
bryanchriswhite opened this issue Oct 10, 2022 · 1 comment · Fixed by #226
Closed

Expose ledger-subquery version to GQL API #125

bryanchriswhite opened this issue Oct 10, 2022 · 1 comment · Fixed by #226
Assignees
Labels
C-enhancement Category: New feature or request
Milestone

Comments

@bryanchriswhite
Copy link

bryanchriswhite commented Oct 10, 2022

Proposal

For now let's add a ReleaseVersion entity and write the version record at boot or something:
- git tag
- git commit hash
- timestamp when deployed

It looks like this is already exposed via the subql framework and we just needed to understand how to use it. TLDR; Apparently we can increment the version property in the package.json of the node and query packages of the subql (git) submodule. (See: #125 (comment) for more.)

  • Document subql package.json version update process
  • Update package.json versions to present
  • Ensure metrics to uses this version
@bryanchriswhite
Copy link
Author

bryanchriswhite commented Dec 13, 2022

It has come to my attention that degrees of freedom already exists for tracking the version of the subquery-node as well as the graphql api services, independently, under the (built-in) _metadata entity:

query {
  _metadata {
    indexerNodeVersion
    queryNodeVersion
  }
}

See subql/packages/query/src/graphql/plugins/GetMetadataPlugin.ts:119 for the complete type definition.

queryNodeVersion

Defined in the subql query package.json as version (see: GetMetadataPlugin.ts:31 & :75)

indexerNodeVersion

Defined in the subql node package.json as version. Returned by the subquery-node's /meta API endpoint (see: subql/packages/node/src/meta/meta.service.ts:44).

@bryanchriswhite bryanchriswhite linked a pull request Dec 16, 2022 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants