From 0e920c599674c9c2747f8c1f1f0e29f5b1f0e62b Mon Sep 17 00:00:00 2001 From: Tiina Turban Date: Wed, 3 Jan 2024 14:10:05 +0100 Subject: [PATCH] review comments --- plugin-server/src/capabilities.ts | 4 ++-- plugin-server/src/main/pluginsServer.ts | 2 +- plugin-server/src/types.ts | 2 +- plugin-server/src/utils/db/sql.ts | 5 ----- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/plugin-server/src/capabilities.ts b/plugin-server/src/capabilities.ts index 7a30b46438b36..d5cbe7f05cf5a 100644 --- a/plugin-server/src/capabilities.ts +++ b/plugin-server/src/capabilities.ts @@ -20,7 +20,7 @@ export function getPluginServerCapabilities(config: PluginsServerConfig): Plugin processAsyncWebhooksHandlers: true, sessionRecordingBlobIngestion: true, personOverrides: config.POE_DEFERRED_WRITES_ENABLED, - transpileFrontendApps: true, + appManagementSingleton: true, preflightSchedules: true, ...sharedCapabilities, } @@ -73,7 +73,7 @@ export function getPluginServerCapabilities(config: PluginsServerConfig): Plugin case PluginServerMode.scheduler: return { pluginScheduledTasks: true, - transpileFrontendApps: true, // TODO: move this away from pod startup, into a graphile job + appManagementSingleton: true, ...sharedCapabilities, } case PluginServerMode.person_overrides: diff --git a/plugin-server/src/main/pluginsServer.ts b/plugin-server/src/main/pluginsServer.ts index 6c2884a145404..edf8a2f787833 100644 --- a/plugin-server/src/main/pluginsServer.ts +++ b/plugin-server/src/main/pluginsServer.ts @@ -399,7 +399,7 @@ export async function startPluginsServer( }, 'populate-plugin-capabilities': async (message) => { // We need this to be done in only once - if (hub?.capabilities.pluginScheduledTasks && piscina) { + if (hub?.capabilities.appManagementSingleton && piscina) { await piscina?.broadcastTask({ task: 'populatePluginCapabilities', args: JSON.parse(message) }) } }, diff --git a/plugin-server/src/types.ts b/plugin-server/src/types.ts index 0d15899c84aa2..a7f45b18aeb21 100644 --- a/plugin-server/src/types.ts +++ b/plugin-server/src/types.ts @@ -296,7 +296,7 @@ export interface PluginServerCapabilities { processAsyncWebhooksHandlers?: boolean sessionRecordingBlobIngestion?: boolean personOverrides?: boolean - transpileFrontendApps?: boolean // TODO: move this away from pod startup, into a graphile job + appManagementSingleton?: boolean preflightSchedules?: boolean // Used for instance health checks on hobby deploy, not useful on cloud http?: boolean mmdb?: boolean diff --git a/plugin-server/src/utils/db/sql.ts b/plugin-server/src/utils/db/sql.ts index fa0460512060d..44fa2ce9e92b1 100644 --- a/plugin-server/src/utils/db/sql.ts +++ b/plugin-server/src/utils/db/sql.ts @@ -68,11 +68,6 @@ export async function getPlugin(hub: Hub, pluginId: number): Promise { const { rows }: { rows: Plugin[] } = await hub.db.postgres.query( PostgresUse.COMMON_READ, - // `posthog_plugin` columns have to be listed individually, as we want to exclude a few columns - // and Postgres syntax unfortunately doesn't have a column exclusion feature. The excluded columns are: - // - archive - this is a potentially large blob, only extracted in Django as a plugin server optimization - // - latest_tag - not used in this service - // - latest_tag_checked_at - not used in this service `${PLUGIN_SELECT} WHERE posthog_plugin.id IN (${pluginConfigsInForceQuery('plugin_id')} GROUP BY posthog_pluginconfig.plugin_id)`,