The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Remove IS_WORKFLOW_RUN_STEP_LOGS_ENABLED feature flag (#21323)
Marie2151a414f584
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphqlindex 1fc70d355e6..22bee3095ee 100644--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql@@ -1778,7 +1778,6 @@ enum FeatureFlagKey {IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLEDIS_SETTINGS_DISCOVERY_HERO_ENABLEDIS_CALL_RECORDING_ENABLED- IS_WORKFLOW_RUN_STEP_LOGS_ENABLED}type WorkspaceUrls {diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.tsindex 82394678f77..5d33e5db09d 100644--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts@@ -1405,7 +1405,7 @@ export interface FeatureFlag {__typename: 'FeatureFlag'}-export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_MARKETPLACE_SETTING_TAB_VISIBLE' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAIL_GROUP_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' | 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' | 'IS_SETTINGS_DISCOVERY_HERO_ENABLED' | 'IS_CALL_RECORDING_ENABLED' | 'IS_WORKFLOW_RUN_STEP_LOGS_ENABLED'+export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_MARKETPLACE_SETTING_TAB_VISIBLE' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAIL_GROUP_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' | 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' | 'IS_SETTINGS_DISCOVERY_HERO_ENABLED' | 'IS_CALL_RECORDING_ENABLED'export interface WorkspaceUrls {customUrl?: Scalars['String']@@ -8806,8 +8806,7 @@ export const enumFeatureFlagKey = {IS_REST_METADATA_API_NEW_FORMAT_DIRECT: 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' as const,IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED: 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' as const,IS_SETTINGS_DISCOVERY_HERO_ENABLED: 'IS_SETTINGS_DISCOVERY_HERO_ENABLED' as const,- IS_CALL_RECORDING_ENABLED: 'IS_CALL_RECORDING_ENABLED' as const,- IS_WORKFLOW_RUN_STEP_LOGS_ENABLED: 'IS_WORKFLOW_RUN_STEP_LOGS_ENABLED' as const+ IS_CALL_RECORDING_ENABLED: 'IS_CALL_RECORDING_ENABLED' as const}export const enumIdentityProviderType = {diff --git a/packages/twenty-front/src/generated-admin/graphql.ts b/packages/twenty-front/src/generated-admin/graphql.tsindex 4c8785b04c7..0103da2015f 100644--- a/packages/twenty-front/src/generated-admin/graphql.ts+++ b/packages/twenty-front/src/generated-admin/graphql.ts@@ -292,8 +292,7 @@ export enum FeatureFlagKey {IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED',IS_REST_METADATA_API_NEW_FORMAT_DIRECT = 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT',IS_SETTINGS_DISCOVERY_HERO_ENABLED = 'IS_SETTINGS_DISCOVERY_HERO_ENABLED',- IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED',- IS_WORKFLOW_RUN_STEP_LOGS_ENABLED = 'IS_WORKFLOW_RUN_STEP_LOGS_ENABLED'+ IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED'}export enum HealthIndicatorId {diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.tsindex d6652032941..af2df2ab78e 100644--- a/packages/twenty-front/src/generated-metadata/graphql.ts+++ b/packages/twenty-front/src/generated-metadata/graphql.ts@@ -1652,8 +1652,7 @@ export enum FeatureFlagKey {IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED',IS_REST_METADATA_API_NEW_FORMAT_DIRECT = 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT',IS_SETTINGS_DISCOVERY_HERO_ENABLED = 'IS_SETTINGS_DISCOVERY_HERO_ENABLED',- IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED',- IS_WORKFLOW_RUN_STEP_LOGS_ENABLED = 'IS_WORKFLOW_RUN_STEP_LOGS_ENABLED'+ IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED'}export type Field = {diff --git a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsxindex 15af1a7881e..d9963af2438 100644--- a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx@@ -23,11 +23,9 @@ import {} from '@/workflow/workflow-steps/types/WorkflowRunTabId';import { getWorkflowRunStepExecutionStatus } from '@/workflow/workflow-steps/utils/getWorkflowRunStepExecutionStatus';import { WorkflowIteratorSubStepSwitcher } from '@/workflow/workflow-steps/workflow-actions/iterator-action/components/WorkflowIteratorSubStepSwitcher';-import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isNull } from '@sniptt/guards';-import { FeatureFlagKey } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import {IconLogin2,@@ -59,10 +57,6 @@ export const SidePanelWorkflowRunViewStepContent = () => {const workflowRun = useWorkflowRun({ workflowRunId });- const isStepLogsEnabled = useIsFeatureEnabled(- FeatureFlagKey.IS_WORKFLOW_RUN_STEP_LOGS_ENABLED,- );-const sidePanelPageComponentInstance = useComponentInstanceStateContext(SidePanelPageComponentInstanceContext,);@@ -125,15 +119,11 @@ export const SidePanelWorkflowRunViewStepContent = () => {Icon: IconLogin2,disabled: isInputTabDisabled,},- ...(isStepLogsEnabled- ? [- {- id: WorkflowRunTabId.LOGS,- title: t`Logs`,- Icon: IconTerminal,- } satisfies SingleTabProps<TabId>,- ]- : []),+ {+ id: WorkflowRunTabId.LOGS,+ title: t`Logs`,+ Icon: IconTerminal,+ },];return (@@ -183,7 +173,7 @@ export const SidePanelWorkflowRunViewStepContent = () => {/>) : null}- {isStepLogsEnabled && activeTabId === WorkflowRunTabId.LOGS ? (+ {activeTabId === WorkflowRunTabId.LOGS ? (<WorkflowRunStepLogsDetailkey={workflowSelectedNode}stepId={workflowSelectedNode}diff --git a/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts b/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.tsindex 451ee4e1e79..72a1f4380f1 100644--- a/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts+++ b/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts@@ -28,14 +28,6 @@ export const PUBLIC_FEATURE_FLAGS: PublicFeatureFlag[] = ['Show the per-page hero illustration + video walkthrough modal on settings pages',},},- {- key: FeatureFlagKey.IS_WORKFLOW_RUN_STEP_LOGS_ENABLED,- metadata: {- label: 'Workflow Run Step Logs',- description:- 'Persist and display per-step observability logs (token usage, tool calls, HTTP bodies, serverless function output) on workflow runs',- },- },...(process.env.CLOUDFLARE_API_KEY? [// {diff --git a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.tsindex 1aeb324c57a..545bdddefca 100644--- a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts+++ b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts@@ -240,7 +240,6 @@ describe('WorkspaceEntityManager', () => {IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED: false,IS_SETTINGS_DISCOVERY_HERO_ENABLED: false,IS_CALL_RECORDING_ENABLED: false,- IS_WORKFLOW_RUN_STEP_LOGS_ENABLED: false,},userWorkspaceRoleMap: {},eventEmitterService: {diff --git a/packages/twenty-server/src/modules/workflow/workflow-runner/workflow-run/workflow-run-step-log.workspace-service.ts b/packages/twenty-server/src/modules/workflow/workflow-runner/workflow-run/workflow-run-step-log.workspace-service.tsindex a9bbf7d4f9d..65f4820a022 100644--- a/packages/twenty-server/src/modules/workflow/workflow-runner/workflow-run/workflow-run-step-log.workspace-service.ts+++ b/packages/twenty-server/src/modules/workflow/workflow-runner/workflow-run/workflow-run-step-log.workspace-service.ts@@ -1,9 +1,7 @@import { Injectable, Logger } from '@nestjs/common';-import { FeatureFlagKey } from 'twenty-shared/types';import { type WorkflowRunStepLog } from 'twenty-shared/workflow';-import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';import { GlobalWorkspaceOrmManager } from 'src/engine/twenty-orm/global-workspace-datasource/global-workspace-orm.manager';import { buildSystemAuthContext } from 'src/engine/twenty-orm/utils/build-system-auth-context.util';import { type WorkflowRunWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow-run.workspace-entity';@@ -24,7 +22,6 @@ export class WorkflowRunStepLogWorkspaceService {constructor(private readonly globalWorkspaceOrmManager: GlobalWorkspaceOrmManager,- private readonly featureFlagService: FeatureFlagService,) {}async setStepLog({workflowRunId,@@ -37,15 +34,6 @@ export class WorkflowRunStepLogWorkspaceService {stepId: string;stepLog: WorkflowRunStepLog;}): Promise<void> {- const isStepLogsEnabled = await this.featureFlagService.isFeatureEnabled(- FeatureFlagKey.IS_WORKFLOW_RUN_STEP_LOGS_ENABLED,- workspaceId,- );-- if (!isStepLogsEnabled) {- return;- }-const sizeBytes = computeSizeBytes(stepLog);if (sizeBytes > MAX_STEP_LOG_BYTES) {diff --git a/packages/twenty-shared/src/types/FeatureFlagKey.ts b/packages/twenty-shared/src/types/FeatureFlagKey.tsindex 6e417668c91..81c8bdbbb2b 100644--- a/packages/twenty-shared/src/types/FeatureFlagKey.ts+++ b/packages/twenty-shared/src/types/FeatureFlagKey.ts@@ -9,5 +9,4 @@ export enum FeatureFlagKey {IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED = 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED',IS_SETTINGS_DISCOVERY_HERO_ENABLED = 'IS_SETTINGS_DISCOVERY_HERO_ENABLED',IS_CALL_RECORDING_ENABLED = 'IS_CALL_RECORDING_ENABLED',- IS_WORKFLOW_RUN_STEP_LOGS_ENABLED = 'IS_WORKFLOW_RUN_STEP_LOGS_ENABLED',}