Skip to content

Commit 03bd92a

Browse files
committed
fix obdiag workflow
1 parent 310c1d3 commit 03bd92a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

core.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4788,16 +4788,13 @@ def obdiag_func(self, args, deploy_name):
47884788
return False
47894789
cluster_config = deploy_config.components[component_name]
47904790
deploy_config.components[tool_name] = cluster_config
4791-
47924791
workflow_name='diag'
4793-
pkg = self.mirror_manager.get_best_pkg(name=tool_name)
4794-
if not pkg:
4795-
self._call_stdio('critical', '%s package not found' % tool_name)
4796-
return False
4797-
repository = self.repository_manager.create_instance_repository(pkg.name, pkg.version, pkg.md5)
47984792
deployed = self.obdiag_deploy(workflow_name)
47994793
tool = self.tool_manager.get_tool_config_by_name(tool_name)
48004794
if deployed and tool:
4795+
obdiag_tools = [tool for tool in self.tool_manager.get_tool_list() if tool.name == tool_name]
4796+
max_version_tool = max(t.config.version for t in obdiag_tools)
4797+
repository = self.repository_manager.get_repository(tool_name, max_version_tool)
48014798
self.repositories = [repository]
48024799
workflows = self.get_workflows(workflow_name, [repository])
48034800
return self.run_workflow(workflows, deploy_config.components, [repository], **{const.COMP_OCEANBASE_DIAGNOSTIC_TOOL: {"full_cmd": args, "deploy_config": deploy_config}})

0 commit comments

Comments
 (0)