• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 18758367484
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 23 Oct 2025 07:05PM UTC
Jobs 2
Files 861
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Oct 2025 06:33PM UTC coverage: 81.138%. Remained the same
18758367484

push

github

web-flow
fix(docker): start `runserver_plus` as non-root; assign filesystem permissions early DEV-1192 (#6404)

### 💭 Notes

Fix discrepancy between `python manage.py runserver_plus` running as
`root` (in development mode only) while Celery workers ran as user
`kobo`. Reorder commands in the Docker `entrypoint.sh` script so that
filesystem permission assignments happen as early as possible, to reduce
the time other containers spend in restart loops while they cannot write
to logs etc.

### 👀 Preview steps

:warning: The reviewer should read the entirety of `entrypoint.sh` and
look for unforeseen consequences from moving permission assignment
commands to the top of the file.

Basic testing:

1. Use base branch (`release/2.025.37`)
2. Start from a completely fresh installation, or at least entirely
remove `kobo-docker/.vols/kobocat_media_uploads`
3. Bring up an instance using `kobo-install`'s developer mode
4. Notice that `python manage.py runserver_plus` runs as root in the
`kpi` container
5. Bonus: try to create a project with form media
1. See that `kobo-docker/.vols/kobocat_media_uploads/<username>` is
owned by `root`
2. See that `PermissionError: [Errno 13] Permission denied:
'/srv/src/kobocat/media/<username>/form-media'` is written to
`celery.log`
[(xref)](https://linear.app/kobotoolbox/issue/DEV-1189/in-kobo-install-form-media-files-are-not-syncing-on-deployment)
6. Check out this PR's branch `start-runserver-as-non-root`
7. See that `python manage.py runserver_plus` runs as `kobo` in the
`kpi` container
8. Bonus: remove `kobo-docker/.vols/kobocat_media_uploads/<username>`
and try the form media file again. If you do not remove it,
`runserver_plus` will fail to access it and cause a 500 error on
(re)deployment

6928 of 10934 branches covered (63.36%)

26735 of 32950 relevant lines covered (81.14%)

1.6 hits per line

Jobs
ID Job ID Ran Files Coverage
1 18758367484.1 23 Oct 2025 07:05PM UTC 861
78.83
2 18758367484.2 23 Oct 2025 07:09PM UTC 861
81.12
Source Files on build 18758367484
  • Tree
  • List 861
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • d7bff46b on github
  • Prev Build on release/2.025.37 (#18757093672)
  • Next Build on release/2.025.37 (#18758401217)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc