From f3b86497fec2ba64707278b1ffabcdeaf8efd734 Mon Sep 17 00:00:00 2001 From: Morgan McCauley Date: Fri, 21 Jul 2023 15:59:23 +1200 Subject: [PATCH] Revert "DPLT-1049 Fix issues with separate user DB provisioning (#139)" This reverts commit b3605558f136bce51fedfd0d4bb409f38ae42767. --- .github/workflows/deploy-lambdas.yml | 5 ----- indexer-js-queue-handler/indexer.js | 2 +- indexer-js-queue-handler/indexer.test.js | 1 - indexer-js-queue-handler/serverless.yml | 5 ----- 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/deploy-lambdas.yml b/.github/workflows/deploy-lambdas.yml index 5a8879a12..8ea809fb6 100644 --- a/.github/workflows/deploy-lambdas.yml +++ b/.github/workflows/deploy-lambdas.yml @@ -37,8 +37,3 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} HASURA_ENDPOINT: ${{ vars.HASURA_ENDPOINT }} HASURA_ADMIN_SECRET: ${{ secrets.HASURA_ADMIN_SECRET }} - PG_ADMIN_USER: ${{ secrets.PG_ADMIN_USER }} - PG_ADMIN_PASSWORD: ${{ secrets.PG_ADMIN_PASSWORD }} - PG_ADMIN_DATABASE: ${{ secrets.PG_ADMIN_DATABASE }} - PG_HOST: ${{ secrets.PG_HOST }} - PG_PORT: ${{ secrets.PG_PORT }} diff --git a/indexer-js-queue-handler/indexer.js b/indexer-js-queue-handler/indexer.js index 8103ff6e1..ef5f3a0bf 100644 --- a/indexer-js-queue-handler/indexer.js +++ b/indexer-js-queue-handler/indexer.js @@ -53,7 +53,7 @@ export default class Indexer { if (options.provision && !indexerFunction["provisioned"]) { try { - if (!await this.deps.provisioner.isUserApiProvisioned(indexerFunction.account_id, indexerFunction.function_name)) { + if (!await this.deps.provisioner.isUserApiProvisioned(indexerFunction.account_id)) { await this.setStatus(function_name, block_height, 'PROVISIONING'); simultaneousPromises.push(this.writeLog(function_name, block_height, 'Provisioning endpoint: starting')); diff --git a/indexer-js-queue-handler/indexer.test.js b/indexer-js-queue-handler/indexer.test.js index 18322215e..c59315455 100644 --- a/indexer-js-queue-handler/indexer.test.js +++ b/indexer-js-queue-handler/indexer.test.js @@ -604,7 +604,6 @@ mutation _1 { set(functionName: "buildnear.testnet/test", key: "foo2", data: "in }; await indexer.runFunctions(1, functions, false, { provision: true }); - expect(provisioner.isUserApiProvisioned).toHaveBeenCalledWith('morgs.near', 'test'); expect(provisioner.provisionUserApi).toHaveBeenCalledTimes(1); expect(provisioner.provisionUserApi).toHaveBeenCalledWith( 'morgs.near', diff --git a/indexer-js-queue-handler/serverless.yml b/indexer-js-queue-handler/serverless.yml index 71048ebd0..9ba46422a 100644 --- a/indexer-js-queue-handler/serverless.yml +++ b/indexer-js-queue-handler/serverless.yml @@ -13,11 +13,6 @@ provider: STAGE: ${opt:stage, 'dev'} HASURA_ENDPOINT: ${env:HASURA_ENDPOINT} HASURA_ADMIN_SECRET: ${env:HASURA_ADMIN_SECRET} - PG_ADMIN_USER: ${env:PG_ADMIN_USER} - PG_ADMIN_PASSWORD: ${env:PG_ADMIN_PASSWORD} - PG_ADMIN_DATABASE: ${env:PG_ADMIN_DATABASE} - PG_HOST: ${env:PG_HOST} - PG_PORT: ${env:PG_PORT} tracing: lambda: true #enable X-Ray tracing iamRoleStatements: