diff --git a/conda-store-server/conda_store_server/_internal/plugins/lock/conda_lock/conda_lock.py b/conda-store-server/conda_store_server/_internal/plugins/lock/conda_lock/conda_lock.py index 9da85c36c..49d6bb932 100644 --- a/conda-store-server/conda_store_server/_internal/plugins/lock/conda_lock/conda_lock.py +++ b/conda-store-server/conda_store_server/_internal/plugins/lock/conda_lock/conda_lock.py @@ -93,7 +93,7 @@ def lock_plugins(): """conda-lock locking plugin""" yield types.TypeLockPlugin( - name="lock-conda_lock", + name="conda-lock", synopsis="Generate a lockfile using conda-lock", backend=CondaLock, ) diff --git a/conda-store-server/conda_store_server/_internal/worker/build.py b/conda-store-server/conda_store_server/_internal/worker/build.py index a67f264e5..aa84880f8 100644 --- a/conda-store-server/conda_store_server/_internal/worker/build.py +++ b/conda-store-server/conda_store_server/_internal/worker/build.py @@ -227,6 +227,10 @@ def build_conda_environment(db: Session, conda_store, build): else: lock_plugin_name, locker = conda_store.lock_plugin() conda_lock_spec = locker.lock_environment( + spec=schema.CondaSpecification.parse_obj( + build.specification.spec + ), + platforms=settings.conda_solve_platforms, context=plugin_context.PluginContext( conda_store=conda_store, stdout=LoggedStream( @@ -236,8 +240,6 @@ def build_conda_environment(db: Session, conda_store, build): prefix=f"plugin-{lock_plugin_name}: ", ), ), - spec=schema.CondaSpecification.parse_obj(build.specification.spec), - platforms=settings.conda_solve_platforms, ) conda_store.storage.set( diff --git a/conda-store-server/conda_store_server/app.py b/conda-store-server/conda_store_server/app.py index 3f0a2ea25..10f0ca8c0 100644 --- a/conda-store-server/conda_store_server/app.py +++ b/conda-store-server/conda_store_server/app.py @@ -195,7 +195,7 @@ def _check_build_key_version(self, proposal): ) lock_plugin_name = Unicode( - default_value="lock-conda_lock", + default_value="conda-lock", allow_none=False, config=True, ) @@ -481,6 +481,7 @@ def celery_app(self): @property def plugin_manager(self): + """Creates a plugin manager(if it doesn't already exist) and registers all plugins""" if hasattr(self, "_plugin_manager"): return self._plugin_manager diff --git a/conda-store-server/conda_store_server/plugins/plugin_context.py b/conda-store-server/conda_store_server/plugins/plugin_context.py index f1eef2a5f..303204dc0 100644 --- a/conda-store-server/conda_store_server/plugins/plugin_context.py +++ b/conda-store-server/conda_store_server/plugins/plugin_context.py @@ -62,7 +62,6 @@ def run_command( for line in proc.stdout: self.stdout.write(line) if not redirect_stderr: - import pdb; pdb.set_trace() for line in proc.stderr: self.stderr.write(line) diff --git a/conda-store-server/tests/plugins/test_plugin_manager.py b/conda-store-server/tests/plugins/test_plugin_manager.py index 7cae87d7f..98f179660 100644 --- a/conda-store-server/tests/plugins/test_plugin_manager.py +++ b/conda-store-server/tests/plugins/test_plugin_manager.py @@ -20,7 +20,7 @@ def test_get_lock_plugins(plugin_manager): lp = plugin_manager.get_lock_plugins() # Ensure built in lock plugins are accounted for - assert "lock-conda_lock" in lp + assert "conda-lock" in lp # Ensure all plugins are lock plugins for plugin in lp.values(): @@ -29,8 +29,8 @@ def test_get_lock_plugins(plugin_manager): def get_lock_plugin(plugin_manager): plugin_manager.collect_plugins() - lp = plugin_manager.lock_plugin("lock-conda_lock") - assert lp.name == "lock-conda_lock" + lp = plugin_manager.lock_plugin("conda-lock") + assert lp.name == "conda-lock" assert lp.backend == conda_lock.CondaLock diff --git a/conda-store-server/tests/test_app.py b/conda-store-server/tests/test_app.py index dab65225f..bdd6d1f2a 100644 --- a/conda-store-server/tests/test_app.py +++ b/conda-store-server/tests/test_app.py @@ -183,7 +183,7 @@ def test_conda_store_register_environment_duplicate_force_true(db, conda_store): def test_conda_store_get_lock_plugin(conda_store): - lock_plugin_setting = "lock-conda_lock" + lock_plugin_setting = "conda-lock" conda_store.lock_plugin_name = lock_plugin_setting name, plugin = conda_store.lock_plugin() assert name == lock_plugin_setting