opensafely-core / opensafely-core/opensafely-cli

Investigate suspend and resume behaviour

Open
#377 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2
Forks
5
Avg merge
2d 1h
Merged PRs (30d)
4

Description

Various users have reported that if you suspend and resume during an opensafely run invocation, then it doesn't come back properly.

Running locally, some times jobs hang and the run needs to be killed and restarted (the UX of which is exacerbated by poor cli ux for selecting which actions to run wrt forcing re-runs). This has been observed on Macs, and a quick search shows some users reporting issues like this (e.g. docker cp hanging, which we've observed before in Docker for Windows).

We should investigate the behavour of sleep/wake on running docker containers on Macos and Windows, and understand the failure cases.

We maybe be able to make changes to opensafely run that detect and handle these failures more robustly, allowing users to suspend without issue.

This might also be related to how opensafely runs in codespaces. Ideally, users should be able to leave opensafely run command executing, and the codespace would keep running, and not suspend. However users report the current behaviour is not that, which leads to some of them being able to use codespaces for this.

We may also want to look at improving detection of a codespace being restarted in the middle of a run, and handle that more gracefully.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing suspend and resume during an opensafely run invocation with Docker on macOS and Windows, recording when jobs hang or docker cp stalls. Then compare Codespaces suspension and restart behaviour; done means the failure cases and the required handling or detection changes are clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, github, python
Domain
cli, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.