mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
fix: refresh repaired components and render Ubisoft Connect (#2090)
* fix: refresh repaired components and render Ubisoft Connect * fix: address component repair and Wine registry review * fix: repair manually enabled components and check registry writes * fix: serialize component repairs and use Proton runinprefix * fix: report queued component repair failures * fix: preserve newer component repair waits * Make component queue transitions atomic * Isolate component apply failures by game * Preserve pending repair when catalog is stale * Restore persisted component repair revisions * Update pending requirements atomically * Respect disabled pending components per game * Keep queue key state atomic while worker waits * Pass selected game to component repairs * Preserve pending repair when component is absent * Preserve pending revision on catalog failure * Test legacy pending repair revision recovery * Isolate fake worker Steam app info lookup * Merge queued Steam app info lookups * Persist launch component revisions before repair * Gate launch on component repair discovery * Expand and refresh launch repair discovery * Include new automatic picks in launch requirements * Log repair persistence failures and align repair keys * Use runtime key for Battle.net component repairs * Retain failed component reapplications for retry * Harden pending repairs and launch preparation * Isolate wait-cool sleep mocking * Allow launches without catalog when no repair is pending * Queue launch repairs even if persistence fails * Block launch when repair state cannot persist * Allow launch when no component repair is needed * Persist selected repairs when catalog is offline * Drain offline component repair in test
This commit is contained in:
1 parent
ab92033b90
commit
516e3862fa
14 files changed
+756
-83
No files matched your search
@@ -274,10 +274,13 @@ class PendingWaitTest(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
self.tmp.cleanup()
|
||||
|
||||
def install(self, cid):
|
||||
def install(self, cid, revision=0):
|
||||
folder = self.store / cid
|
||||
folder.mkdir(parents=True, exist_ok=True)
|
||||
(folder / "component.json").write_text(json.dumps({"id": cid, "overrides": []}))
|
||||
metadata = {"id": cid, "overrides": []}
|
||||
if revision is not None:
|
||||
metadata["revision"] = revision
|
||||
(folder / "component.json").write_text(json.dumps(metadata))
|
||||
|
||||
def clock(self):
|
||||
return len(self.slept) * 0.5
|
||||
@@ -296,6 +299,8 @@ class PendingWaitTest(unittest.TestCase):
|
||||
self.install("d3dx9")
|
||||
self.pending.write_text(json.dumps({"games": {"1262580": ["d3dx9"]}}))
|
||||
self.assertIsNone(self.wait())
|
||||
self.install("d3dx9", revision=None)
|
||||
self.assertIsNone(self.wait())
|
||||
self.assertEqual([], self.slept)
|
||||
|
||||
def test_waits_until_the_component_lands(self):
|
||||
@@ -311,6 +316,21 @@ class PendingWaitTest(unittest.TestCase):
|
||||
self.assertEqual(4, len(self.slept))
|
||||
self.assertEqual("wincomp: 1262580 launched without vcredist2019_dll (not ready)", note)
|
||||
|
||||
def test_an_existing_old_revision_waits_until_the_repair_lands(self):
|
||||
self.install("vcredist2010_dll", revision=0)
|
||||
self.pending.write_text(json.dumps({"games": {"1262580": ["vcredist2010_dll"]},
|
||||
"revisions": {"vcredist2010_dll": 1}}))
|
||||
note = self.wait(on_sleep=lambda n: self.install("vcredist2010_dll", revision=1) if n == 3 else None)
|
||||
self.assertEqual(3, len(self.slept))
|
||||
self.assertEqual(note, "wincomp: 1262580 waited 1500ms for vcredist2010_dll")
|
||||
|
||||
def test_an_old_revision_does_not_satisfy_a_pending_repair(self):
|
||||
self.install("vcredist2010_dll", revision=1)
|
||||
self.pending.write_text(json.dumps({"games": {"1262580": ["vcredist2010_dll"]},
|
||||
"revisions": {"vcredist2010_dll": 2}}))
|
||||
self.assertEqual(self.wait(timeout=1.0), "wincomp: 1262580 launched without vcredist2010_dll (not ready)")
|
||||
self.assertEqual(2, len(self.slept))
|
||||
|
||||
def test_a_damaged_pending_file_is_no_wait(self):
|
||||
self.pending.write_text("{not json")
|
||||
self.assertIsNone(self.wait())
|
||||
|
||||
Reference in new issue
Block a user