feat: release 1.4.0 with isolated upgrades and device discovery
This commit is contained in:
1 parent
a6a3ee2eb0
commit
df66897ff4
41 files changed
+1564
-126
No files matched your search
@@ -21,6 +21,7 @@ import time
|
||||
from typing import Any
|
||||
|
||||
from artemis.core.diagnostics.adb_server_connection import adb_server_connection
|
||||
from artemis.runtime.adb_discovery import adb_device_discovery
|
||||
from artemis.core.diagnostics.probes.adb_probe import AdbDeviceProbe
|
||||
from artemis.core.diagnostics.probes.base import BaseProbe
|
||||
from artemis.core.diagnostics.probes.credentials_probe import (
|
||||
@@ -353,7 +354,12 @@ class ReadinessEngine:
|
||||
}
|
||||
|
||||
logger.info("[ReadinessEngine] Restarting ADB server...")
|
||||
return await asyncio.to_thread(_restart_sync)
|
||||
result = await asyncio.to_thread(_restart_sync)
|
||||
if result.get("success"):
|
||||
result["automatic_connections"] = await asyncio.to_thread(
|
||||
adb_device_discovery.refresh, adb_path, force=True
|
||||
)
|
||||
return result
|
||||
|
||||
async def launch_emulator(self, avd_name: str) -> dict[str, Any]:
|
||||
"""Launch an Android emulator by AVD name in the background and track its lifecycle."""
|
||||
@@ -417,8 +423,10 @@ class ReadinessEngine:
|
||||
)
|
||||
output = (res.stdout + "\n" + res.stderr).strip()
|
||||
success = "connected to" in output.lower() and "failed" not in output.lower()
|
||||
remembered = adb_device_discovery.remember(target) if success else False
|
||||
return {
|
||||
"success": success,
|
||||
"remembered": remembered,
|
||||
"target": target,
|
||||
"output": output,
|
||||
"message": f"Connected to {target}" if success else output,
|
||||
|
||||
@@ -33,6 +33,7 @@ from artemis.core.diagnostics.schema import (
|
||||
)
|
||||
from artemis.platform import OSType, platform
|
||||
from artemis.toolchain import toolchain
|
||||
from artemis.runtime.adb_discovery import adb_device_discovery
|
||||
from artemis.utils.logger import get_logger
|
||||
|
||||
logger = get_logger(__name__)
|
||||
@@ -477,6 +478,7 @@ class AdbDeviceProbe(BaseProbe):
|
||||
async def _parse_adb_devices(self, adb_path: str) -> list[DeviceInfo]:
|
||||
"""Execute `adb devices -l` and extract structured device metadata."""
|
||||
devices: list[DeviceInfo] = []
|
||||
await asyncio.to_thread(adb_device_discovery.refresh, adb_path)
|
||||
try:
|
||||
proc = await asyncio.create_subprocess_exec(
|
||||
adb_path,
|
||||
@@ -668,6 +670,7 @@ class AdbDeviceProbe(BaseProbe):
|
||||
"installed": True,
|
||||
"adb_path": adb_path,
|
||||
"adb_version": adb_ver,
|
||||
"automatic_connections": adb_device_discovery.results.copy(),
|
||||
"adb_keys": key_status.to_dict(),
|
||||
"emulator_path": emulator_path,
|
||||
"is_emulator_in_path": is_emu_in_path,
|
||||
|
||||
Reference in new issue
Block a user