From 006074bee6e5867d1aebf26c398fec2f2f69ef28 Mon Sep 17 00:00:00 2001 From: Ryan Zhang Date: Thu, 14 May 2026 15:01:46 -0700 Subject: [PATCH 1/2] add flag to enable/disable python migration tool --- common/config/src/main/resources/gui.conf | 4 ++++ .../src/main/scala/org/apache/texera/config/GuiConfig.scala | 2 ++ .../org/apache/texera/service/resource/ConfigResource.scala | 1 + frontend/src/app/common/type/gui-config.ts | 1 + frontend/src/app/workspace/component/menu/menu.component.ts | 4 ++++ 5 files changed, 12 insertions(+) diff --git a/common/config/src/main/resources/gui.conf b/common/config/src/main/resources/gui.conf index d58d94ac7b9..2095016d18c 100644 --- a/common/config/src/main/resources/gui.conf +++ b/common/config/src/main/resources/gui.conf @@ -115,5 +115,9 @@ gui { # the limit of columns to be displayed in the result table limit-columns = 15 limit-columns = ${?GUI_WORKFLOW_WORKSPACE_LIMIT_COLUMNS} + + # whether AI python-notebook migration feature is enabled + python-notebook-migration-enabled = false + python-notebook-migration-enabled = ${?GUI_WORKFLOW_WORKSPACE_PYTHON_NOTEBOOK_MIGRATION_ENABLED} } } \ No newline at end of file diff --git a/common/config/src/main/scala/org/apache/texera/config/GuiConfig.scala b/common/config/src/main/scala/org/apache/texera/config/GuiConfig.scala index adc789c9843..971384be388 100644 --- a/common/config/src/main/scala/org/apache/texera/config/GuiConfig.scala +++ b/common/config/src/main/scala/org/apache/texera/config/GuiConfig.scala @@ -73,4 +73,6 @@ object GuiConfig { conf.getBoolean("gui.workflow-workspace.copilot-enabled") val guiWorkflowWorkspaceLimitColumns: Int = conf.getInt("gui.workflow-workspace.limit-columns") + val guiWorkflowWorkspacePythonNotebookMigrationEnabled: Boolean = + conf.getBoolean("gui.workflow-workspace.python-notebook-migration-enabled") } diff --git a/config-service/src/main/scala/org/apache/texera/service/resource/ConfigResource.scala b/config-service/src/main/scala/org/apache/texera/service/resource/ConfigResource.scala index b7517d81eb7..8ff489a354e 100644 --- a/config-service/src/main/scala/org/apache/texera/service/resource/ConfigResource.scala +++ b/config-service/src/main/scala/org/apache/texera/service/resource/ConfigResource.scala @@ -58,6 +58,7 @@ class ConfigResource { "activeTimeInMinutes" -> GuiConfig.guiWorkflowWorkspaceActiveTimeInMinutes, "copilotEnabled" -> GuiConfig.guiWorkflowWorkspaceCopilotEnabled, "limitColumns" -> GuiConfig.guiWorkflowWorkspaceLimitColumns, + "pythonNotebookMigrationEnabled" -> GuiConfig.guiWorkflowWorkspacePythonNotebookMigrationEnabled, // flags from the auth.conf if needed "expirationTimeInMinutes" -> AuthConfig.jwtExpirationMinutes ) diff --git a/frontend/src/app/common/type/gui-config.ts b/frontend/src/app/common/type/gui-config.ts index 3b7554e8d4c..39558ff8219 100644 --- a/frontend/src/app/common/type/gui-config.ts +++ b/frontend/src/app/common/type/gui-config.ts @@ -43,6 +43,7 @@ export interface GuiConfig { activeTimeInMinutes: number; copilotEnabled: boolean; limitColumns: number; + pythonNotebookMigrationEnabled: boolean; } export interface SidebarTabs { diff --git a/frontend/src/app/workspace/component/menu/menu.component.ts b/frontend/src/app/workspace/component/menu/menu.component.ts index 6375fbcee4e..a9e73654d6c 100644 --- a/frontend/src/app/workspace/component/menu/menu.component.ts +++ b/frontend/src/app/workspace/component/menu/menu.component.ts @@ -594,6 +594,10 @@ export class MenuComponent implements OnInit, OnDestroy { this.workflowActionService.deleteOperatorsAndLinks(allOperatorIDs); } + public get pythonNotebookMigrationEnabled(): boolean { + return this.config.env.pythonNotebookMigrationEnabled; + } + public onClickImportWorkflow = (file: NzUploadFile): boolean => { const reader = new FileReader(); reader.readAsText(file as any); From 48e8499df60aa45065d2a8e0e1f24ccc7a0e3d8a Mon Sep 17 00:00:00 2001 From: Ryan Zhang Date: Thu, 28 May 2026 11:22:18 -0700 Subject: [PATCH 2/2] removed getter in menu.component.ts --- frontend/src/app/workspace/component/menu/menu.component.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/frontend/src/app/workspace/component/menu/menu.component.ts b/frontend/src/app/workspace/component/menu/menu.component.ts index a9e73654d6c..6375fbcee4e 100644 --- a/frontend/src/app/workspace/component/menu/menu.component.ts +++ b/frontend/src/app/workspace/component/menu/menu.component.ts @@ -594,10 +594,6 @@ export class MenuComponent implements OnInit, OnDestroy { this.workflowActionService.deleteOperatorsAndLinks(allOperatorIDs); } - public get pythonNotebookMigrationEnabled(): boolean { - return this.config.env.pythonNotebookMigrationEnabled; - } - public onClickImportWorkflow = (file: NzUploadFile): boolean => { const reader = new FileReader(); reader.readAsText(file as any);