diff --git a/.yarn/versions/d2b1da3c.yml b/.yarn/versions/d2b1da3c.yml new file mode 100644 index 0000000000..ed92b63a52 --- /dev/null +++ b/.yarn/versions/d2b1da3c.yml @@ -0,0 +1,4 @@ +undecided: + - "@subql/cli" + - "@subql/node" + - "@subql/node-core" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 27440230ce..79bb32c9d2 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [5.3.0] - 2024-10-21 ### Changed - Improve codegen error messages (#2567) - Update codegen to match changes to store interface making options.limit required on getByField(s) methods (#2567) @@ -685,7 +687,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - support subcommand codegen - support subcommand init -[Unreleased]: https://github.com/subquery/subql/compare/cli/5.2.8...HEAD +[Unreleased]: https://github.com/subquery/subql/compare/cli/5.3.0...HEAD +[5.3.0]: https://github.com/subquery/subql/compare/cli/5.2.8...cli/5.3.0 [5.2.8]: https://github.com/subquery/subql/compare/cli/5.2.7...cli/5.2.8 [5.2.7]: https://github.com/subquery/subql/compare/cli/5.2.6...cli/5.2.7 [5.2.6]: https://github.com/subquery/subql/compare/cli/5.2.4...cli/5.2.6 diff --git a/packages/cli/package.json b/packages/cli/package.json index 5ff7ab2912..fc83cd24b6 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@subql/cli", "description": "cli for subquery", - "version": "5.2.9-0", + "version": "5.3.0", "author": "Ian He", "bin": { "subql": "./bin/run" @@ -88,6 +88,5 @@ "types": "lib/index.d.ts", "resolutions": { "node-fetch": "2.6.7" - }, - "stableVersion": "5.2.8" + } } diff --git a/packages/node-core/CHANGELOG.md b/packages/node-core/CHANGELOG.md index 21250bbc7f..a87b5f8220 100644 --- a/packages/node-core/CHANGELOG.md +++ b/packages/node-core/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [14.1.6] - 2024-10-21 ### Fixed - Issues with setting a large block range for bypass blocks (#2566) - Test runner not setting lastProcessedHeight leading to data not being flushed (#2569) @@ -834,7 +836,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Move blockchain agnostic code from `node` to `node-core` package. (#1222) -[Unreleased]: https://github.com/subquery/subql/compare/node-core/14.1.5...HEAD +[Unreleased]: https://github.com/subquery/subql/compare/node-core/14.1.6...HEAD +[14.1.6]: https://github.com/subquery/subql/compare/node-core/14.1.5...node-core/14.1.6 [14.1.5]: https://github.com/subquery/subql/compare/node-core/14.1.4...node-core/14.1.5 [14.1.4]: https://github.com/subquery/subql/compare/node-core/14.1.3...node-core/14.1.4 [14.1.3]: https://github.com/subquery/subql/compare/node-core/14.1.2...node-core/14.1.3 diff --git a/packages/node-core/package.json b/packages/node-core/package.json index d5054a755b..ad5ec7a247 100644 --- a/packages/node-core/package.json +++ b/packages/node-core/package.json @@ -1,6 +1,6 @@ { "name": "@subql/node-core", - "version": "14.1.6-4", + "version": "14.1.6", "description": "Common node features that are agnostic to blockchains", "homepage": "https://github.com/subquery/subql", "repository": "github:subquery/subql", @@ -47,6 +47,5 @@ }, "devDependencies": { "@types/yargs": "^16.0.9" - }, - "stableVersion": "14.1.6-3" + } } diff --git a/packages/node-core/src/db/migration-service/SchemaMigration.service.ts b/packages/node-core/src/db/migration-service/SchemaMigration.service.ts index aa622126ea..6504500bf4 100644 --- a/packages/node-core/src/db/migration-service/SchemaMigration.service.ts +++ b/packages/node-core/src/db/migration-service/SchemaMigration.service.ts @@ -115,7 +115,9 @@ export class SchemaMigrationService { const sortedAddedModels = alignModelOrder(sortedSchemaModels, addedModels); const sortedModifiedModels = alignModelOrder(sortedSchemaModels, modifiedModels); + // Flush any pending data before running the migration await this.flushCache(true); + const migrationAction = await Migration.create( this.sequelize, this.storeService, diff --git a/packages/node-core/src/indexer/storeCache/storeCache.service.ts b/packages/node-core/src/indexer/storeCache/storeCache.service.ts index 9c489ddf8b..feefb2c0c7 100644 --- a/packages/node-core/src/indexer/storeCache/storeCache.service.ts +++ b/packages/node-core/src/indexer/storeCache/storeCache.service.ts @@ -173,7 +173,6 @@ export class StoreCacheService extends BaseCacheService { try { // Get the block height of all data we want to flush up to const blockHeight = await this.metadata.find('lastProcessedHeight'); - assert(blockHeight !== undefined, 'Cannot flush cache without lastProcessedHeight'); // Get models that have data to flush const updatableModels = Object.values(this.cachedModels).filter((m) => m.isFlushable); if (this._useCockroachDb) { diff --git a/packages/node-core/src/indexer/storeCache/types.ts b/packages/node-core/src/indexer/storeCache/types.ts index 8213c13a62..360e0aed73 100644 --- a/packages/node-core/src/indexer/storeCache/types.ts +++ b/packages/node-core/src/indexer/storeCache/types.ts @@ -24,7 +24,7 @@ export interface ICachedModelControl { isFlushable: boolean; hasAssociations?: boolean; flushableRecordCounter: number; - flush(tx: Transaction, blockHeight: number): Promise; + flush(tx: Transaction, blockHeight?: number): Promise; flushOperation?(i: number, tx: Transaction): Promise; /** * diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md index a6206f34ae..30c2e47610 100644 --- a/packages/node/CHANGELOG.md +++ b/packages/node/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [5.2.7] - 2024-10-21 ### Fixed - Issues with setting a large block range for bypass blocks (#2566) @@ -1313,7 +1315,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - bump @polkadot/api to 3.1.1 -[Unreleased]: https://github.com/subquery/subql/compare/node/5.2.6...HEAD +[Unreleased]: https://github.com/subquery/subql/compare/node/5.2.7...HEAD +[5.2.7]: https://github.com/subquery/subql/compare/node/5.2.6...node/5.2.7 [5.2.6]: https://github.com/subquery/subql/compare/node/5.2.5...node/5.2.6 [5.2.5]: https://github.com/subquery/subql/compare/node/5.2.3...node/5.2.5 [5.2.3]: https://github.com/subquery/subql/compare/node/5.2.2...node/5.2.3 diff --git a/packages/node/package.json b/packages/node/package.json index 9e34abcdc3..3e7a539355 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,6 +1,6 @@ { "name": "@subql/node", - "version": "5.2.7-0", + "version": "5.2.7", "description": "", "author": "Ian He", "license": "GPL-3.0", @@ -50,6 +50,5 @@ "files": [ "/dist", "/bin" - ], - "stableVersion": "5.2.6" + ] } diff --git a/packages/node/src/configure/SchemaMigration.service.test.ts b/packages/node/src/configure/SchemaMigration.service.test.ts index a666bbb0c5..757143fe4a 100644 --- a/packages/node/src/configure/SchemaMigration.service.test.ts +++ b/packages/node/src/configure/SchemaMigration.service.test.ts @@ -40,7 +40,9 @@ describe('SchemaMigration integration tests', () => { }); afterAll(async () => { - await rimraf(tempDir); + if (tempDir) { + await rimraf(tempDir); + } await sequelize?.close(); }); diff --git a/packages/types-core/CHANGELOG.md b/packages/types-core/CHANGELOG.md index d77a605f00..b17ef1b30b 100644 --- a/packages/types-core/CHANGELOG.md +++ b/packages/types-core/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [2.0.0] - 2024-10-21 ### Changed - Update store interface making options.limit required on getByField(s) methods (#2567) @@ -72,7 +74,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial release of new package containing types common to all chains -[Unreleased]: https://github.com/subquery/subql/compare/types-core/1.1.1...HEAD +[Unreleased]: https://github.com/subquery/subql/compare/types-core/2.0.0...HEAD +[2.0.0]: https://github.com/subquery/subql/compare/types-core/1.1.1...types-core/2.0.0 [1.1.1]: https://github.com/subquery/subql/compare/types-core/1.1.0...types-core/1.1.1 [1.1.0]: https://github.com/subquery/subql/compare/types-core/1.0.0...types-core/1.1.0 [1.0.0]: https://github.com/subquery/subql/compare/types-core/0.10.0...types-core/1.0.0 diff --git a/packages/types-core/package.json b/packages/types-core/package.json index 64f68d6100..96fa4a909f 100644 --- a/packages/types-core/package.json +++ b/packages/types-core/package.json @@ -1,6 +1,6 @@ { "name": "@subql/types-core", - "version": "1.1.2-0", + "version": "2.0.0", "description": "", "homepage": "https://github.com/subquery/subql", "repository": "github:subquery/subql", @@ -17,6 +17,5 @@ ], "devDependencies": { "package-json-type": "^1.0.3" - }, - "stableVersion": "1.1.1" + } } diff --git a/test/Dockerfile b/test/Dockerfile index 4045416b5a..b0f2dbef71 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -1,5 +1,8 @@ FROM node:lts-bullseye WORKDIR /workdir +# Fix timezone to UTC +ENV TZ=utc + COPY . . RUN yarn