canonical / pebble

Take control of your internal daemons!
GNU General Public License v3.0
136 stars 51 forks source link

Ensure websocket endpoint times out if it's never going to happen #422

Open benhoyt opened 1 month ago

benhoyt commented 1 month ago

For the problem described at https://github.com/canonical/operator/issues/1246, this issue represents the Pebble side: we should fix the /v1/tasks/{task_id}/websocket/{websocket_id} endpoint so that if the Pebble side has already timed out ("timeout waiting for websocket connections"), we should time out (or cancel immediately) attempts to connect to that websocket URL.

Marking as Low Priority given the Ops-side fix at https://github.com/canonical/operator/pull/1247.