Skip to content

Commit 61af40b

Browse files
authored
Merge pull request #4671 from boegel/parallel_exts_no_error_on_missing_deps
don't raise error when required extensions are not found when installing extensions in parallel
2 parents 3716f43 + 50538b5 commit 61af40b

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

easybuild/framework/easyblock.py

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
from easybuild.tools.build_log import print_error, print_msg, print_warning
7575
from easybuild.tools.config import CHECKSUM_PRIORITY_JSON, DEFAULT_ENVVAR_USERS_MODULES, PYTHONPATH, EBPYTHONPREFIXES
7676
from easybuild.tools.config import FORCE_DOWNLOAD_ALL, FORCE_DOWNLOAD_PATCHES, FORCE_DOWNLOAD_SOURCES
77-
from easybuild.tools.config import EASYBUILD_SOURCES_URL # noqa
77+
from easybuild.tools.config import EASYBUILD_SOURCES_URL # noqa
7878
from easybuild.tools.config import build_option, build_path, get_log_filename, get_repository, get_repositorypath
7979
from easybuild.tools.config import install_path, log_path, package_path, source_paths
8080
from easybuild.tools.environment import restore_env, sanitize_env
@@ -2118,20 +2118,33 @@ def update_exts_progress_bar_helper(running_exts, progress_size):
21182118
# if some of the required dependencies are not installed yet, requeue this extension
21192119
elif pending_deps:
21202120

2121-
# make sure all required dependencies are actually going to be installed,
2122-
# to avoid getting stuck in an infinite loop!
2121+
# check whether all required dependency extensions are actually going to be installed;
2122+
# if not, we assume that they are provided by dependencies;
21232123
missing_deps = [x for x in required_deps if x not in all_ext_names]
21242124
if missing_deps:
2125-
raise EasyBuildError("Missing required dependencies for %s are not going to be installed: %s",
2126-
ext.name, ', '.join(missing_deps))
2127-
else:
2128-
self.log.info("Required dependencies missing for extension %s (%s), adding it back to queue...",
2129-
ext.name, ', '.join(pending_deps))
2125+
msg = f"Missing required extensions for {ext.name} not found "
2126+
msg += "in list of extensions being installed, let's assume they are provided by "
2127+
msg += "dependencies and proceed: " + ', '.join(missing_deps)
2128+
self.log.info(msg)
2129+
2130+
msg = f"Pending dependencies for {ext.name} before taking into account missing dependencies: "
2131+
self.log.debug(msg + ', '.join(pending_deps))
2132+
pending_deps = [x for x in pending_deps if x not in missing_deps]
2133+
msg = f"Pending dependencies for {ext.name} after taking into account missing dependencies: "
2134+
self.log.debug(msg + ', '.join(pending_deps))
2135+
2136+
if pending_deps:
2137+
msg = f"Required dependencies not installed yet for extension {ext.name} ("
2138+
msg += ', '.join(pending_deps)
2139+
msg += "), adding it back to queue..."
2140+
self.log.info(msg)
21302141
# purposely adding extension back in the queue at Nth place rather than at the end,
21312142
# since we assume that the required dependencies will be installed soon...
21322143
exts_queue.insert(max_iter, ext)
21332144

2134-
else:
2145+
# list of pending dependencies may be empty now after taking into account required extensions
2146+
# that are not being installed above, so extension may be ready to install
2147+
if not pending_deps:
21352148
tup = (ext.name, ext.version or '')
21362149
print_msg("starting installation of extension %s %s..." % tup, silent=self.silent, log=self.log)
21372150

0 commit comments

Comments
 (0)