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

kobotoolbox / kpi / 19069200475
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1266-remove-kpi-v1-endpoints
DEFAULT BRANCH: master
Ran 04 Nov 2025 01:24PM UTC
Jobs 2
Files 878
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

04 Nov 2025 12:49PM UTC coverage: 81.304% (-0.01%) from 81.318%
19069200475

push

github

web-flow
fix(versions): convert version removal celery task to migration DEV-1227 (#6442)

### 💭 Notes
Backport of https://github.com/kobotoolbox/kpi/pull/6434
Converts the remove_all_versions celery task (which accidentally had a
time limit of 30 seconds) to a long-running migration to be in keeping
with the rest of the long-running works.


### 👀 Preview steps

1. Run migrations
2. If empty, populate the Version table with
```
for i in range(100): 
     Revision.objects.create(date_created=timezone.now())
     Version.objects.create(revision_id=i, content_type_id=21)
```
3. Update `VERSION_DELETION_BATCH_SIZE` to 5
4. Restart the kpi_worker
5. Wait for the long-running migrations job to run
6. 🟢 The number of objects in the version table is decreased
7. 🟢 There are logs in the kpi_worker showing how many versions are
deleted with each run

7087 of 11138 branches covered (63.63%)

0 of 11 new or added lines in 1 file covered. (0.0%)

27380 of 33676 relevant lines covered (81.3%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
11
0.0
kobo/apps/long_running_migrations/jobs/0012_remove_old_versions.py
Jobs
ID Job ID Ran Files Coverage
1 19069200475.1 04 Nov 2025 01:24PM UTC 876
78.92
2 19069200475.2 04 Nov 2025 01:27PM UTC 878
81.27
Source Files on build 19069200475
  • Tree
  • List 878
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 771ca848 on github
  • Prev Build on release/2.025.43 (#19040615393)
  • Next Build on release/2.025.43 (#19113934668)
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

© 2026 Coveralls, Inc