Skip to content

Commit

Permalink
Fix unit testing errors and supplement ddl, dml (#610)
Browse files Browse the repository at this point in the history
* fix instance label server unit testing errors

* fix linkis-jobhistory unit testing errors

* fix  cannot find symbol

* fix linkis-udf unit testing errors

* fix linkis-configration unit testing errors:The h2 database does not support <include refid

* fix linkis-pes-public unit testing errors

* fix linkis-pes-public unit testing errors

* fix spark unit testing errors

* fix python unit testing errors

* fix python unit testing errors

* fix python unit testing errors

* Fix build

* fix unit testing errors

* fix unit testing errors

* fix unit testing errors

* fix unit testing errors

* Fix jdbc unit testing errors

* Fix presto unit testing errors

* update ddl dml

* update ddl dml

* Fix dependency libraries

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

* Fix unit testing errors

---------

Co-authored-by: “v_kkhuang” <“420895376@qq.com”>
Co-authored-by: peacewong <peacewong@apache.org>
  • Loading branch information
3 people authored and aiceflower committed Nov 4, 2024
1 parent fa3575e commit 70b74a3
Show file tree
Hide file tree
Showing 37 changed files with 992 additions and 670 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class GovernanceCommonConfTest {
val errorcodedesclen = GovernanceCommonConf.ERROR_CODE_DESC_LEN

Assertions.assertEquals("wds.linkis.rm", conffilterrm)
Assertions.assertEquals("3.2.1", sparkengineversion)
Assertions.assertEquals("3.1.3", hiveengineversion)
Assertions.assertEquals("2.4.3", sparkengineversion)
Assertions.assertEquals("1.2.1", hiveengineversion)
Assertions.assertEquals("python2", pythonengineversion)
Assertions.assertFalse(pythoncodeparserswitch)
Assertions.assertFalse(scalacodeparserswitch)
Expand Down
398 changes: 312 additions & 86 deletions linkis-dist/package/db/linkis_ddl.sql

Large diffs are not rendered by default.

158 changes: 105 additions & 53 deletions linkis-dist/package/db/linkis_dml.sql

Large diffs are not rendered by default.

81 changes: 80 additions & 1 deletion linkis-dist/package/db/upgrade/1.6.0_schema/mysql/linkis_ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ ALTER TABLE `linkis_cg_ec_resource_info_record` MODIFY COLUMN `metrics` text CHA
ALTER TABLE `linkis_ps_configuration_config_key`
CHANGE COLUMN `validate_range` `validate_range` VARCHAR(150) NULL DEFAULT NULL COMMENT 'Validate range' COLLATE 'utf8_bin' AFTER `validate_type`;
ALTER TABLE linkis_cg_tenant_label_config ADD COLUMN is_valid varchar(1) CHARSET utf8mb4 COLLATE utf8mb4_bin DEFAULT 'Y' COMMENT '是否有效';

ALTER TABLE linkis_ps_configuration_across_cluster_rule modify COLUMN rules varchar(512) CHARSET utf8mb4 COLLATE utf8mb4_bin;
ALTER TABLE linkis_cg_manager_label_value_relation ADD CONSTRAINT unlid_lvk_lvc UNIQUE (label_id,label_value_key,label_value_content);

-- ----------------------------
-- Table structure for linkis_org_user
Expand All @@ -48,5 +49,83 @@ CREATE TABLE `linkis_org_user` (
PRIMARY KEY (`user_name`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE=utf8mb4_bin COMMENT ='user org info';

DROP TABLE IF EXISTS `linkis_ps_job_history_detail`;
DROP TABLE IF EXISTS `linkis_mg_gateway_whitelist_config`;

-- ----------------------------
-- Table structure for linkis_cg_tenant_department_config
-- ----------------------------
DROP TABLE IF EXISTS `linkis_cg_tenant_department_config`;
CREATE TABLE `linkis_cg_tenant_department_config` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`creator` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '应用',
`department` varchar(64) COLLATE utf8_bin NOT NULL COMMENT '部门名称',
`department_id` varchar(16) COLLATE utf8_bin NOT NULL COMMENT '部门ID',
`tenant_value` varchar(128) COLLATE utf8_bin NOT NULL COMMENT '部门租户标签',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`create_by` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '创建用户',
`is_valid` varchar(1) COLLATE utf8_bin NOT NULL DEFAULT 'Y' COMMENT '是否有效',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_creator_department` (`creator`,`department`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

DROP TABLE IF EXISTS `linkis_org_user_sync`;
CREATE TABLE `linkis_org_user_sync` (
`cluster_code` varchar(16) COMMENT '集群',
`user_type` varchar(64) COMMENT '用户类型',
`user_name` varchar(128) COMMENT '授权用户',
`org_id` varchar(16) COMMENT '部门ID',
`org_name` varchar(64) COMMENT '部门名字',
`queue_name` varchar(64) COMMENT '默认资源队列',
`db_name` varchar(64) COMMENT '默认操作数据库',
`interface_user` varchar(64) COMMENT '接口人',
`is_union_analyse` varchar(64) COMMENT '是否联合分析人',
`create_time` varchar(64) COMMENT '用户创建时间',
`user_itsm_no` varchar(64) COMMENT '用户创建单号',
PRIMARY KEY (`user_name`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE=utf8mb4_bin COMMENT ='用户部门统计INC表';

DROP TABLE IF EXISTS `linkis_mg_gateway_whitelist_config`;
CREATE TABLE `linkis_mg_gateway_whitelist_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`allowed_user` varchar(128) COLLATE utf8_bin NOT NULL,
`client_address` varchar(128) COLLATE utf8_bin NOT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `address_uniq` (`allowed_user`, `client_address`),
KEY `linkis_mg_gateway_whitelist_config_allowed_user` (`allowed_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

DROP TABLE IF EXISTS `linkis_mg_gateway_whitelist_sensitive_user`;
CREATE TABLE `linkis_mg_gateway_whitelist_sensitive_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sensitive_username` varchar(128) COLLATE utf8_bin NOT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `sensitive_username` (`sensitive_username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

DROP TABLE IF EXISTS `linkis_ps_python_module_info`;
CREATE TABLE `linkis_ps_python_module_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`name` varchar(255) NOT NULL COMMENT 'python模块名称',
`description` text COMMENT 'python模块描述',
`path` varchar(255) NOT NULL COMMENT 'hdfs路径',
`engine_type` varchar(50) NOT NULL COMMENT '引擎类型,python/spark/all',
`create_user` varchar(50) NOT NULL COMMENT '创建用户',
`update_user` varchar(50) NOT NULL COMMENT '修改用户',
`is_load` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否加载,0-未加载,1-已加载',
`is_expire` tinyint(1) DEFAULT NULL COMMENT '是否过期,0-未过期,1-已过期)',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; COMMENT='Python模块包信息表';

ALTER TABLE linkis_cg_manager_service_instance ADD COLUMN params text COLLATE utf8_bin DEFAULT NULL;




Loading

0 comments on commit 70b74a3

Please sign in to comment.