diff --git a/src/scheduler/main.py b/src/scheduler/main.py index 59d0626a2..202d353ba 100644 --- a/src/scheduler/main.py +++ b/src/scheduler/main.py @@ -137,7 +137,7 @@ def generate_external_plugins(plugins: List[Dict[str, Any]], *, original_path: U original_path.mkdir(parents=True, exist_ok=True) for plugin in plugins: try: - if not plugin["data"]: + if plugin["data"]: tmp_path = original_path.joinpath(plugin["id"], f"{plugin['name']}.tar.gz") tmp_path.parent.mkdir(parents=True, exist_ok=True) tmp_path.write_bytes(plugin["data"]) diff --git a/tests/SwarmTest.py b/tests/SwarmTest.py index 04ca4b451..2d6880a81 100644 --- a/tests/SwarmTest.py +++ b/tests/SwarmTest.py @@ -171,6 +171,21 @@ class SwarmTest(Test): sleep(1) i += 1 if not healthy: + proc = run( + 'docker stack services --format "{{ .Name }}" ' + self._name, + cwd="/tmp/swarm", + shell=True, + capture_output=True, + ) + for service in proc.stdout.decode().splitlines(): + proc2 = run( + 'docker service ps ' + service, + cwd="/tmp/swarm", + shell=True, + capture_output=True, + ) + log("SWARM", "❌", f"stdout logs = {proc2.stdout.decode()}") + log("SWARM", "❌", f"stderr logs = {proc2.stderr.decode()}") raise (Exception("swarm stack is not healthy")) except: log(