Skip to content

Commit

Permalink
Bugfix 2.8.1 (#64)
Browse files Browse the repository at this point in the history
* fix: issue with collectinfo steps running as tasks

* TOOLS-2097 encode string to bytes before hash
  • Loading branch information
Jesse S authored Aug 22, 2022
1 parent ca38f95 commit dc87c6b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mac-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
repository_dispatch:
types: mac-build
push:
branches: [actionsHub, master, test-ready, TOOLS-1993-mac-build]
branches: [actionsHub, master, test-ready, bugfix-2.8.1]
pull_request:
branches: [actionsHub]
workflow_call:
Expand Down
10 changes: 4 additions & 6 deletions lib/live_cluster/collectinfo_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,17 +863,15 @@ async def _run_collectinfo(
self._dump_collectinfo_sysinfo(as_logfile_prefix, file_header),
self._dump_collectinfo_aerospike_conf(as_logfile_prefix, config_path),
]
tasks: list[asyncio.Task] = list(map(asyncio.create_task, coroutines)) # type: ignore

for t in tasks:
for c in coroutines:
try:
await t
await c
except:
# close remaining coroutines. An error will be raised if they are not
# awaited.
for t in tasks:
if not t.done():
t.cancel()
for c in coroutines:
c.close()

if not ignore_errors:
self.logger.error(ignore_errors_msg)
Expand Down
2 changes: 1 addition & 1 deletion lib/log_analyzer/log_handler/log_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def _add_log_file(self, log_file=""):
file_key = self.reader.get_server_node_id(log_file)

if not file_key:
file_key = "MD5_" + str(hashlib.md5(log_file).hexdigest())
file_key = "MD5_" + str(hashlib.md5(log_file.encode("utf-8")).hexdigest())
file_key = file_key[:15] + " "

log = ServerLog(file_key, log_file, self.reader)
Expand Down

0 comments on commit dc87c6b

Please sign in to comment.