diff --git a/RELEASE.md b/RELEASE.md index 331372528..51c61e66a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,8 @@ +# Release 1.10.1 +## Major Features and Improvements +* Optimize table info API + + # Release 1.10.0 ## Major Features and Improvements * Add connection test API diff --git a/python/fate_flow/apps/table_app.py b/python/fate_flow/apps/table_app.py index a719bf5af..5c617a65a 100644 --- a/python/fate_flow/apps/table_app.py +++ b/python/fate_flow/apps/table_app.py @@ -21,7 +21,7 @@ from fate_flow.manager.data_manager import DataTableTracker, TableStorage, SchemaMetaParam, AnonymousGenerator from fate_flow.operation.job_saver import JobSaver from fate_flow.operation.job_tracker import Tracker -from fate_flow.utils.data_utils import get_extend_id_name +from fate_flow.utils.data_utils import get_extend_id_name, address_filter from fate_flow.worker.task_executor import TaskExecutor from fate_flow.utils.api_utils import get_json_result, error_response, validate_request from fate_flow.utils import job_utils, schedule_utils @@ -242,7 +242,7 @@ def table_api(table_func): table_schema = table_meta.get_schema() extend_sid = table_meta.get_extend_sid() table_schema.update() - address = table_meta.get_address().__dict__ + address = address_filter(table_meta.get_address()) enable = not table_meta.get_disable() origin = table_meta.get_origin() exist = 1 diff --git a/python/fate_flow/utils/data_utils.py b/python/fate_flow/utils/data_utils.py index 0372f73f8..d37ef1e79 100644 --- a/python/fate_flow/utils/data_utils.py +++ b/python/fate_flow/utils/data_utils.py @@ -14,6 +14,7 @@ # limitations under the License. # from fate_arch.abc import StorageTableMetaABC, AddressABC +from fate_arch.common.address import MysqlAddress, HiveAddress from fate_arch.common.data_utils import default_output_fs_path from fate_arch.computing import ComputingEngine from fate_arch.storage import StorageEngine, StorageTableMeta @@ -155,3 +156,11 @@ def get_input_search_type(parameters): return InputSearchType.JOB_COMPONENT_OUTPUT else: return InputSearchType.UNKNOWN + + +def address_filter(address): + if isinstance(address, MysqlAddress): + address.passwd = None + if isinstance(address, HiveAddress): + address.password = None + return address.__dict__