From a4126a877c4f15270b5ffd60b3a236ac5c254c45 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 3 Mar 2025 17:15:29 +0000 Subject: [PATCH] Disabling ArangoDB datasource, this has not been well supported throughout history and we don't have any components that work with it well. --- .../server/src/api/controllers/integration.ts | 1 + packages/server/src/integrations/arangodb.ts | 5 +++ packages/server/src/integrations/index.ts | 12 ++++-- .../src/integrations/tests/arangodb.spec.ts | 38 ------------------- 4 files changed, 14 insertions(+), 42 deletions(-) delete mode 100644 packages/server/src/integrations/tests/arangodb.spec.ts diff --git a/packages/server/src/api/controllers/integration.ts b/packages/server/src/api/controllers/integration.ts index f26f8dcc52..555bf72e53 100644 --- a/packages/server/src/api/controllers/integration.ts +++ b/packages/server/src/api/controllers/integration.ts @@ -9,6 +9,7 @@ import { const DISABLED_EXTERNAL_INTEGRATIONS = [ SourceName.AIRTABLE, SourceName.BUDIBASE, + SourceName.ARANGODB, ] export async function fetch(ctx: UserCtx) { diff --git a/packages/server/src/integrations/arangodb.ts b/packages/server/src/integrations/arangodb.ts index 0127d25632..76a5fb1d69 100644 --- a/packages/server/src/integrations/arangodb.ts +++ b/packages/server/src/integrations/arangodb.ts @@ -9,6 +9,11 @@ import { import { Database, aql } from "arangojs" +/** + * @deprecated 3rd March 2025 + * datasource disabled - this datasource is marked for deprecation and removal + */ + interface ArangodbConfig { url: string username: string diff --git a/packages/server/src/integrations/index.ts b/packages/server/src/integrations/index.ts index de700d631d..de05e300e6 100644 --- a/packages/server/src/integrations/index.ts +++ b/packages/server/src/integrations/index.ts @@ -33,15 +33,17 @@ const DEFINITIONS: Record = { [SourceName.COUCHDB]: couchdb.schema, [SourceName.SQL_SERVER]: sqlServer.schema, [SourceName.S3]: s3.schema, - [SourceName.AIRTABLE]: airtable.schema, [SourceName.MYSQL]: mysql.schema, - [SourceName.ARANGODB]: arangodb.schema, [SourceName.REST]: rest.schema, [SourceName.FIRESTORE]: firebase.schema, [SourceName.GOOGLE_SHEETS]: googlesheets.schema, [SourceName.REDIS]: redis.schema, [SourceName.SNOWFLAKE]: snowflake.schema, [SourceName.ORACLE]: oracle.schema, + /* deprecated - not available through UI */ + [SourceName.ARANGODB]: arangodb.schema, + [SourceName.AIRTABLE]: airtable.schema, + /* un-used */ [SourceName.BUDIBASE]: undefined, } @@ -56,15 +58,17 @@ const INTEGRATIONS: Record = [SourceName.COUCHDB]: couchdb.integration, [SourceName.SQL_SERVER]: sqlServer.integration, [SourceName.S3]: s3.integration, - [SourceName.AIRTABLE]: airtable.integration, [SourceName.MYSQL]: mysql.integration, - [SourceName.ARANGODB]: arangodb.integration, [SourceName.REST]: rest.integration, [SourceName.FIRESTORE]: firebase.integration, [SourceName.GOOGLE_SHEETS]: googlesheets.integration, [SourceName.REDIS]: redis.integration, [SourceName.SNOWFLAKE]: snowflake.integration, [SourceName.ORACLE]: oracle.integration, + /* deprecated - not available through UI */ + [SourceName.ARANGODB]: arangodb.integration, + [SourceName.AIRTABLE]: airtable.integration, + /* un-used */ [SourceName.BUDIBASE]: undefined, } diff --git a/packages/server/src/integrations/tests/arangodb.spec.ts b/packages/server/src/integrations/tests/arangodb.spec.ts deleted file mode 100644 index 6ac242d8db..0000000000 --- a/packages/server/src/integrations/tests/arangodb.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { default as ArangoDBIntegration } from "../arangodb" - -jest.mock("arangojs") - -class TestConfiguration { - integration: any - - constructor(config: any = {}) { - this.integration = new ArangoDBIntegration.integration(config) - } -} - -describe("ArangoDB Integration", () => { - let config: any - - beforeEach(() => { - config = new TestConfiguration() - }) - - it("calls the create method with the correct params", async () => { - const body = { - json: "Hello", - } - - await config.integration.create(body) - expect(config.integration.client.query).toHaveBeenCalledWith( - `INSERT Hello INTO collection RETURN NEW` - ) - }) - - it("calls the read method with the correct params", async () => { - const query = { - sql: `test`, - } - await config.integration.read(query) - expect(config.integration.client.query).toHaveBeenCalledWith(query.sql) - }) -})