diff --git a/.github/workflows/deploy-cloud.yaml b/.github/workflows/deploy-cloud.yaml index 26422a2e7b..d54e6c9c68 100644 --- a/.github/workflows/deploy-cloud.yaml +++ b/.github/workflows/deploy-cloud.yaml @@ -12,6 +12,12 @@ jobs: runs-on: ubuntu-latest steps: + - name: Fail if branch is not master + if: github.ref != 'refs/heads/master' + run: | + echo "Ref is not master, you must run this job from master." + exit 1 + - uses: actions/checkout@v2 - name: Pull values.yaml from budibase-infra diff --git a/packages/server/src/api/controllers/query.js b/packages/server/src/api/controllers/query.js index cf6f03f00f..4610fe57c3 100644 --- a/packages/server/src/api/controllers/query.js +++ b/packages/server/src/api/controllers/query.js @@ -7,8 +7,11 @@ const { } = require("../../db/utils") const { BaseQueryVerbs } = require("../../constants") const { Thread, ThreadType } = require("../../threads") +const env = require("../../environment") -const Runner = new Thread(ThreadType.QUERY, { timeoutMs: 10000 }) +const Runner = new Thread(ThreadType.QUERY, { + timeoutMs: env.QUERY_THREAD_TIMEOUT || 10000, +}) // simple function to append "readable" to all read queries function enrichQueries(input) { diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index 925fede086..a92e113851 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -65,6 +65,7 @@ module.exports = { DEPLOYMENT_CREDENTIALS_URL: process.env.DEPLOYMENT_CREDENTIALS_URL, ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS, DISABLE_THREADING: process.env.DISABLE_THREADING, + QUERY_THREAD_TIMEOUT: process.env.QUERY_THREAD_TIMEOUT, _set(key, value) { process.env[key] = value module.exports[key] = value diff --git a/packages/server/src/integrations/dynamodb.ts b/packages/server/src/integrations/dynamodb.ts index a3f32e5bfa..bfcac3184d 100644 --- a/packages/server/src/integrations/dynamodb.ts +++ b/packages/server/src/integrations/dynamodb.ts @@ -191,7 +191,7 @@ module DynamoModule { return response } - async describe(query: { table: string; }) { + async describe(query: { table: string }) { const params = { TableName: query.table, } diff --git a/packages/server/src/integrations/oracle.ts b/packages/server/src/integrations/oracle.ts index afaa902655..f602a97591 100644 --- a/packages/server/src/integrations/oracle.ts +++ b/packages/server/src/integrations/oracle.ts @@ -450,7 +450,7 @@ module OracleModule { }) return lastRow.rows } else { - return [{ [ operation.toLowerCase() ]: true }] + return [{ [operation.toLowerCase()]: true }] } } } diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index bcbcdf342a..b258670ee3 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -29,6 +29,18 @@ module S3Module { type: "password", required: true, }, + endpoint: { + type: "string", + required: false, + }, + s3ForcePathStyle: { + type: "boolean", + required: false, + }, + signatureVersion: { + type: "string", + required: false, + }, }, query: { read: {