Files
galaxy/lib
mvdbeek 2406cf918e conda resolver: gate lazy availability probe on auto_init
CondaDependencyResolver.__init__ calls ensure_installed(), which shells
out to 'conda info --json' — spawning the conda binary (~1-2s) — to set
self.disabled. Two independent reductions:

1. Gate the probe on auto_init. With auto_init set, the resolver is
   expected to initialize conda at startup, so it still probes (and
   installs, if needed) eagerly in __init__ — behaviour unchanged. With
   auto_init off, nothing on the boot or job dependency-resolution path
   reads disabled (only the dependency-resolvers admin view), so disabled
   becomes a cached property probed lazily on first access.

2. Memoize CondaContext.conda_info(). It is queried several times over a
   context's life (availability probe, conda version, conda-build
   availability), each spawning conda. Cache the result and clear it in
   _reset_conda_properties() (already called after installs) so a re-probe
   reflects the new state. This also helps the auto_init/eager path.

An earlier revision deferred the probe unconditionally; because the boot
and job resolution paths never read disabled, conda was never
bootstrapped, breaking dependency resolution for conda-package tools.
2026-07-28 17:27:45 +02:00
..
2026-07-22 08:11:31 +03:00