diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index f2079d4e..6287fa6e 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -39,8 +39,8 @@ jobs: sed -i 's/pip install -r requirements3.txt/curl https:\/\/bootstrap.pypa.io\/get-pip.py -o get-pip.py\n\ python3 get-pip.py\n\ pip3 install -r requirements3.txt/' ./rpm/oceanbase-diagnostic-tool.spec + python3 -m pip install --upgrade pip wheel cat ./rpm/oceanbase-diagnostic-tool.spec - python3 -m pip install --upgrade pip setuptools wheel python3 --version rpmbuild -bb ./rpm/oceanbase-diagnostic-tool.spec diff --git a/handler/gather/gather_plan_monitor.py b/handler/gather/gather_plan_monitor.py index 38683d8e..8159c634 100644 --- a/handler/gather/gather_plan_monitor.py +++ b/handler/gather/gather_plan_monitor.py @@ -286,8 +286,8 @@ def report_schema(self, sql, tenant_name): handler.handle() except Exception as e: pass - table_info_file = os.path.join(self.local_stored_path, "obdiag_tabledump_result_{0}.txt".format(self.gather_timestamp)) - self.stdio.print("table info file path:{0}".format(table_info_file)) + table_info_file = os.path.join(self.local_stored_path, "obdiag_tabledump_result_{0}.txt".format(TimeUtils.timestamp_to_filename_time(self.gather_timestamp))) + self.stdio.verbose("table info file path:{0}".format(table_info_file)) table_info = self.get_table_info(table_info_file) if table_info: schemas = schemas + "
%s
" % table_info diff --git a/handler/gather/gather_tabledump.py b/handler/gather/gather_tabledump.py index 2a790e1f..9d73523d 100644 --- a/handler/gather/gather_tabledump.py +++ b/handler/gather/gather_tabledump.py @@ -62,9 +62,6 @@ def init(self): self.table = Util.get_option(options, 'table') user = Util.get_option(options, 'user') password = Util.get_option(options, 'password') - if not (self.database and self.table and user): - self.stdio.error("option --database/--table/--user not found, please provide") - return False store_dir_option = Util.get_option(options, 'store_dir') if store_dir_option is not None and store_dir_option != './': if not os.path.exists(os.path.abspath(store_dir_option)): @@ -81,6 +78,9 @@ def init(self): password = self.context.get_variable("gather_password") if self.context.get_variable("store_dir", None): self.store_dir = self.context.get_variable("store_dir") + if not (self.database and self.table and user): + self.stdio.error("option --database/--table/--user not found, please provide") + return False if self.context.get_variable("gather_tenant_name", None): self.tenant_name = self.context.get_variable("gather_tenant_name") else: diff --git a/requirements3.txt b/requirements3.txt index 2b4c46b6..96476675 100644 --- a/requirements3.txt +++ b/requirements3.txt @@ -38,3 +38,4 @@ sqlgpt-parser>=0.0.1a5 netifaces==0.11.0 netifaces==0.11.0 kubernetes==30.1.0 +setuptools==70.3.0