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

fix: filtering in assets endpoint & update guides #1512

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading