opensafely-core / opensafely-core/opencodelists
Consider handling `db.sqlite3` failure cases better in `build-dbs-for-local-development`
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 60
- Forks
- 16
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 17
Description
I was trying this out today and noticed:
- it absolutely requires that a
db.sqlite3exists before running- you have to
touch db.sqlite3if it doesn't exist - if the command subsequently fails, you have to
touch db.sqlite3again, because the empty file you create then ends up asdb.sqlite3.backup
- you have to
- if you do have an existing
db.sqlite3.backup, it overwrites this without prompting- failing loudly if the backup exists already is one option
- another option might be creating a file with a unique suffix to avoid overwriting the existing file
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the build-dbs-for-local-development entry point and reproduce the missing db.sqlite3 and existing db.sqlite3.backup cases described in the issue. Done means the command handles failures without requiring repeated manual file creation and does not silently overwrite an existing backup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100