diff --git a/CHANGELOG.md b/CHANGELOG.md index ab25619d..f377960d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `Fixed` for any bug fixes. `Security` in case of vulnerabilities. +## [0.8.1b0] - 2024-06-28 +### Fixed + +- [Fixed] Fix incompatible sql issue + + + ## [0.8.0b0] - 2024-06-15 ### Added diff --git a/README.md b/README.md index ba35003e..a162d90e 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ For more details, see [Development](./docs/deployment_experience/v0.6.0b0/deploy | secretpad Version | Kuscia Version | secretflow Version | trustedflow Version | serving Version | |-------------------|----------------|--------------------|---------------------|-----------------| -| 0.8.0b0 | 0.9.0b0 | 1.7.0b0 | 0.1.1b0 | 0.4.0b0 | +| 0.8.0b0/0.8.1b0 | 0.9.0b0 | 1.7.0b0 | 0.1.1b0 | 0.4.0b0 | | 0.7.1b0/0.7.2b0 | 0.8.0b0 | 1.6.1b0 | 0.1.1b0 | 0.3.1b0 | | 0.6.0b0 | 0.7.0b0 | 1.5.0b0 | 0.1.1b0 | 0.2.1b0 | | 0.5.0b0 | 0.6.0b0 | 1.4.0b0 | 0.1.1b0 | 0.2.0b0 | diff --git a/README.zh-CN.md b/README.zh-CN.md index d8e2adec..97855ec0 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -92,7 +92,7 @@ sh install.sh p2p -n domainId -s 8099 -g 8092 -k 8091 -p 8090 -q 33801 | secretpad Version | Kuscia Version | secretflow Version | trustedflow Version | serving Version | |-------------------|----------------|--------------------|---------------------|-----------------| -| 0.8.0b0 | 0.9.0b0 | 1.7.0b0 | 0.1.1b0 | 0.4.0b0 | +| 0.8.0b0/0.8.1b0 | 0.9.0b0 | 1.7.0b0 | 0.1.1b0 | 0.4.0b0 | | 0.7.1b0/0.7.2b0 | 0.8.0b0 | 1.6.1b0 | 0.1.1b0 | 0.3.1b0 | | 0.6.0b0 | 0.7.0b0 | 1.5.0b0 | 0.1.1b0 | 0.2.1b0 | | 0.5.0b0 | 0.6.0b0 | 1.4.0b0 | 0.1.1b0 | 0.2.0b0 | diff --git a/config/schema/center/V2_1__0.8.0.sql b/config/schema/center/V2_1__0.8.0.sql new file mode 100644 index 00000000..a5fb7635 --- /dev/null +++ b/config/schema/center/V2_1__0.8.0.sql @@ -0,0 +1,86 @@ +/* + * Copyright 2024 Ant Group Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +-- feature_table_new +create table if not exists `feature_table_new` +( + id integer primary key autoincrement, + feature_table_id varchar(8) not null, -- feature table id + feature_table_name varchar(32) not null, -- feature table name + node_id varchar(64) not null, -- node_id + type varchar(8) not null default 'HTTP', -- feature datasource type + description varchar(64) default null, -- feature table desc + url varchar(64) not null, -- feature table service addr + columns text not null, -- feature table columns + status varchar(16) not null, -- Available,Unavailable + is_deleted tinyint(1) default '0' not null, -- delete flag + gmt_create datetime default CURRENT_TIMESTAMP not null, -- create time + gmt_modified datetime default CURRENT_TIMESTAMP not null, -- modified time + datasource_id varchar(64) default "http-data-source" not null --default datasource +); +-- finish create feature_table_new + +-- syn data ignore datasource_id use default_value +insert or ignore into feature_table_new (id,feature_table_id,feature_table_name,node_id,type, description,url,columns,status,is_deleted,gmt_create,gmt_modified) + SELECT id,feature_table_id,feature_table_name,node_id,type, description,url,columns,status,is_deleted,gmt_create,gmt_modified + FROM feature_table; + +-- rename old +alter table feature_table rename to feature_table_backup; +-- remove old index +drop index upk_feature_table_id; +-- remove old index +drop index upk_datasource_feature_table_id; + +-- rename new +alter table feature_table_new rename to feature_table; + +-- index rebuild +create unique index if not exists `upk_feature_table_id` on feature_table (`feature_table_id`); +-- index rebuild +create unique index if not exists `upk_datasource_feature_table_id` on feature_table (`feature_table_id`, `node_id`, `datasource_id`); + + +-- project_feature_table_new +create table if not exists `project_feature_table_new` +( + id integer primary key autoincrement, + project_id varchar(64) not null, + node_id varchar(64) not null, + feature_table_id varchar(64) not null, + table_configs text not null, -- project feature table config + source varchar(16) not null, -- project feature table from: IMPORTED/CREATED + is_deleted tinyint(1) default '0' not null, -- delete flag + gmt_create datetime default CURRENT_TIMESTAMP not null, -- create time + gmt_modified datetime default CURRENT_TIMESTAMP not null, -- modified time + datasource_id varchar(64) default "http-data-source" not null --default datasource +); + +insert or ignore into project_feature_table_new (id, project_id, node_id, feature_table_id,table_configs, source, is_deleted, gmt_create, gmt_modified) + SELECT id, project_id, node_id, feature_table_id, table_configs, source, is_deleted, gmt_create, gmt_modified + FROM project_feature_table; + + +-- rename old +alter table project_feature_table rename to project_feature_table_backup; +-- remove old index +drop index upk_project_feature_table_id; + +-- rename new +alter table project_feature_table_new rename to project_feature_table; + +-- index rebuild +create unique index if not exists `upk_project_feature_table_id` on project_feature_table (`project_id`, `node_id`, `feature_table_id`); diff --git a/config/schema/edge/V2_1__0.8.0.sql b/config/schema/edge/V2_1__0.8.0.sql new file mode 100644 index 00000000..a5fb7635 --- /dev/null +++ b/config/schema/edge/V2_1__0.8.0.sql @@ -0,0 +1,86 @@ +/* + * Copyright 2024 Ant Group Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +-- feature_table_new +create table if not exists `feature_table_new` +( + id integer primary key autoincrement, + feature_table_id varchar(8) not null, -- feature table id + feature_table_name varchar(32) not null, -- feature table name + node_id varchar(64) not null, -- node_id + type varchar(8) not null default 'HTTP', -- feature datasource type + description varchar(64) default null, -- feature table desc + url varchar(64) not null, -- feature table service addr + columns text not null, -- feature table columns + status varchar(16) not null, -- Available,Unavailable + is_deleted tinyint(1) default '0' not null, -- delete flag + gmt_create datetime default CURRENT_TIMESTAMP not null, -- create time + gmt_modified datetime default CURRENT_TIMESTAMP not null, -- modified time + datasource_id varchar(64) default "http-data-source" not null --default datasource +); +-- finish create feature_table_new + +-- syn data ignore datasource_id use default_value +insert or ignore into feature_table_new (id,feature_table_id,feature_table_name,node_id,type, description,url,columns,status,is_deleted,gmt_create,gmt_modified) + SELECT id,feature_table_id,feature_table_name,node_id,type, description,url,columns,status,is_deleted,gmt_create,gmt_modified + FROM feature_table; + +-- rename old +alter table feature_table rename to feature_table_backup; +-- remove old index +drop index upk_feature_table_id; +-- remove old index +drop index upk_datasource_feature_table_id; + +-- rename new +alter table feature_table_new rename to feature_table; + +-- index rebuild +create unique index if not exists `upk_feature_table_id` on feature_table (`feature_table_id`); +-- index rebuild +create unique index if not exists `upk_datasource_feature_table_id` on feature_table (`feature_table_id`, `node_id`, `datasource_id`); + + +-- project_feature_table_new +create table if not exists `project_feature_table_new` +( + id integer primary key autoincrement, + project_id varchar(64) not null, + node_id varchar(64) not null, + feature_table_id varchar(64) not null, + table_configs text not null, -- project feature table config + source varchar(16) not null, -- project feature table from: IMPORTED/CREATED + is_deleted tinyint(1) default '0' not null, -- delete flag + gmt_create datetime default CURRENT_TIMESTAMP not null, -- create time + gmt_modified datetime default CURRENT_TIMESTAMP not null, -- modified time + datasource_id varchar(64) default "http-data-source" not null --default datasource +); + +insert or ignore into project_feature_table_new (id, project_id, node_id, feature_table_id,table_configs, source, is_deleted, gmt_create, gmt_modified) + SELECT id, project_id, node_id, feature_table_id, table_configs, source, is_deleted, gmt_create, gmt_modified + FROM project_feature_table; + + +-- rename old +alter table project_feature_table rename to project_feature_table_backup; +-- remove old index +drop index upk_project_feature_table_id; + +-- rename new +alter table project_feature_table_new rename to project_feature_table; + +-- index rebuild +create unique index if not exists `upk_project_feature_table_id` on project_feature_table (`project_id`, `node_id`, `feature_table_id`); diff --git a/config/schema/p2p/V2_1__0.8.0.sql b/config/schema/p2p/V2_1__0.8.0.sql new file mode 100644 index 00000000..a5fb7635 --- /dev/null +++ b/config/schema/p2p/V2_1__0.8.0.sql @@ -0,0 +1,86 @@ +/* + * Copyright 2024 Ant Group Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +-- feature_table_new +create table if not exists `feature_table_new` +( + id integer primary key autoincrement, + feature_table_id varchar(8) not null, -- feature table id + feature_table_name varchar(32) not null, -- feature table name + node_id varchar(64) not null, -- node_id + type varchar(8) not null default 'HTTP', -- feature datasource type + description varchar(64) default null, -- feature table desc + url varchar(64) not null, -- feature table service addr + columns text not null, -- feature table columns + status varchar(16) not null, -- Available,Unavailable + is_deleted tinyint(1) default '0' not null, -- delete flag + gmt_create datetime default CURRENT_TIMESTAMP not null, -- create time + gmt_modified datetime default CURRENT_TIMESTAMP not null, -- modified time + datasource_id varchar(64) default "http-data-source" not null --default datasource +); +-- finish create feature_table_new + +-- syn data ignore datasource_id use default_value +insert or ignore into feature_table_new (id,feature_table_id,feature_table_name,node_id,type, description,url,columns,status,is_deleted,gmt_create,gmt_modified) + SELECT id,feature_table_id,feature_table_name,node_id,type, description,url,columns,status,is_deleted,gmt_create,gmt_modified + FROM feature_table; + +-- rename old +alter table feature_table rename to feature_table_backup; +-- remove old index +drop index upk_feature_table_id; +-- remove old index +drop index upk_datasource_feature_table_id; + +-- rename new +alter table feature_table_new rename to feature_table; + +-- index rebuild +create unique index if not exists `upk_feature_table_id` on feature_table (`feature_table_id`); +-- index rebuild +create unique index if not exists `upk_datasource_feature_table_id` on feature_table (`feature_table_id`, `node_id`, `datasource_id`); + + +-- project_feature_table_new +create table if not exists `project_feature_table_new` +( + id integer primary key autoincrement, + project_id varchar(64) not null, + node_id varchar(64) not null, + feature_table_id varchar(64) not null, + table_configs text not null, -- project feature table config + source varchar(16) not null, -- project feature table from: IMPORTED/CREATED + is_deleted tinyint(1) default '0' not null, -- delete flag + gmt_create datetime default CURRENT_TIMESTAMP not null, -- create time + gmt_modified datetime default CURRENT_TIMESTAMP not null, -- modified time + datasource_id varchar(64) default "http-data-source" not null --default datasource +); + +insert or ignore into project_feature_table_new (id, project_id, node_id, feature_table_id,table_configs, source, is_deleted, gmt_create, gmt_modified) + SELECT id, project_id, node_id, feature_table_id, table_configs, source, is_deleted, gmt_create, gmt_modified + FROM project_feature_table; + + +-- rename old +alter table project_feature_table rename to project_feature_table_backup; +-- remove old index +drop index upk_project_feature_table_id; + +-- rename new +alter table project_feature_table_new rename to project_feature_table; + +-- index rebuild +create unique index if not exists `upk_project_feature_table_id` on project_feature_table (`project_id`, `node_id`, `feature_table_id`); diff --git a/config/schemamysql/create_table.sql b/config/schemamysql/create_table.sql index 2346c10c..4bde1f7c 100644 --- a/config/schemamysql/create_table.sql +++ b/config/schemamysql/create_table.sql @@ -622,5 +622,5 @@ create table if not exists `project_graph_domain_datasource` create unique index `upk_project_graph_domain` on project_graph_domain_datasource (`project_id`, `graph_id`, `domain_id`); -- todo mysql table column if not exists -alter table project_feature_table add column `datasource_id` varchar(64) not null default ""; -alter table feature_table add column `datasource_id` varchar(64) not null default ""; +alter table project_feature_table add column `datasource_id` varchar(64) not null default "http-data-source"; +alter table feature_table add column `datasource_id` varchar(64) not null default "http-data-source"; diff --git a/scripts/install.sh b/scripts/install.sh index 821e942d..af900c0d 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -16,7 +16,7 @@ # export KUSCIA_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia:0.9.0b0" -export SECRETPAD_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretpad:0.8.0b0" +export SECRETPAD_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretpad:0.8.1b0" export SECRETFLOW_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretflow-lite-anolis8:1.7.0b0" export SECRETFLOW_SERVING_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/serving-anolis8:0.4.0b0" export TEE_APP_IMAGE="secretflow/teeapps-sim-ubuntu20.04:0.1.2b0" diff --git a/scripts/pack/pack_allinone.sh b/scripts/pack/pack_allinone.sh index 2ab81cdf..c0d9cc60 100755 --- a/scripts/pack/pack_allinone.sh +++ b/scripts/pack/pack_allinone.sh @@ -17,7 +17,7 @@ # shellcheck disable=SC2223 : ${KUSCIA_IMAGE:="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia:0.9.0b0"} -: ${SECRETPAD_IMAGE:="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretpad:0.8.0b0"} +: ${SECRETPAD_IMAGE:="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretpad:0.8.1b0"} : ${SECRETFLOW_IMAGE:="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/secretflow-lite-anolis8:1.7.0b0"} : ${SECRETFLOW_SERVING_IMAGE:="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/serving-anolis8:0.4.0b0"} : ${TEE_APP_IMAGE:="secretflow/teeapps-sim-ubuntu20.04:0.1.2b0"}