Skip to content
Snippets Groups Projects
Commit 3c00266b authored by Hans Fangohr's avatar Hans Fangohr
Browse files

Merge branch 'update-record_script_execution_summary' into 'main'

Remove redundant argument to record script execution summary function

See merge request !88
parents cda173f5 0014485e
No related branches found
No related tags found
1 merge request!88Remove redundant argument to record script execution summary function
Pipeline #374229 passed
......@@ -551,9 +551,7 @@ def run(*args, counter=[0], **kwargs):
return process
def record_script_execution_summary(
mpsd_release: str, root_dir: str, msg: str = None, **kwargs
) -> None:
def record_script_execution_summary(root_dir: str, msg: str = None, **kwargs) -> None:
"""Log the command used to build the package_set.
It also logs information about the spack-environments branch and commit hash,
......@@ -562,8 +560,6 @@ def record_script_execution_summary(
Parameters
----------
- mpsd_release : str
The name of the release to install toolchains for.
- root_dir : str
The path to the directory where the scripts are located.
- msg : str, optional
......@@ -606,10 +602,11 @@ def record_script_execution_summary(
f.write(f"{datetime.datetime.now().isoformat()}, {cmd_line}\n")
# logs script version
f.write(f"MPSD Software manager version: {__version__}\n")
f.write(
f"Spack environments branch: {spe_branch} "
f"(commit hash: {spe_commit_hash})\n"
)
if spe_branch and spe_commit_hash:
f.write(
f"Spack environments branch: {spe_branch} "
f"(commit hash: {spe_commit_hash})\n"
)
def clone_repo(
......@@ -787,7 +784,7 @@ def prepare_environment(mpsd_release: str, root_dir: Path) -> List[str]:
mpsd_release, root_dir
)
record_script_execution_summary(
mpsd_release, root_dir, spe_branch=spe_branch, spe_commit_hash=spe_commit_hash
root_dir, spe_branch=spe_branch, spe_commit_hash=spe_commit_hash
)
return available_package_sets
......@@ -938,12 +935,10 @@ def install_environment(
# log the command
record_script_execution_summary(
mpsd_release,
root_dir,
msg=f"installing {package_set} and logging at {build_log_path}",
)
record_script_execution_summary(
mpsd_release,
root_dir,
msg=(
f"CMD: bash {spack_setup_script} {' '.join(install_flags)} "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment