From e35f1b79e2a9c810d81b79320b4bec1e88ad54e8 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 17 Oct 2023 11:09:15 +0200 Subject: [PATCH 1/6] Remove sentry client --- .../builder/src/analytics/SentryClient.js | 37 ------------------- packages/builder/src/analytics/index.js | 9 +---- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 packages/builder/src/analytics/SentryClient.js diff --git a/packages/builder/src/analytics/SentryClient.js b/packages/builder/src/analytics/SentryClient.js deleted file mode 100644 index 2a1f8732e3..0000000000 --- a/packages/builder/src/analytics/SentryClient.js +++ /dev/null @@ -1,37 +0,0 @@ -import * as Sentry from "@sentry/browser" - -export default class SentryClient { - constructor(dsn) { - this.dsn = dsn - } - - init() { - if (this.dsn) { - Sentry.init({ dsn: this.dsn }) - - this.initalised = true - } - } - - /** - * Capture an exception and send it to sentry. - * @param {Error} err - JS error object - */ - captureException(err) { - if (!this.initalised) return - - Sentry.captureException(err) - } - - /** - * Identify user in sentry. - * @param {String} id - Unique user id - */ - identify(id) { - if (!this.initalised) return - - Sentry.configureScope(scope => { - scope.setUser({ id }) - }) - } -} diff --git a/packages/builder/src/analytics/index.js b/packages/builder/src/analytics/index.js index e49ec6d197..cfee9f057e 100644 --- a/packages/builder/src/analytics/index.js +++ b/packages/builder/src/analytics/index.js @@ -1,16 +1,14 @@ import { API } from "api" import PosthogClient from "./PosthogClient" import IntercomClient from "./IntercomClient" -import SentryClient from "./SentryClient" import { Events, EventSource } from "./constants" const posthog = new PosthogClient(process.env.POSTHOG_TOKEN) -const sentry = new SentryClient(process.env.SENTRY_DSN) const intercom = new IntercomClient(process.env.INTERCOM_TOKEN) class AnalyticsHub { constructor() { - this.clients = [posthog, sentry, intercom] + this.clients = [posthog, intercom] } async activate() { @@ -23,12 +21,9 @@ class AnalyticsHub { identify(id) { posthog.identify(id) - sentry.identify(id) } - captureException(err) { - sentry.captureException(err) - } + captureException(err) {} captureEvent(eventName, props = {}) { posthog.captureEvent(eventName, props) From 572cac255206fbfccaae2e4a7b4bc0b67d408bdf Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 17 Oct 2023 11:10:51 +0200 Subject: [PATCH 2/6] Remove SENTRY_DSN references --- .github/workflows/release-master.yml | 2 -- .../budibase/templates/app-service-deployment.yaml | 2 -- .../templates/worker-service-deployment.yaml | 2 -- charts/budibase/values.yaml | 1 - hosting/docker-compose.build.yaml | 2 -- hosting/docker-compose.yaml | 13 ++++++++----- packages/builder/vite.config.js | 1 - packages/client/src/api/api.js | 2 +- 8 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index 3af3a751ad..4acd5088d2 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -14,7 +14,6 @@ env: # Posthog token used by ui at build time POSTHOG_TOKEN: phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} jobs: @@ -110,7 +109,6 @@ jobs: git commit -m "Helm Release: ${{ env.RELEASE_VERSION }}" git push - trigger-deploy-to-qa-env: needs: [release-helm-chart] runs-on: ubuntu-latest diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index 3243509094..73c6d990d2 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -134,8 +134,6 @@ spec: {{ end }} - name: SELF_HOSTED value: {{ .Values.globals.selfHosted | quote }} - - name: SENTRY_DSN - value: {{ .Values.globals.sentryDSN | quote }} - name: POSTHOG_TOKEN value: {{ .Values.globals.posthogToken | quote }} - name: WORKER_URL diff --git a/charts/budibase/templates/worker-service-deployment.yaml b/charts/budibase/templates/worker-service-deployment.yaml index 7621aa23ef..5e0addb9dd 100644 --- a/charts/budibase/templates/worker-service-deployment.yaml +++ b/charts/budibase/templates/worker-service-deployment.yaml @@ -130,8 +130,6 @@ spec: {{ end }} - name: SELF_HOSTED value: {{ .Values.globals.selfHosted | quote }} - - name: SENTRY_DSN - value: {{ .Values.globals.sentryDSN }} - name: ENABLE_ANALYTICS value: {{ .Values.globals.enableAnalytics | quote }} - name: POSTHOG_TOKEN diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index e5f1eabb53..857067d0f1 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -78,7 +78,6 @@ globals: budibaseEnv: PRODUCTION tenantFeatureFlags: "*:LICENSING,*:USER_GROUPS,*:ONBOARDING_TOUR" enableAnalytics: "1" - sentryDSN: "" posthogToken: "phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU" selfHosted: "1" # set to 0 for budibase cloud environment, set to 1 for self-hosted setup multiTenancy: "0" # set to 0 to disable multiple orgs, set to 1 to enable multiple orgs diff --git a/hosting/docker-compose.build.yaml b/hosting/docker-compose.build.yaml index 391d263098..bc363fb0bf 100644 --- a/hosting/docker-compose.build.yaml +++ b/hosting/docker-compose.build.yaml @@ -19,7 +19,6 @@ services: API_ENCRYPTION_KEY: ${API_ENCRYPTION_KEY} JWT_SECRET: ${JWT_SECRET} LOG_LEVEL: info - SENTRY_DSN: https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131 ENABLE_ANALYTICS: "true" REDIS_URL: redis-service:6379 REDIS_PASSWORD: ${REDIS_PASSWORD} @@ -48,7 +47,6 @@ services: COUCH_DB_USERNAME: ${COUCH_DB_USER} COUCH_DB_PASSWORD: ${COUCH_DB_PASSWORD} COUCH_DB_URL: http://${COUCH_DB_USER}:${COUCH_DB_PASSWORD}@couchdb-service:5984 - SENTRY_DSN: https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131 INTERNAL_API_KEY: ${INTERNAL_API_KEY} REDIS_URL: redis-service:6379 REDIS_PASSWORD: ${REDIS_PASSWORD} diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index b3887c15fa..8f66d211f7 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -20,7 +20,6 @@ services: API_ENCRYPTION_KEY: ${API_ENCRYPTION_KEY} JWT_SECRET: ${JWT_SECRET} LOG_LEVEL: info - SENTRY_DSN: https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131 ENABLE_ANALYTICS: "true" REDIS_URL: redis-service:6379 REDIS_PASSWORD: ${REDIS_PASSWORD} @@ -31,8 +30,8 @@ services: depends_on: - worker-service - redis-service -# volumes: -# - /some/path/to/plugins:/plugins + # volumes: + # - /some/path/to/plugins:/plugins worker-service: restart: unless-stopped @@ -51,7 +50,6 @@ services: COUCH_DB_USERNAME: ${COUCH_DB_USER} COUCH_DB_PASSWORD: ${COUCH_DB_PASSWORD} COUCH_DB_URL: http://${COUCH_DB_USER}:${COUCH_DB_PASSWORD}@couchdb-service:5984 - SENTRY_DSN: https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131 INTERNAL_API_KEY: ${INTERNAL_API_KEY} REDIS_URL: redis-service:6379 REDIS_PASSWORD: ${REDIS_PASSWORD} @@ -113,7 +111,12 @@ services: PUT_CALL: "curl -u ${COUCH_DB_USER}:${COUCH_DB_PASSWORD} -X PUT couchdb-service:5984" depends_on: - couchdb-service - command: ["sh","-c","sleep 10 && $${PUT_CALL}/_users && $${PUT_CALL}/_replicator; fg;"] + command: + [ + "sh", + "-c", + "sleep 10 && $${PUT_CALL}/_users && $${PUT_CALL}/_replicator; fg;", + ] redis-service: restart: unless-stopped diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index b7af647916..0858f4c496 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -80,7 +80,6 @@ export default defineConfig(({ mode }) => { "process.env.INTERCOM_TOKEN": JSON.stringify( process.env.INTERCOM_TOKEN ), - "process.env.SENTRY_DSN": JSON.stringify(process.env.SENTRY_DSN), }), copyFonts("fonts"), ...(isProduction ? [] : devOnlyPlugins), diff --git a/packages/client/src/api/api.js b/packages/client/src/api/api.js index 4062bd3b73..8488b702b6 100644 --- a/packages/client/src/api/api.js +++ b/packages/client/src/api/api.js @@ -32,7 +32,7 @@ export const API = createAPIClient({ }, // Show an error notification for all API failures. - // We could also log these to sentry. + // We could also log these to Posthog. // Or we could check error.status and redirect to login on a 403 etc. onError: error => { const { status, method, url, message, handled, suppressErrors } = From ea1853c78c1281c075d1ebf15a6be4d554f19882 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 17 Oct 2023 11:11:08 +0200 Subject: [PATCH 3/6] Remove sentry from the backend --- packages/server/src/app.ts | 8 -------- .../src/db/linkedRows/LinkController.ts | 4 +--- packages/server/src/koa.ts | 16 ++------------- packages/worker/src/index.ts | 20 ++----------------- 4 files changed, 5 insertions(+), 43 deletions(-) diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index c95dc0dcd1..66172b7bd0 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -1,11 +1,7 @@ -import * as Sentry from "@sentry/node" - if (process.env.DD_APM_ENABLED) { require("./ddApm") } -// need to load environment first -import env from "./environment" import * as db from "./db" db.init() import { ServiceType } from "@budibase/types" @@ -28,10 +24,6 @@ async function start() { } // startup includes automation runner - if enabled await startup(app, server) - if (env.isProd()) { - env._set("NODE_ENV", "production") - Sentry.init() - } } start().catch(err => { diff --git a/packages/server/src/db/linkedRows/LinkController.ts b/packages/server/src/db/linkedRows/LinkController.ts index c9ad7bc71f..7cd96f1cdc 100644 --- a/packages/server/src/db/linkedRows/LinkController.ts +++ b/packages/server/src/db/linkedRows/LinkController.ts @@ -1,6 +1,5 @@ import { IncludeDocs, getLinkDocuments } from "./linkUtils" import { InternalTables, getUserMetadataParams } from "../utils" -import Sentry from "@sentry/node" import { FieldTypes } from "../../constants" import { context } from "@budibase/backend-core" import LinkDocument from "./LinkDocument" @@ -434,8 +433,7 @@ class LinkController { await this._db.put(linkedTable) } } catch (err) { - /* istanbul ignore next */ - Sentry.captureException(err) + // Ignored error } } // need to get the full link docs to delete them diff --git a/packages/server/src/koa.ts b/packages/server/src/koa.ts index de11bf973a..fa5cf1d051 100644 --- a/packages/server/src/koa.ts +++ b/packages/server/src/koa.ts @@ -8,9 +8,8 @@ import * as automations from "./automations" import { Thread } from "./threads" import * as redis from "./utilities/redis" import { events, logging, middleware, timers } from "@budibase/backend-core" -const Sentry = require("@sentry/node") -const destroyable = require("server-destroy") -const { userAgent } = require("koa-useragent") +import destroyable from "server-destroy" +import { userAgent } from "koa-useragent" export default function createKoaApp() { const app = new Koa() @@ -36,17 +35,6 @@ export default function createKoaApp() { app.use(middleware.pino) app.use(userAgent) - if (env.isProd()) { - app.on("error", (err: any, ctx: ExtendableContext) => { - Sentry.withScope(function (scope: any) { - scope.addEventProcessor(function (event: any) { - return Sentry.Handlers.parseRequest(event, ctx.request) - }) - Sentry.captureException(err) - }) - }) - } - const server = http.createServer(app.callback()) destroyable(server) diff --git a/packages/worker/src/index.ts b/packages/worker/src/index.ts index 30596d1d76..3905a21c73 100644 --- a/packages/worker/src/index.ts +++ b/packages/worker/src/index.ts @@ -4,8 +4,6 @@ if (process.env.DD_APM_ENABLED) { // need to load environment first import env from "./environment" -import { Scope } from "@sentry/node" -import { Event } from "@sentry/types/dist/event" import Application from "koa" import { bootstrap } from "global-agent" import * as db from "./db" @@ -25,9 +23,9 @@ import koaBody from "koa-body" import http from "http" import api from "./api" import * as redis from "./utilities/redis" -const Sentry = require("@sentry/node") + const koaSession = require("koa-session") -const { userAgent } = require("koa-useragent") +import { userAgent } from "koa-useragent" import destroyable from "server-destroy" import { initPro } from "./initPro" @@ -66,20 +64,6 @@ app.use(auth.passport.session()) // api routes app.use(api.routes()) -// sentry -if (env.isProd()) { - Sentry.init() - - app.on("error", (err, ctx) => { - Sentry.withScope(function (scope: Scope) { - scope.addEventProcessor(function (event: Event) { - return Sentry.Handlers.parseRequest(event, ctx.request) - }) - Sentry.captureException(err) - }) - }) -} - const server = http.createServer(app.callback()) destroyable(server) From 3fd29731523b1eef10ef1f38edb79b80d5682c0d Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 17 Oct 2023 11:11:23 +0200 Subject: [PATCH 4/6] Remove sentry packages --- packages/builder/package.json | 1 - packages/server/package.json | 1 - packages/worker/package.json | 1 - yarn.lock | 129 +--------------------------------- 4 files changed, 2 insertions(+), 130 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index 23a1a1ecd2..3cc5612652 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -64,7 +64,6 @@ "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/free-brands-svg-icons": "^6.2.1", "@fortawesome/free-solid-svg-icons": "^6.2.1", - "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", "codemirror": "^5.59.0", diff --git a/packages/server/package.json b/packages/server/package.json index 8b19ca0894..2e23e71b64 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -55,7 +55,6 @@ "@elastic/elasticsearch": "7.10.0", "@google-cloud/firestore": "6.8.0", "@koa/router": "8.0.8", - "@sentry/node": "6.17.7", "@socket.io/redis-adapter": "^8.2.1", "airtable": "0.10.1", "arangojs": "7.2.0", diff --git a/packages/worker/package.json b/packages/worker/package.json index bbe02488b4..882752215d 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -43,7 +43,6 @@ "@budibase/string-templates": "0.0.0", "@budibase/types": "0.0.0", "@koa/router": "8.0.8", - "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", "@types/global-agent": "2.1.1", "aws-sdk": "2.1030.0", diff --git a/yarn.lock b/yarn.lock index d8515e0c42..a258f08a1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4255,126 +4255,6 @@ node-fetch "^2.6.0" utf-8-validate "^5.0.2" -"@sentry/browser@5.19.1": - version "5.19.1" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.19.1.tgz#b22f36fc71f36719ad352a54e6b31722622128c0" - integrity sha512-Aon5Nc2n8sIXKg6Xbr4RM3/Xs7vFpXksL56z3yIuGrmpCM8ToQ25/tQv8h+anYi72x5bn1npzaXB/NwU1Qwfhg== - dependencies: - "@sentry/core" "5.19.1" - "@sentry/types" "5.19.1" - "@sentry/utils" "5.19.1" - tslib "^1.9.3" - -"@sentry/core@5.19.1": - version "5.19.1" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.19.1.tgz#f5ff7feb1118035f75f1d0bc2a76e2b040d2aa8e" - integrity sha512-BGGxjeT95Og/hloBhQXAVcndVXPmIU6drtF3oKRT12cBpiG965xEDEUwiJVvyb5MAvojdVEZBK2LURUFY/d7Zw== - dependencies: - "@sentry/hub" "5.19.1" - "@sentry/minimal" "5.19.1" - "@sentry/types" "5.19.1" - "@sentry/utils" "5.19.1" - tslib "^1.9.3" - -"@sentry/core@6.17.7": - version "6.17.7" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.17.7.tgz#f591235c06b1a4e75d748b15c539e071bd3f5cf5" - integrity sha512-SRhLkD05lQb4eCt1ed9Dz72DKbRDlM8PJix8eC2oJLtwyFTS0IlJNkIYRrbsSKkJUm0VsKcDkzIHvUAgBBQICw== - dependencies: - "@sentry/hub" "6.17.7" - "@sentry/minimal" "6.17.7" - "@sentry/types" "6.17.7" - "@sentry/utils" "6.17.7" - tslib "^1.9.3" - -"@sentry/hub@5.19.1": - version "5.19.1" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.19.1.tgz#f3bc8500680974ce43c1eedcd8e90696cc18b306" - integrity sha512-XjfbNGWVeDsP38alm5Cm08YPIw5Hu6HbPkw7a3y1piViTrg4HdtsE+ZJqq0YcURo2RTpg6Ks6coCS/zJxIPygQ== - dependencies: - "@sentry/types" "5.19.1" - "@sentry/utils" "5.19.1" - tslib "^1.9.3" - -"@sentry/hub@6.17.7": - version "6.17.7" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.17.7.tgz#5c90d661e263dad7da0e0106f1cb90cf797d93a7" - integrity sha512-siGzcg+quGOdjRaBGAz6T3ycwHUsGgvalptSJdf5Q783FVFhU+haPul++zGOYURXOgx0RjYGWqagwO8+jljl3Q== - dependencies: - "@sentry/types" "6.17.7" - "@sentry/utils" "6.17.7" - tslib "^1.9.3" - -"@sentry/minimal@5.19.1": - version "5.19.1" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.19.1.tgz#04043d93a7dc90cbed1a31d80f6bf59688ea3100" - integrity sha512-pgNfsaCroEsC8gv+NqmPTIkj4wyK6ZgYLV12IT4k2oJLkGyg45TSAKabyB7oEP5jsj8sRzm8tDomu8M4HpaCHg== - dependencies: - "@sentry/hub" "5.19.1" - "@sentry/types" "5.19.1" - tslib "^1.9.3" - -"@sentry/minimal@6.17.7": - version "6.17.7" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.17.7.tgz#f19182047f19b563f40a30d45d2ce9ad7df1ec4e" - integrity sha512-+/FGem1uXsXikX9wHPw44nevO7YTVjkkiPjyLsvnWMjv64r4Au5s+NQSFHDaytRm9IlU//+OasCAS5VAwHcYRg== - dependencies: - "@sentry/hub" "6.17.7" - "@sentry/types" "6.17.7" - tslib "^1.9.3" - -"@sentry/node@6.17.7": - version "6.17.7" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.17.7.tgz#c142d93328b29312098276e0cb66ec3b9e805a93" - integrity sha512-YlBhEv8YYUimHLpwzUP5lXkagbGxGAfjvsbahhvqf7rRl8Fu5XbatAcSDcx7YE4R0Iox94IfZy95kF2NL4Idow== - dependencies: - "@sentry/core" "6.17.7" - "@sentry/hub" "6.17.7" - "@sentry/tracing" "6.17.7" - "@sentry/types" "6.17.7" - "@sentry/utils" "6.17.7" - cookie "^0.4.1" - https-proxy-agent "^5.0.0" - lru_map "^0.3.3" - tslib "^1.9.3" - -"@sentry/tracing@6.17.7": - version "6.17.7" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.17.7.tgz#f4536683b29bb3ac7ddda5ca49494731cec6b619" - integrity sha512-QzIDHOjjdi/0LTdrK2LTC27YEOODI473KD8KmMJ+r9PmjDeIjNzz4hJlPwQSnXR3Mu/8foxGJGXsAt3LNmKzlQ== - dependencies: - "@sentry/hub" "6.17.7" - "@sentry/minimal" "6.17.7" - "@sentry/types" "6.17.7" - "@sentry/utils" "6.17.7" - tslib "^1.9.3" - -"@sentry/types@5.19.1": - version "5.19.1" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.19.1.tgz#8762f668d3fc2416fbde31d15d13009544caeb54" - integrity sha512-M5MhTLnjqYFwxMwcFPBpBgYQqI9hCvtVuj/A+NvcBHpe7VWOXdn/Sys+zD6C76DWGFYQdw3OWCsZimP24dL8mA== - -"@sentry/types@6.17.7": - version "6.17.7" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.17.7.tgz#61946a3f6532b8f21251b264f173b02f9ea2458e" - integrity sha512-iBlJDhrSowZKeqvutY0tCkUjrWqkLFsHrbaQ553r1Nx+/4mxHjzVYtEVGMjZAxQUEbkm0TbnQIkkT7ltglNJ9A== - -"@sentry/utils@5.19.1": - version "5.19.1" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.19.1.tgz#e1134db40e4bb9732251e515721cec7ee94d4d9c" - integrity sha512-neUiNBnZSHjWTZWy2QV02EHTx1C2L3DBPzRXlh0ca5xrI7LMBLmhkHlhebn1E5ky3PW1teqZTgmh0jZoL99TEA== - dependencies: - "@sentry/types" "5.19.1" - tslib "^1.9.3" - -"@sentry/utils@6.17.7": - version "6.17.7" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.17.7.tgz#0574bf914cc129b5e47041b75bb34dfbe0decbba" - integrity sha512-HEEEeKlZtwfQvH0waSKv5FKRFjHkVgkkEiAigXoYGQAlaUIuwRTvZGFnsmBoKMIrA4pARkA00FwwdtMU7ziC8A== - dependencies: - "@sentry/types" "6.17.7" - tslib "^1.9.3" - "@shopify/jest-koa-mocks@5.1.1": version "5.1.1" resolved "https://registry.yarnpkg.com/@shopify/jest-koa-mocks/-/jest-koa-mocks-5.1.1.tgz#d615815b0cf0ec9823d054da68c419508b3c3193" @@ -15025,11 +14905,6 @@ lru-cache@^9.1.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-9.1.2.tgz#255fdbc14b75589d6d0e73644ca167a8db506835" integrity sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ== -lru_map@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" - integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== - ltgt@2.2.1, ltgt@^2.1.2, ltgt@~2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" @@ -21218,7 +21093,7 @@ tsconfig-paths@^4.1.2, tsconfig-paths@^4.2.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.10.0, tslib@^1.11.1, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.10.0, tslib@^1.11.1, tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -21862,7 +21737,7 @@ vlq@^0.2.2: resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== -vm2@^3.9.19, vm2@^3.9.8: +vm2@^3.9.19: version "3.9.19" resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.19.tgz#be1e1d7a106122c6c492b4d51c2e8b93d3ed6a4a" integrity sha512-J637XF0DHDMV57R6JyVsTak7nIL8gy5KH4r1HiwWLf/4GBbb5MKL5y7LpmF4A8E2nR6XmzpmMFQ7V7ppPTmUQg== From 616792013f3466ebb46262d5a3fb1771468dd4d4 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 18 Oct 2023 10:54:37 +0200 Subject: [PATCH 5/6] Lint --- packages/builder/src/analytics/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/analytics/index.js b/packages/builder/src/analytics/index.js index cfee9f057e..6bb10acdb5 100644 --- a/packages/builder/src/analytics/index.js +++ b/packages/builder/src/analytics/index.js @@ -23,7 +23,7 @@ class AnalyticsHub { posthog.identify(id) } - captureException(err) {} + captureException(_err) {} captureEvent(eventName, props = {}) { posthog.captureEvent(eventName, props) From 06ae3fb52c1be21006513ba3ec2a1168bd47bbeb Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 18 Oct 2023 12:07:50 +0200 Subject: [PATCH 6/6] Log warn --- packages/server/src/db/linkedRows/LinkController.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/db/linkedRows/LinkController.ts b/packages/server/src/db/linkedRows/LinkController.ts index 7cd96f1cdc..f18a507f5a 100644 --- a/packages/server/src/db/linkedRows/LinkController.ts +++ b/packages/server/src/db/linkedRows/LinkController.ts @@ -1,7 +1,7 @@ import { IncludeDocs, getLinkDocuments } from "./linkUtils" import { InternalTables, getUserMetadataParams } from "../utils" import { FieldTypes } from "../../constants" -import { context } from "@budibase/backend-core" +import { context, logging } from "@budibase/backend-core" import LinkDocument from "./LinkDocument" import { Database, @@ -432,8 +432,8 @@ class LinkController { delete linkedTable.schema[field.fieldName] await this._db.put(linkedTable) } - } catch (err) { - // Ignored error + } catch (err: any) { + logging.logWarn(err?.message, err) } } // need to get the full link docs to delete them