From bea28cf34b4970d466add3696531344f4db5a88f Mon Sep 17 00:00:00 2001 From: rmlearney-digicatapult Date: Mon, 12 Feb 2024 20:41:57 +0000 Subject: [PATCH 1/5] Change all instances of DSCP to SQNC, matching original case. --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 6 ++-- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 4 +-- .github/PULL_REQUEST_TEMPLATE.md | 4 +-- .github/workflows/release.yml | 4 +-- CONTRIBUTING.md | 44 +++++++++++------------ README.md | 28 +++++++-------- app/api-v3/api-doc.js | 2 +- app/server.js | 2 +- app/util/appUtil.js | 4 +-- docker-compose.yaml | 4 +-- package-lock.json | 4 +-- package.json | 10 +++--- test/helper/healthcheckFixtures.js | 24 ++++++------- test/integration/regressions.test.js | 2 +- test/jmeter/README.md | 36 +++++++++---------- 15 files changed, 89 insertions(+), 89 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md index 319c7b9..87fe9f0 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -5,15 +5,15 @@ about: Create a report to help us improve ### Prerequisites - [ ] Put an X between the brackets on this line if you have done all of the following: - - Checked the FAQs for common solutions: - - Checked that your issue isn't already filed: + - Checked the FAQs for common solutions: + - Checked that your issue isn't already filed: ### Description diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md index 4fcb5ff..23947c5 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -5,7 +5,7 @@ about: Suggest an idea for this project + ## Additional context diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e2a526e..d202f70 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,8 +2,8 @@ Copy the correct template for your contribution -🐛 Are you fixing a bug? Copy the template from https://github.com/digicatapult/dscp-api/blob/main/.github/ISSUE_TEMPLATE/bug_report.md -💻 Are you changing functionality? Copy the template from https://github.com/digicatapult/dscp-api/blob/main/.github/ISSUE_TEMPLATE/feature_request.md +🐛 Are you fixing a bug? Copy the template from https://github.com/digicatapult/sqnc-api/blob/main/.github/ISSUE_TEMPLATE/bug_report.md +💻 Are you changing functionality? Copy the template from https://github.com/digicatapult/sqnc-api/blob/main/.github/ISSUE_TEMPLATE/feature_request.md Replace this text with the contents of the template Fill in all sections of the template diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cfca50e..6224f80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -161,8 +161,8 @@ jobs: - name: Login to Dockerhub Registry uses: docker/login-action@v2 with: - username: ${{ secrets.DSCP_DOCKERHUB_USERNAME }} - password: ${{ secrets.DSCP_DOCKERHUB_TOKEN }} + username: ${{ secrets.SQNC_DOCKERHUB_USERNAME }} + password: ${{ secrets.SQNC_DOCKERHUB_TOKEN }} - name: Publish multi-arch image uses: docker/build-push-action@v4 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d2f2c27..683d4b5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ -# Contributing to veritable-api +# Contributing to sequence-api Firstly, we would like to thank you for taking the time to contribute! -The following is a set of guidelines for contributing to Veritable and its packages, which are hosted on the [digicatapult](https://github.com/digicatapult) organisation on GitHub. These are mostly guidelines, not rules. Use your best judgement, and feel free to propose changes to this document in a pull request. +The following is a set of guidelines for contributing to Sequence (SQNC) and its packages, which are hosted on the [digicatapult](https://github.com/digicatapult) organisation on GitHub. These are mostly guidelines, not rules. Use your best judgement, and feel free to propose changes to this document in a pull request. #### Table Of Contents @@ -24,7 +24,7 @@ The following is a set of guidelines for contributing to Veritable and its packa ## Code of Conduct -This project and all those participating in it are governed by the [Digital Catapult's Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behaviour to [opensource@digicatapult.org.uk](mailto:opensource@digicatapult.org.uk?subject=DSCP). +This project and all those participating in it are governed by the [Digital Catapult's Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behaviour to [opensource@digicatapult.org.uk](mailto:opensource@digicatapult.org.uk?subject=SQNC). ## FAQs @@ -34,19 +34,19 @@ We don't have any frequently asked questions yet. ### Reporting Bugs -This section guides you through submitting a bug report for veritable-api. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behaviour :computer: :computer:, and find related reports :mag_right:. +This section guides you through submitting a bug report for sequence-api. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behaviour :computer: :computer:, and find related reports :mag_right:. -Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](https://github.com/digicatapult/dscp-api/blob/main/.github/ISSUE_TEMPLATE/bug_report.md), the information it asks for helps us resolve issues faster. +Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](https://github.com/digicatapult/sqnc-api/blob/main/.github/ISSUE_TEMPLATE/bug_report.md), the information it asks for helps us resolve issues faster. > **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. #### Before Submitting A Bug Report -- **Perform a [cursory search](https://github.com/search?q=+is%3Aissue+user%3Adscp-api)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one. +- **Perform a [cursory search](https://github.com/search?q=+is%3Aissue+user%3Asqnc-api)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one. #### How Do I Submit A (Good) Bug Report? -Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue on that repository and provide the following information by filling in [the template](https://github.com/digicatapult/dscp-api/.github/blob/main/.github/ISSUE_TEMPLATE/bug_report.md). +Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue on that repository and provide the following information by filling in [the template](https://github.com/digicatapult/sqnc-api/.github/blob/main/.github/ISSUE_TEMPLATE/bug_report.md). Explain the problem and include additional details to help maintainers reproduce the problem: @@ -56,30 +56,30 @@ Explain the problem and include additional details to help maintainers reproduce - **Describe the behaviour you observed after following the steps** and point out what exactly is the problem with that behaviour. - **Explain which behaviour you expected to see instead and why.** - **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. If you use the keyboard while following the steps, \*\*record the GIF with the [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/Xaviju/byzanzUI) on Linux. -- **If you're reporting that veritable-api crashed**, include a crash report with a stack trace from the operating system. On macOS, the crash report will be available in `Console.app` under "Diagnostic and usage information" > "User diagnostic reports". Include the crash report in the issue in a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines), a [file attachment](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/), or put it in a [gist](https://gist.github.com/) and provide link to that gist. +- **If you're reporting that sequence-api crashed**, include a crash report with a stack trace from the operating system. On macOS, the crash report will be available in `Console.app` under "Diagnostic and usage information" > "User diagnostic reports". Include the crash report in the issue in a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines), a [file attachment](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/), or put it in a [gist](https://gist.github.com/) and provide link to that gist. - **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below. Provide more context by answering these questions: -- **Did the problem start happening recently** (e.g. after updating to a new version of veritable-api) or was this always a problem? -- If the problem started happening recently, **can you reproduce the problem in an older version of veritable-api?** What's the most recent version in which the problem doesn't happen? You can checkout older versions of veritable-api from [the releases page](https://github.com/digicatapult/dscp-api/releases). +- **Did the problem start happening recently** (e.g. after updating to a new version of sequence-api) or was this always a problem? +- If the problem started happening recently, **can you reproduce the problem in an older version of sequence-api?** What's the most recent version in which the problem doesn't happen? You can checkout older versions of sequence-api from [the releases page](https://github.com/digicatapult/sqnc-api/releases). - **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens. Include details about your configuration and environment: -- **Which version of veritable-api are you using?** You can get the exact version from the version attribute within package.json. -- **What's the name and version of the OS you've deployed veritable-api to**? -- **Are you running veritable-api in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and the guest? +- **Which version of sequence-api are you using?** You can get the exact version from the version attribute within package.json. +- **What's the name and version of the OS you've deployed sequence-api to**? +- **Are you running sequence-api in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and the guest? ### Suggesting Enhancements -This section guides you through submitting an enhancement suggestion for veritable-api, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:. +This section guides you through submitting an enhancement suggestion for sequence-api, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:. -Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](https://github.com/digicatapult/dscp-api/blob/main/.github/ISSUE_TEMPLATE/feature_request.md), including the steps that you imagine you would take if the feature you're requesting existed. +Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](https://github.com/digicatapult/sqnc-api/blob/main/.github/ISSUE_TEMPLATE/feature_request.md), including the steps that you imagine you would take if the feature you're requesting existed. #### Before Submitting An Enhancement Suggestion -- **Perform a [cursory search](https://github.com/search?q=+is%3Aissue+user%3Adscp-api)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. +- **Perform a [cursory search](https://github.com/search?q=+is%3Aissue+user%3Asqnc-api)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. #### How Do I Submit A (Good) Enhancement Suggestion? @@ -89,19 +89,19 @@ Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com - **Provide a step-by-step description of the suggested enhancement** in as many details as possible. - **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines). - **Describe the current behaviour** and **explain which behaviour you expected to see instead** and why. -- **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of veritable-api which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. -- **Explain why this enhancement would be useful** to most veritable-api users. +- **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of sequence-api which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. +- **Explain why this enhancement would be useful** to most sequence-api users. - **List some other text editors or applications where this enhancement exists.** -- **Specify which version of veritable-api you're using.** You can get the exact version from the version attribute within package.json. -- **What's the name and version of the OS you've deployed veritable-api to**? +- **Specify which version of sequence-api you're using.** You can get the exact version from the version attribute within package.json. +- **What's the name and version of the OS you've deployed sequence-api to**? ### Pull Requests The process described here has several goals: -- Maintain veritable-api's quality +- Maintain sequence-api's quality - Fix problems that are important to users -- Enable a sustainable system for veritable-api's maintainers to review contributions +- Enable a sustainable system for sequence-api's maintainers to review contributions Please follow these steps to have your contribution considered by the maintainers: diff --git a/README.md b/README.md index 6f1edf7..232a55c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# DSCP API +# Sequence (SQNC) API ## Description -A `Node.js` API to support communication to the [Substrate-based](https://www.substrate.io/) [`dscp-node`](https://github.com/digicatapult/dscp-node) (via [`polkadot-js/api`](https://www.npmjs.com/package/@polkadot/api)) and an [`IPFS`](https://ipfs.io/) node. +A `Node.js` API to support communication to the [Substrate-based](https://www.substrate.io/) [`sqnc-node`](https://github.com/digicatapult/sqnc-node) (via [`polkadot-js/api`](https://www.npmjs.com/package/@polkadot/api)) and an [`IPFS`](https://ipfs.io/) node. ## Getting started @@ -12,15 +12,15 @@ First, ensure you're running the correct [version](.node-version) of `npm`, then npm install ``` -The API requires instances of [`dscp-node`](https://github.com/digicatapult/dscp-node) and [`IPFS`](https://ipfs.io/). +The API requires instances of [`sqnc-node`](https://github.com/digicatapult/sqnc-node) and [`IPFS`](https://ipfs.io/). To bring them up locally: -### `dscp-node` +### `sqnc-node` -Clone [dscp-node](https://github.com/digicatapult/dscp-node) and follow the README to setup and build a local node. Then run the following in its root directory: +Clone [sqnc-node](https://github.com/digicatapult/sqnc-node) and follow the README to setup and build a local node. Then run the following in its root directory: ``` -./target/release/dscp-node --dev +./target/release/sqnc-node --dev ``` ### `IPFS` @@ -46,19 +46,19 @@ npm run test:integration ## Authentication -`dscp-api` uses an [Auth0](https://auth0.com/) Machine to Machine API to issue a JSON Web Token for authentication on its endpoints. You will need to create your own Auth0 API, which can be done for free, and set the appropriate [environment variables](#configuration) (those prefixed with `AUTH`). Follow the start of this [tutorial](https://auth0.com/docs/quickstart/backend/nodejs#configure-auth0-apis) to create an API. Go [here](app/routes/auth.js) and [here](app/auth.js) to see where the environment variables are used. +`sqnc-api` uses an [Auth0](https://auth0.com/) Machine to Machine API to issue a JSON Web Token for authentication on its endpoints. You will need to create your own Auth0 API, which can be done for free, and set the appropriate [environment variables](#configuration) (those prefixed with `AUTH`). Follow the start of this [tutorial](https://auth0.com/docs/quickstart/backend/nodejs#configure-auth0-apis) to create an API. Go [here](app/routes/auth.js) and [here](app/auth.js) to see where the environment variables are used. ## Configuration -The following environment variables are used by `dcsp-api` and can be configured. Entries marked as `required` are needed when running `dscp-api` in production mode. +The following environment variables are used by `sqnc-api` and can be configured. Entries marked as `required` are needed when running `sqnc-api` in production mode. | variable | required | default | description | | :------------------------------ | :------: | :--------------------: | :------------------------------------------------------------------------------------------- | | PORT | N | `3001` | The port for the API to listen on | -| API_HOST | Y | - | The hostname of the `dscp-node` the API should connect to | -| API_PORT | N | `9944` | The port of the `dscp-node` the API should connect to | +| API_HOST | Y | - | The hostname of the `sqnc-node` the API should connect to | +| API_PORT | N | `9944` | The port of the `sqnc-node` the API should connect to | | LOG_LEVEL | N | `info` | Logging level. Valid values are [`trace`, `debug`, `info`, `warn`, `error`, `fatal`] | -| USER_URI | Y | - | The Substrate `URI` representing the private key to use when making `dscp-node` transactions | +| USER_URI | Y | - | The Substrate `URI` representing the private key to use when making `sqnc-node` transactions | | IPFS_HOST | Y | - | Hostname of the `IPFS` node to use for metadata storage | | IPFS_PORT | N | `15001` | Port of the `IPFS` node to use for metadata storage | | METADATA_KEY_LENGTH | N | `32` | Fixed length of metadata keys | @@ -66,8 +66,8 @@ The following environment variables are used by `dcsp-api` and can be configured | API_VERSION | N | `package.json version` | API version | | API_MAJOR_VERSION | N | `v3` | API major version | | FILE_UPLOAD_MAX_SIZE | N | `200 * 1024 * 1024` | The Maximum file upload size (bytes) | -| SUBSTRATE_STATUS_POLL_PERIOD_MS | N | `10 * 1000` | Number of ms between calls to check dscp-node status | -| SUBSTRATE_STATUS_TIMEOUT_MS | N | `2 * 1000` | Number of ms to wait for response to dscp-node health requests | +| SUBSTRATE_STATUS_POLL_PERIOD_MS | N | `10 * 1000` | Number of ms between calls to check sqnc-node status | +| SUBSTRATE_STATUS_TIMEOUT_MS | N | `2 * 1000` | Number of ms to wait for response to sqnc-node health requests | | IPFS_STATUS_POLL_PERIOD_MS | N | `10 * 1000` | Number of ms between calls to check ipfs status | | IPFS_STATUS_TIMEOUT_MS | N | `2 * 1000` | Number of ms to wait for response to ipfs health requests | | AUTH_TYPE | N | `NONE` | Authentication type for routes on the service. Valid values: [`NONE`, `JWT`, `EXTERNAL`] | @@ -94,7 +94,7 @@ npm start ### Authenticated endpoints -If `AUTH_TYPE` env is set to `JWT`, the rest of the endpoints in `dscp-api` require authentication in the form of a header `'Authorization: Bearer YOUR_ACCESS_TOKEN'`: +If `AUTH_TYPE` env is set to `JWT`, the rest of the endpoints in `sqnc-api` require authentication in the form of a header `'Authorization: Bearer YOUR_ACCESS_TOKEN'`: 1. [GET /item/:id](#get-/item/:id) 2. [GET /item/:id/metadata/:metadataKey](#get-/item/:id/metadata/:metadataKey) diff --git a/app/api-v3/api-doc.js b/app/api-v3/api-doc.js index f169e7e..b9f1173 100644 --- a/app/api-v3/api-doc.js +++ b/app/api-v3/api-doc.js @@ -5,7 +5,7 @@ const { PORT, API_VERSION, API_MAJOR_VERSION } = env const apiDoc = { openapi: '3.0.3', info: { - title: 'DSCP API', + title: 'SQNC API', version: API_VERSION, }, servers: [ diff --git a/app/server.js b/app/server.js index f5a233e..da51935 100644 --- a/app/server.js +++ b/app/server.js @@ -39,7 +39,7 @@ export async function createHttpServer() { includePath: true, promClient: { collectDefaultMetrics: { - prefix: 'dscp_api_', + prefix: 'sqnc_api_', }, }, }) diff --git a/app/util/appUtil.js b/app/util/appUtil.js index 562e960..a040969 100644 --- a/app/util/appUtil.js +++ b/app/util/appUtil.js @@ -386,7 +386,7 @@ export const roleToIndex = async (role) => { await api.isReady const registry = api.registry const lookup = registry.lookup - const lookupId = registry.getDefinition('DscpNodeRuntimeRole') + const lookupId = registry.getDefinition('SqncNodeRuntimeRole') const rolesEnum = lookup.getTypeDef(lookupId).sub const entry = rolesEnum.find((e) => e.name === role) @@ -402,7 +402,7 @@ export const indexToRole = async (index) => { await api.isReady const registry = api.registry const lookup = registry.lookup - const lookupId = registry.getDefinition('DscpNodeRuntimeRole') + const lookupId = registry.getDefinition('SqncNodeRuntimeRole') const rolesEnum = lookup.getTypeDef(lookupId).sub const entry = rolesEnum.find((e) => e.index === index) diff --git a/docker-compose.yaml b/docker-compose.yaml index 2da7f3e..78e748b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -22,8 +22,8 @@ services: - 4002:4001 - 8081:8080 - 5002:5001 - dscp-node: - image: digicatapult/dscp-node:latest + sqnc-node: + image: digicatapult/sqnc-node:latest command: --base-path /data/ --dev --unsafe-ws-external diff --git a/package-lock.json b/package-lock.json index d7263c8..1509e4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "dscp-api", + "name": "sqnc-api", "version": "5.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "dscp-api", + "name": "sqnc-api", "version": "5.0.9", "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 1bc5736..72178f1 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,22 @@ { - "name": "dscp-api", + "name": "sqnc-api", "version": "5.0.9", - "description": "NodeJS API service for DSCP", + "description": "NodeJS API service for SQNC", "type": "module", "repository": { "type": "git", - "url": "git+https://github.com/digicatapult/dscp-api.git" + "url": "git+https://github.com/digicatapult/sqnc-api.git" }, "author": "Digital Catapult", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/digicatapult/dscp-api/issues" + "url": "https://github.com/digicatapult/sqnc-api/issues" }, "engines": { "node": ">=18.x.x", "npm": ">=8.x.x" }, - "homepage": "https://github.com/digicatapult/dscp-api#readme", + "homepage": "https://github.com/digicatapult/sqnc-api#readme", "main": "./app/index.js", "scripts": { "test": "NODE_ENV=test mocha --config ./test/mocharc.cjs ./test", diff --git a/test/helper/healthcheckFixtures.js b/test/helper/healthcheckFixtures.js index 1e6f67e..6b84dd8 100644 --- a/test/helper/healthcheckFixtures.js +++ b/test/helper/healthcheckFixtures.js @@ -2,7 +2,7 @@ import env from '../../app/env.js' const { API_VERSION } = env export const responses = { - ok: (dscpRuntimeVersion, ipfsVersion) => ({ + ok: (sqncRuntimeVersion, ipfsVersion) => ({ code: 200, body: { status: 'ok', @@ -13,11 +13,11 @@ export const responses = { detail: { chain: 'Development', runtime: { - name: 'dscp', + name: 'sqnc', versions: { authoring: 1, impl: 1, - spec: dscpRuntimeVersion, + spec: sqncRuntimeVersion, transaction: 1, }, }, @@ -55,7 +55,7 @@ export const responses = { }, }, }), - ipfsDown: (dscpRuntimeVersion) => ({ + ipfsDown: (sqncRuntimeVersion) => ({ code: 503, body: { status: 'down', @@ -66,11 +66,11 @@ export const responses = { detail: { chain: 'Development', runtime: { - name: 'dscp', + name: 'sqnc', versions: { authoring: 1, impl: 1, - spec: dscpRuntimeVersion, + spec: sqncRuntimeVersion, transaction: 1, }, }, @@ -85,7 +85,7 @@ export const responses = { }, }, }), - ipfsDownTimeout: (dscpRuntimeVersion) => ({ + ipfsDownTimeout: (sqncRuntimeVersion) => ({ code: 503, body: { status: 'down', @@ -96,11 +96,11 @@ export const responses = { detail: { chain: 'Development', runtime: { - name: 'dscp', + name: 'sqnc', versions: { authoring: 1, impl: 1, - spec: dscpRuntimeVersion, + spec: sqncRuntimeVersion, transaction: 1, }, }, @@ -115,7 +115,7 @@ export const responses = { }, }, }), - ipfsDownNoPeers: (dscpRuntimeVersion, ipfsVersion) => ({ + ipfsDownNoPeers: (sqncRuntimeVersion, ipfsVersion) => ({ code: 503, body: { status: 'down', @@ -126,11 +126,11 @@ export const responses = { detail: { chain: 'Development', runtime: { - name: 'dscp', + name: 'sqnc', versions: { authoring: 1, impl: 1, - spec: dscpRuntimeVersion, + spec: sqncRuntimeVersion, transaction: 1, }, }, diff --git a/test/integration/regressions.test.js b/test/integration/regressions.test.js index 0c6b682..c693eef 100644 --- a/test/integration/regressions.test.js +++ b/test/integration/regressions.test.js @@ -18,7 +18,7 @@ const { API_MAJOR_VERSION, AUTH_ISSUER, AUTH_AUDIENCE, AUTH_TYPE } = env const describeAuthOnly = AUTH_TYPE === 'JWT' ? describe : describe.skip describeAuthOnly('Bug regression tests', function () { - describe('API run-process is broken with file uploads (https://github.com/digicatapult/dscp-api/issues/17)', function () { + describe('API run-process is broken with file uploads (https://github.com/digicatapult/sqnc-api/issues/17)', function () { let app let jwksMock let authToken diff --git a/test/jmeter/README.md b/test/jmeter/README.md index 99206a4..ebdd410 100644 --- a/test/jmeter/README.md +++ b/test/jmeter/README.md @@ -32,27 +32,27 @@ When multiple threads were used there was a (random number) reduction of success ``` RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1014: Priority is too low: (759580530392 vs 759580530392): The transaction has too low priority to replace another transaction already in the pool. DRR: Error: 1014: Priority is too low: (759580530392 vs 759580530392): The transaction has too low priority to replace another transaction already in the pool. - at RpcCoder._checkError (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/@polkadot/rpc-provider/coder/index.cjs:84:13) - at RpcCoder.decodeResponse (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/@polkadot/rpc-provider/coder/index.cjs:47:10) - at WsProvider.value (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/@polkadot/rpc-provider/ws/index.cjs:231:90) - at W3CWebSocket.value [as onmessage] (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/@polkadot/rpc-provider/ws/index.cjs:211:153) - at W3CWebSocket._dispatchEvent [as dispatchEvent] (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/yaeti/lib/EventTarget.js:107:17) - at W3CWebSocket.onMessage (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/websocket/lib/W3CWebSocket.js:234:14) - at WebSocketConnection. (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/websocket/lib/W3CWebSocket.js:205:19) + at RpcCoder._checkError (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/@polkadot/rpc-provider/coder/index.cjs:84:13) + at RpcCoder.decodeResponse (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/@polkadot/rpc-provider/coder/index.cjs:47:10) + at WsProvider.value (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/@polkadot/rpc-provider/ws/index.cjs:231:90) + at W3CWebSocket.value [as onmessage] (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/@polkadot/rpc-provider/ws/index.cjs:211:153) + at W3CWebSocket._dispatchEvent [as dispatchEvent] (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/yaeti/lib/EventTarget.js:107:17) + at W3CWebSocket.onMessage (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/websocket/lib/W3CWebSocket.js:234:14) + at WebSocketConnection. (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/websocket/lib/W3CWebSocket.js:205:19) at WebSocketConnection.emit (events.js:375:28) - at WebSocketConnection.processFrame (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/websocket/lib/WebSocketConnection.js:554:26) - at /Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/websocket/lib/WebSocketConnection.js:323:40 + at WebSocketConnection.processFrame (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/websocket/lib/WebSocketConnection.js:554:26) + at /Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/websocket/lib/WebSocketConnection.js:323:40 RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1014: Priority is too low: (759580530392 vs 759580530392): The transaction has too low priority to replace another transaction already in the pool. (node:6609) UnhandledPromiseRejectionWarning: Error: 1014: Priority is too low: (759580530392 vs 759580530392): The transaction has too low priority to replace another transaction already in the pool. - at RpcCoder._checkError (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/@polkadot/rpc-provider/coder/index.cjs:84:13) - at RpcCoder.decodeResponse (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/@polkadot/rpc-provider/coder/index.cjs:47:10) - at WsProvider.value (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/@polkadot/rpc-provider/ws/index.cjs:231:90) - at W3CWebSocket.value [as onmessage] (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/@polkadot/rpc-provider/ws/index.cjs:211:153) - at W3CWebSocket._dispatchEvent [as dispatchEvent] (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/yaeti/lib/EventTarget.js:107:17) - at W3CWebSocket.onMessage (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/websocket/lib/W3CWebSocket.js:234:14) - at WebSocketConnection. (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/websocket/lib/W3CWebSocket.js:205:19) + at RpcCoder._checkError (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/@polkadot/rpc-provider/coder/index.cjs:84:13) + at RpcCoder.decodeResponse (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/@polkadot/rpc-provider/coder/index.cjs:47:10) + at WsProvider.value (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/@polkadot/rpc-provider/ws/index.cjs:231:90) + at W3CWebSocket.value [as onmessage] (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/@polkadot/rpc-provider/ws/index.cjs:211:153) + at W3CWebSocket._dispatchEvent [as dispatchEvent] (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/yaeti/lib/EventTarget.js:107:17) + at W3CWebSocket.onMessage (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/websocket/lib/W3CWebSocket.js:234:14) + at WebSocketConnection. (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/websocket/lib/W3CWebSocket.js:205:19) at WebSocketConnection.emit (events.js:375:28) - at WebSocketConnection.processFrame (/Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/websocket/lib/WebSocketConnection.js:554:26) - at /Users/dmorton/Projects/Digital_Catapult/dscp/dscp-api/node_modules/websocket/lib/WebSocketConnection.js:323:40 + at WebSocketConnection.processFrame (/Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/websocket/lib/WebSocketConnection.js:554:26) + at /Users/dmorton/Projects/Digital_Catapult/sqnc/sqnc-api/node_modules/websocket/lib/WebSocketConnection.js:323:40 (node:6609) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 18) ``` From 727e9ebe0ce2d8cef726613e090168664085c2a4 Mon Sep 17 00:00:00 2001 From: rmlearney-digicatapult Date: Mon, 12 Feb 2024 20:43:10 +0000 Subject: [PATCH 2/5] Version bump --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1509e4d..9893a13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sqnc-api", - "version": "5.0.9", + "version": "5.0.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sqnc-api", - "version": "5.0.9", + "version": "5.0.10", "license": "Apache-2.0", "dependencies": { "@polkadot/api": "^10.9.1", diff --git a/package.json b/package.json index 72178f1..d651012 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sqnc-api", - "version": "5.0.9", + "version": "5.0.10", "description": "NodeJS API service for SQNC", "type": "module", "repository": { From 62dd94bc354ab5372258ce965124436c96019c5d Mon Sep 17 00:00:00 2001 From: rmlearney-digicatapult Date: Mon, 12 Feb 2024 21:23:22 +0000 Subject: [PATCH 3/5] Update language to current repos --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 2 +- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md index 87fe9f0..7465c73 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -5,7 +5,7 @@ about: Create a report to help us improve diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md index 23947c5..52c8dc0 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -5,7 +5,7 @@ about: Suggest an idea for this project + ## Additional context From 0fba8d9446726a068dd1d08f11996f1eb4d5cdae Mon Sep 17 00:00:00 2001 From: rmlearney-digicatapult Date: Mon, 12 Feb 2024 21:30:51 +0000 Subject: [PATCH 4/5] Update codeowners --- .github/CODEOWNERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c1970af..64ff6db 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,4 @@ # Github CODEOWNERS file # Global code-owners for this repository -* @mattdean-digicatapult @jonmattgray @n3op2 - -helm/* @mattdean-digicatapult @dblane-digicatapult @jonmattgray @n3op2 +* @digicatapult/software-engineering From d8dbabf4a0d12370a6191a30c022f64a48eeeb38 Mon Sep 17 00:00:00 2001 From: rmlearney-digicatapult Date: Tue, 13 Feb 2024 16:44:06 +0000 Subject: [PATCH 5/5] Version bump: minor not patch --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9893a13..3aca9a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sqnc-api", - "version": "5.0.10", + "version": "5.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sqnc-api", - "version": "5.0.10", + "version": "5.1.0", "license": "Apache-2.0", "dependencies": { "@polkadot/api": "^10.9.1", diff --git a/package.json b/package.json index d651012..0a6f6a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sqnc-api", - "version": "5.0.10", + "version": "5.1.0", "description": "NodeJS API service for SQNC", "type": "module", "repository": {