sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

project_exec API call does not respect timeout argument #4354

Closed DrXyzzy closed 1 week ago

DrXyzzy commented 4 years ago

Reported by Matthew Brett.

If project_exec is called on a project that is not running, the call usually fails within a few seconds, even if timeout is set much longer. For example, calling project_exec with this set of query parameters and the id of a stopped project:

{'id': 'c304d36a-4357-11ea-9869-003ee1c908a7', 'project_id': '...proj_id...', 'path': '', 'command': 'date', 'timeout': 60, 'args': [], 'bash': False, 'err_on_exit': False}

gives this response after a few seconds:

{'event': 'error', 'id': 'c304d36a-4357-11ea-9869-003ee1c908a7', 'error': 'no host'}
williamstein commented 4 years ago

I definitely agree this is a bug. This doesn't impact cocalc.com itself directly since I think none of our code uses this project_exec api endpoint anymore. However, it could definitely confuse or annoy api users...

williamstein commented 1 week ago

Very likely fixed by now, especially since @haraldschilly greatly enhanced this endpoint.