From 5974cbd51ffa50ada7a093ab03b8e7e6ac40649a Mon Sep 17 00:00:00 2001 From: jaipaljadeja Date: Thu, 19 Dec 2024 22:47:34 +0530 Subject: [PATCH] actions: add mongodb service --- .github/workflows/build.yml | 6 ++++++ ...ibara-indexer-b2b2208a-7a4e-4779-826d-c246b023891a.json | 7 +++++++ packages/sink-mongo/src/mongo.ts | 5 ----- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 change/@apibara-indexer-b2b2208a-7a4e-4779-826d-c246b023891a.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3575284..14bc762 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,12 @@ jobs: uses: arduino/setup-protoc@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Start MongoDB + uses: supercharge/mongodb-github-action@1.11.0 + with: + mongodb-version: '7.0' + mongodb-replica-set: rs0 + mongodb-port: 27017 - name: Install dependencies run: pnpm install --strict-peer-dependencies=false - name: Run lint diff --git a/change/@apibara-indexer-b2b2208a-7a4e-4779-826d-c246b023891a.json b/change/@apibara-indexer-b2b2208a-7a4e-4779-826d-c246b023891a.json new file mode 100644 index 0000000..c865174 --- /dev/null +++ b/change/@apibara-indexer-b2b2208a-7a4e-4779-826d-c246b023891a.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "indexer: rename drizzle sink factory and fix update method", + "packageName": "@apibara/indexer", + "email": "jadejajaipal5@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/sink-mongo/src/mongo.ts b/packages/sink-mongo/src/mongo.ts index a5c563f..4a56dda 100644 --- a/packages/sink-mongo/src/mongo.ts +++ b/packages/sink-mongo/src/mongo.ts @@ -32,7 +32,6 @@ export class MongoSink extends Sink { db: new MongoSinkTransactionDb(db, session, endCursor), session, }); - return "Transaction committed."; }), ); } @@ -54,8 +53,6 @@ export class MongoSink extends Sink { { session }, ); } - - return "Transaction committed."; }), ); } @@ -90,8 +87,6 @@ export class MongoSink extends Sink { { session }, ); } - - return "Transaction committed."; }), ); }