Skip to content

Commit

Permalink
fix: filtering in assets endpoint & update guides (#1512)
Browse files Browse the repository at this point in the history
* fix: filtering in assets endpoint & update guides

* run linter
  • Loading branch information
Imod7 authored Oct 14, 2024
1 parent 0d6f123 commit b67bdcf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

1. Make sure to be in the `master` branch, and `git pull origin master`.

1. Ensure that all CI/CD jobs from the last merged commit are passing. You can verify this by checking the [commits](https://github.com/paritytech/substrate-api-sidecar/commits/master/) on the master branch, where a green check (✅) should be present. If you see a red cross (❌) then you can click on it and do the following checks:
- If the failed job is related to benchmarks, e.g. `continuous-integration/gitlab-bench-polkadot` or `continuous-integration/gitlab-push-benchmark`, it is not critical, and you can proceed with the next steps of the release.
- If the failed job is related to staging deployment, e.g. `continuous-integration/gitlab-deploy-staging`, this is critical. In this case, you should check with the CI/CD team to get the relevant logs and fix the issue before continuing with the release.

1. Make sure that you've run `yarn` in this folder, and run `cargo install wasm-pack` so that that binary is available on your `$PATH`.

1. Checkout a branch with the format `name-v5-0-1` (with `name` being the name of the person doing the release, e.g. `tarik-v5-0-1`). When deciding what version will be released it is important to look over 1) PRs since the last release and 2) release notes for any updated polkadot-js dependencies as they may affect type definitions.
Expand Down
3 changes: 3 additions & 0 deletions guides/MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Review the security alerts raised by Dependabot [here](https://github.com/parity
- Check if there is a new major version of [Express](https://github.com/expressjs/express).
- Update the version by running the command `yarn add express@^X.X.X`, e.g. `yarn add express@^5.0.0`.
- After upgrading, we can do the usual sanity checks (e.g. `yarn`, `yarn dedupe`, `yarn build`, `yarn lint --fix`).
- Changes made due to the upgrade from Express v4 to v5, which should be double checked in next major Express release:
- Using `this.app.set('query parser', 'extended')` in `App.ts` to allow `[]` in query params.
- Direct access of private members like `_router` is not recommended/allowed in v5 (PR [#1510](https://github.com/paritytech/substrate-api-sidecar/pull/1510)).

**Frequency**: Yearly or longer.

Expand Down
4 changes: 4 additions & 0 deletions src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default class App {
*/
constructor({ controllers, preMiddleware, postMiddleware, host, port }: IAppConfiguration) {
this.app = express();
// Change needed because of upgrading Express v4 to v5
// Set query parser to 'extended' to correctly handle [] in query params
// Ref: https://github.com/expressjs/express/issues/5060
this.app.set('query parser', 'extended');
this.port = port;
this.host = host;

Expand Down

0 comments on commit b67bdcf

Please sign in to comment.