Skip to content

Commit

Permalink
Minor Fixes (#2129)
Browse files Browse the repository at this point in the history
* Fix link to docs

* More specific link

* Add changelog changes for endblock feature

* Fix missing deps for testing

* Update changelog

* Fix circular imports causing test to fail

* Fix cacheModel test
  • Loading branch information
stwiname authored Oct 30, 2023
1 parent 6dffa17 commit 1621811
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
- New `endBlock` option on datasources (#2064)
- Add Concordium to network family (#2078)

## [3.2.0] - 2023-10-25
Expand Down
4 changes: 4 additions & 0 deletions packages/node-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- WorkerInMemoryCacheService from node (#2125)
- New `endBlock` option on datasources (#2064)

### Fixed
- Wrong link to docs for testing

## [6.1.1] - 2023-10-25
### Fixed
Expand Down
5 changes: 3 additions & 2 deletions packages/node-core/src/indexer/poi/poiSync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import {Sequelize, Transaction} from '@subql/x-sequelize';
import {NodeConfig} from '../../configure';
import {establishNewSequelize} from '../../db';
import {PoiEvent} from '../../events';
import {Metadata, MetadataFactory, MetadataRepo, PlainPoiModel, PoiFactory} from '../../indexer';
import {getLogger} from '../../logger';
import {hasValue, Queue} from '../../utils';
import {ProofOfIndex, SyncedProofOfIndex} from '../entities/Poi.entity';
import {Metadata, MetadataFactory, MetadataRepo} from '../entities';
import {PoiFactory, ProofOfIndex, SyncedProofOfIndex} from '../entities/Poi.entity';
import {ISubqueryProject} from '../types';
import {PoiBlock} from './PoiBlock';
import {PlainPoiModel} from './poiModel';

const GENESIS_PARENT_HASH = hexToU8a('0x00');
const logger = getLogger('PoiSyncService');
Expand Down
6 changes: 3 additions & 3 deletions packages/node-core/src/indexer/storeCache/cacheModel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ describe('cacheModel', () => {
let testModel: CachedModel<{id: string; field1: number}>;
let sequelize: Sequelize;

const flush = async () => {
const flush = async (height?: number) => {
const tx = await sequelize.transaction();

await testModel.flush(tx);
await testModel.flush(tx, height);

return tx.commit();
};
Expand Down Expand Up @@ -195,7 +195,7 @@ describe('cacheModel', () => {
},
1
);
await flush();
await flush(1);
// the block range has been set
expect(sypOnApplyBlockRange).toHaveBeenCalledTimes(1);

Expand Down
2 changes: 1 addition & 1 deletion packages/node-core/src/indexer/testing.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export abstract class TestingService<A, SA, B, DS extends BaseDataSource> {
}
this.logFailedTestsSummary();
} else {
const docsUrl = 'https://academy.subquery.network/build/testingframework.html';
const docsUrl = 'https://academy.subquery.network/build/testing.html#the-subquery-testing-framework';
logger.warn(
`No tests found. Please refer to the documentation for guidance on creating and running tests: ${docsUrl}`
);
Expand Down
3 changes: 3 additions & 0 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Use WorkerInMemoryCacheService from node core (#2125)

### Fixed
- Missing dependencies for testing command

## [3.1.1] - 2023-10-25
### Fixed
- Update node-core with fix for crash when creating a dynamic datasource
Expand Down
4 changes: 4 additions & 0 deletions packages/node/src/subcommands/testing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import {
ConnectionPoolService,
ConnectionPoolStateManager,
DbModule,
InMemoryCacheService,
NodeConfig,
PoiService,
PoiSyncService,
StoreCacheService,
StoreService,
TestRunner,
Expand All @@ -25,10 +27,12 @@ import { UnfinalizedBlocksService } from '../indexer/unfinalizedBlocks.service';

@Module({
providers: [
InMemoryCacheService,
StoreService,
StoreCacheService,
EventEmitter2,
PoiService,
PoiSyncService,
SandboxService,
DsProcessorService,
DynamicDsService,
Expand Down
2 changes: 2 additions & 0 deletions packages/types-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
### Added
- New `endBlock` option on datasources (#2064)

## [0.2.0] - 2023-10-20
### Added
Expand Down

0 comments on commit 1621811

Please sign in to comment.