feat(update): integrate managed installs and recoverable in-app updates (#6168)
Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback. Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers. This code integration does not publish packages, enable signing or advance the public update channel. Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
This commit is contained in:
1 parent
76da55994b
commit
fbb61a373f
216 files changed
+27948
-1084
No files matched your search
@@ -8,6 +8,7 @@ import sys
|
||||
import time
|
||||
from contextlib import suppress
|
||||
from pathlib import Path
|
||||
from unittest.mock import Mock
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -122,6 +123,20 @@ async def _pid_stopped(pid: int, *, timeout: float = 6) -> None:
|
||||
assert not _pid_running(pid), f"subprocess {pid} is still running after {timeout}s"
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform != "linux", reason="Linux /proc process probe")
|
||||
@pytest.mark.parametrize("disappeared", [FileNotFoundError, ProcessLookupError])
|
||||
async def test_pid_stopped_tolerates_exit_during_proc_read(monkeypatch, disappeared):
|
||||
stat = Mock()
|
||||
stat.exists.return_value = True
|
||||
stat.read_text.side_effect = disappeared("process exited during stat read")
|
||||
monkeypatch.setattr(sys.modules[__name__], "Path", Mock(return_value=stat))
|
||||
monkeypatch.setattr(os, "kill", Mock(side_effect=[None, ProcessLookupError, ProcessLookupError]))
|
||||
|
||||
await _pid_stopped(123, timeout=1)
|
||||
|
||||
stat.read_text.assert_called_once()
|
||||
|
||||
|
||||
async def _cleanup_pidfiles(*paths: Path) -> None:
|
||||
pids = [int(path.read_text()) for path in paths if path.exists() and path.read_text()]
|
||||
for pid in pids:
|
||||
|
||||
Reference in new issue
Block a user