Commit Graph
17 Commits
Author SHA1 Message Date
YueGuobin 8c98142d26 feat: report Docker pull progress and add an idle timeout
A pull now reports docker.image.pull notifications on the controller
stream: started, throttled downloading events with the layer counts
and the latest daemon message, then completed or failed. An optional
progress_id is echoed in every event so a client can correlate them
with its own request. Image operations belong to a compute, not to a
project, so the events go to the controller stream and reach clients
that have no project open.

The pull also has an idle socket read timeout of 60 seconds. Without
it an unreachable registry left the pull, the compute request and the
client request hanging forever with no feedback at all. The timeout
is idle time, not total time: the daemon streams progress during the
whole pull, so a minute without data means the registry is gone. When
it fires, the daemon connection closes and Docker cancels the pull.

Docker.http_query now accepts an aiohttp ClientTimeout object so a
caller can ask for a policy finer than a total timeout.
2026-11-06 15:03:34 +08:00
Mark Paronyan 6d16d923c7 style: sort imports in compute and controller tests 2026-10-02 12:43:26 +03:00
Mark Paronyan a0450b6bce refactor: ruff autofixes 2026-09-27 15:55:10 +03:00
YueGuobin 2ac0bb7d25 marker: route marker.match to a dedicated project WS channel
High-frequency marker.matches shared the single project notification queue with topology events (node.*/link.*), causing head-of-line blocking. Add a separate marker channel: Notification.project_marker_queue/marker_emit, dispatch routes marker.* off the main project queue, plus a new WS /{project_id}/notifications/markers/ws endpoint. Fully migrated (the main project WS no longer carries marker.match); marker listeners are independent of project auto_close. Compute side unchanged.
2026-08-11 11:19:56 +08:00
grossmj 86c44cd6e7 Upgrade dev dependencies and fix tests to support pytest-asyncio strict mode 2022-08-24 21:03:16 +02:00
grossmj cefab8d362 Rename __json__() to asdict() 2021-04-17 23:34:28 +09:30
grossmj eb3cb8a41f Migration to FastAPI 2020-10-02 16:07:50 +09:30
grossmj d3ea67da24 Refactor tests
* Use pytest-aiohttp
* Use the async def / await syntax.
* Fix tests to run with Python 3.8
2020-06-16 13:59:03 +09:30
grossmj 135d56371d Fix tests for project notifications. 2019-02-23 23:20:11 +07:00
grossmj 7f72b90b0e The server has now 2 notification streams
* A new one for controller related events (compute, appliance templates etc.)
* The existing one for project related events (links, nodes etc.)
2018-08-16 21:31:57 +07:00
Julien Duponchelle 875051d05e Prevent capture on non running node
Fix https://github.com/GNS3/gns3-gui/issues/1656
2016-11-22 16:05:57 +01:00
Julien Duponchelle b5cb625169 Rebuild doc 2016-07-14 15:33:09 +02:00
Julien Duponchelle 91ec61b88d Check topology schema when loading/saving it
Fix #583
2016-07-11 15:36:52 +02:00
Julien Duponchelle 758a427a76 Add documentation about notifications 2016-06-30 11:08:01 +02:00
grossmj 2bde02d459 Controller side unique node name allocation. Ref #541. 2016-06-11 17:31:30 -06:00
Julien Duponchelle fa0af7f4a2 Correctly process node.updated event on controller 2016-05-18 16:12:57 +02:00
Julien Duponchelle 694e1a2e68 Extract the notification part of controller to a dedicated class 2016-05-18 14:56:23 +02:00