From 06c360fa115b1747440118efd318ecfcdeb8f884 Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Tue, 26 Nov 2024 15:18:09 +0100 Subject: [PATCH] added debug traces to debug a problem that only happens in ci (can't reproduce even when logged as jenkins-agent) The error message is: > ValueError: failed to find compilers/ifort/latest amongst available environment modules (set()) work related to [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=3958] --- iprbench/envmodules.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iprbench/envmodules.py b/iprbench/envmodules.py index a20b60d..4b692ba 100644 --- a/iprbench/envmodules.py +++ b/iprbench/envmodules.py @@ -2,6 +2,7 @@ from typing import Set from pathlib import Path import subprocess import re +import logging EnvModule = str # eg compilers/ifort/latest @@ -22,6 +23,7 @@ def get_available_modules() -> Set[EnvModule]: # null stdout = completed_process.stdout.decode('utf-8') for line in stdout.splitlines(): + logging.debug('available module line: "%s"', line) if not re.search(r'\:$', line): # ignore the directories such as '/usr/share/modules/modulefiles:' available_modules.add(EnvModule(line)) return available_modules