You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zh...@apache.org on 2022/08/03 06:41:58 UTC

[dolphinscheduler] branch 3.0.0-prepare updated (2c469224dd -> 5e366ff6f1)

This is an automated email from the ASF dual-hosted git repository.

zhongjiajie pushed a change to branch 3.0.0-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


    from 2c469224dd fix bug where confirm disable error (#11251)
     new c31087bd95 fix: Upgrade database DDL to avoid log path too long error
     new 5e366ff6f1 [Fix][UI] fix bug where log modal display object (#11271)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/resources/sql/dolphinscheduler_h2.sql     |  2 +-
 .../src/main/resources/sql/dolphinscheduler_mysql.sql  |  2 +-
 .../main/resources/sql/dolphinscheduler_postgresql.sql |  2 +-
 .../3.0.0_schema/mysql/dolphinscheduler_ddl.sql        | 18 ++++++++++++++++++
 .../3.0.0_schema/postgresql/dolphinscheduler_ddl.sql   |  3 +++
 .../views/projects/workflow/components/dag/index.tsx   |  8 ++++----
 6 files changed, 28 insertions(+), 7 deletions(-)


[dolphinscheduler] 01/02: fix: Upgrade database DDL to avoid log path too long error

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhongjiajie pushed a commit to branch 3.0.0-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git

commit c31087bd950b54ecf12c077e060e839b0518f14d
Author: Jiajie Zhong <zh...@gmail.com>
AuthorDate: Wed Aug 3 11:29:28 2022 +0800

    fix: Upgrade database DDL to avoid log path too long error
---
 .../src/main/resources/sql/dolphinscheduler_h2.sql     |  2 +-
 .../src/main/resources/sql/dolphinscheduler_mysql.sql  |  2 +-
 .../main/resources/sql/dolphinscheduler_postgresql.sql |  2 +-
 .../3.0.0_schema/mysql/dolphinscheduler_ddl.sql        | 18 ++++++++++++++++++
 .../3.0.0_schema/postgresql/dolphinscheduler_ddl.sql   |  3 +++
 5 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql
index 092a773571..0467b291b3 100644
--- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql
+++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql
@@ -844,7 +844,7 @@ CREATE TABLE t_ds_task_instance
     end_time                datetime     DEFAULT NULL,
     host                    varchar(135) DEFAULT NULL,
     execute_path            varchar(200) DEFAULT NULL,
-    log_path                varchar(200) DEFAULT NULL,
+    log_path                longtext DEFAULT NULL,
     alert_flag              tinyint(4) DEFAULT NULL,
     retry_times             int(4) DEFAULT '0',
     pid                     int(4) DEFAULT NULL,
diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql
index 4df9d79eb4..14dbaa5221 100644
--- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql
+++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql
@@ -837,7 +837,7 @@ CREATE TABLE `t_ds_task_instance` (
   `end_time` datetime DEFAULT NULL COMMENT 'task end time',
   `host` varchar(135) DEFAULT NULL COMMENT 'host of task running on',
   `execute_path` varchar(200) DEFAULT NULL COMMENT 'task execute path in the host',
-  `log_path` varchar(200) DEFAULT NULL COMMENT 'task log path',
+  `log_path` longtext DEFAULT NULL COMMENT 'task log path',
   `alert_flag` tinyint(4) DEFAULT NULL COMMENT 'whether alert',
   `retry_times` int(4) DEFAULT '0' COMMENT 'task retry times',
   `pid` int(4) DEFAULT NULL COMMENT 'pid of task',
diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql
index 9bd84e1e5d..db83a0faf4 100644
--- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql
+++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql
@@ -742,7 +742,7 @@ CREATE TABLE t_ds_task_instance (
   end_time timestamp DEFAULT NULL ,
   host varchar(135) DEFAULT NULL ,
   execute_path varchar(200) DEFAULT NULL ,
-  log_path varchar(200) DEFAULT NULL ,
+  log_path text DEFAULT NULL ,
   alert_flag int DEFAULT NULL ,
   retry_times int DEFAULT '0' ,
   pid int DEFAULT NULL ,
diff --git a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.0.0_schema/mysql/dolphinscheduler_ddl.sql b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.0.0_schema/mysql/dolphinscheduler_ddl.sql
index 9a19da50a6..c5b15ec884 100644
--- a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.0.0_schema/mysql/dolphinscheduler_ddl.sql
+++ b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.0.0_schema/mysql/dolphinscheduler_ddl.sql
@@ -477,6 +477,24 @@ delimiter ;
 CALL add_t_ds_alert_col_project_code;
 DROP PROCEDURE add_t_ds_alert_col_project_code;
 
+-- t_ds_task_instance
+drop PROCEDURE if EXISTS alter_t_ds_task_instance_col_log_path;
+delimiter d//
+CREATE PROCEDURE alter_t_ds_task_instance_col_log_path()
+BEGIN
+    IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS
+        WHERE TABLE_NAME='t_ds_task_instance'
+        AND TABLE_SCHEMA=(SELECT DATABASE())
+        AND COLUMN_NAME='log_path')
+    THEN
+ALTER TABLE `t_ds_task_instance` MODIFY COLUMN `log_path` longtext DEFAULT NULL COMMENT 'task log path';
+END IF;
+END;
+d//
+delimiter ;
+CALL alter_t_ds_task_instance_col_log_path;
+DROP PROCEDURE alter_t_ds_task_instance_col_log_path;
+
 --
 -- Table structure for table `t_ds_dq_comparison_type`
 --
diff --git a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.0.0_schema/postgresql/dolphinscheduler_ddl.sql b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.0.0_schema/postgresql/dolphinscheduler_ddl.sql
index fa0d864f08..393bda87fc 100644
--- a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.0.0_schema/postgresql/dolphinscheduler_ddl.sql
+++ b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.0.0_schema/postgresql/dolphinscheduler_ddl.sql
@@ -18,6 +18,9 @@
 --- Drop table: Some table forget delete in the past, should be delete in version 1.2.0
 DROP TABLE IF EXISTS t_ds_worker_server;
 
+--- alter table
+ALTER TABLE t_ds_task_instance ALTER COLUMN log_path TYPE text;
+
 --- Add CONSTRAINT key
 ALTER TABLE t_ds_task_instance DROP CONSTRAINT IF EXISTS foreign_key_instance_id;
 ALTER TABLE t_ds_task_instance ADD CONSTRAINT foreign_key_instance_id FOREIGN KEY(process_instance_id) REFERENCES t_ds_process_instance(id) ON DELETE CASCADE;


[dolphinscheduler] 02/02: [Fix][UI] fix bug where log modal display object (#11271)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhongjiajie pushed a commit to branch 3.0.0-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git

commit 5e366ff6f123ac5127f0d504ea33fc51cb641e4a
Author: Devosend <de...@gmail.com>
AuthorDate: Wed Aug 3 13:54:32 2022 +0800

    [Fix][UI] fix bug where log modal display object (#11271)
    
    (cherry picked from commit 9ba9a0ff8216cc920969f15f50105ddc5cd1e13e)
---
 .../src/views/projects/workflow/components/dag/index.tsx          | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx
index b634c0bb08..fcb49bbe8f 100644
--- a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx
+++ b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx
@@ -241,11 +241,11 @@ export default defineComponent({
           taskInstanceId: nodeVariables.logTaskId,
           limit: nodeVariables.limit,
           skipLineNum: nodeVariables.skipLineNum
-        }).then((res: string) => {
-          nodeVariables.logRef += res
-          if (res) {
+        }).then((res: any) => {
+          if (res.message) {
+            nodeVariables.logRef += res.message
             nodeVariables.limit += 1000
-            nodeVariables.skipLineNum += 1000
+            nodeVariables.skipLineNum += res.lineNum
             getLogs()
           } else {
             nodeVariables.logLoadingRef = false