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

kobotoolbox / kpi / 30269082240
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-2566-reduce-refresh-frequency-and-harden-reliability-of-the-billingusage
DEFAULT BRANCH: master
Ran 27 Jul 2026 01:15PM UTC
Jobs 10
Files 895
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

27 Jul 2026 01:10PM UTC coverage: 80.925% (-0.9%) from 81.825%
30269082240

push

github

web-flow
fix(longRunningMigrations): persist LRM 0027/0028 cursor DEV-2427 (#7312)

### 📣 Summary

Fixed a background data-repair job that could stall without making
progress after a restart.

### 📖 Description

Two background migration jobs (LRM 0027 and 0028) backfill a stable
identifier (`root_uuid`) for old submissions. They kept track of how far
they'd gotten with an in-memory position that reset to the very
beginning every time the job restarted, so a restart could waste a lot
of time re-checking records it had already confirmed didn't need any
work, instead of making forward progress. This position is now saved
outside the job, so a restart picks up where it left off.

### 💭 Notes

Root cause: `last_xform_id` (0027) and `last_id` (0028) were plain local
variables. Submissions belonging to XForms these jobs permanently skip
(`pending_delete`, or tagged `kobo-root-uuid-failed-0027`) never get a
`root_uuid`/`meta/rootUuid`, so they always match the "still needs
backfill" query — every restart re-scanned past the same
permanently-skipped records before reaching new work, which could
prevent either job from ever completing a full pass in practice.

Both cursors are now persisted in Redis (`cache`, no TTL, cleared on
natural completion). For 0027, the cursor only advances once every XForm
in the current batch has reached a terminal outcome, so a crash
mid-batch re-processes that small batch on restart instead of
permanently skipping whatever wasn't finished. For 0028, the cursor
advances right after each batch is processed, same as before.

Also excludes trashed XForms from LRM 0028's Postgres lookup
(`xform__pending_delete=False`), for symmetry with LRM 0027's own
exclusion.

9319 of 12762 branches covered (73.02%)

0 of 13 new or added lines in 2 files covered. (0.0%)

142 existing lines in 17 files now uncovered.

30333 of 37483 relevant lines covered (80.92%)

5.52 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
0.0
0.0% kobo/apps/long_running_migrations/jobs/0027_backfill_remaining_root_uuid.py
5
0.0
0.0% kobo/apps/long_running_migrations/jobs/0028_sync_mongo_root_uuid.py

Coverage Regressions

Lines Coverage ∆ File
26
77.37
-13.68% kobo/apps/openrosa/apps/api/viewsets/xform_list_api.py
22
44.0
-44.0% kobo/apps/data_collectors/authentication.py
22
79.66
-18.64% kobo/apps/openrosa/apps/api/viewsets/xform_submission_api.py
20
52.38
-31.75% hub/models/extra_user_detail.py
10
40.0
-40.0% kobo/apps/openrosa/apps/api/utils/xml.py
7
83.42
-1.26% kobo/apps/openrosa/libs/utils/logger_tools.py
6
89.02
-7.32% kobo/apps/openrosa/libs/serializers/xform_serializer.py
6
37.5
-37.5% kobo/apps/openrosa/libs/utils/string.py
5
53.33
-1.15% kobo/apps/audit_log/models.py
5
89.41
-5.88% kobo/apps/openrosa/libs/renderers/renderers.py
3
67.5
-7.5% kobo/apps/openrosa/apps/django_digest_backends/cache.py
2
0.0
0.0% kobo/apps/long_running_migrations/jobs/0028_sync_mongo_root_uuid.py
2
81.54
-1.03% kobo/apps/openrosa/apps/logger/models/instance.py
2
87.8
-4.88% kobo/apps/openrosa/libs/filters.py
2
64.21
-2.11% kobo/apps/openrosa/libs/utils/middleware.py
1
92.52
-0.93% kobo/apps/openrosa/apps/api/viewsets/briefcase_api.py
1
87.11
-0.39% kobo/apps/openrosa/apps/logger/xform_instance_parser.py
Jobs
ID Job ID Ran Files Coverage
1 30269082240.1 27 Jul 2026 01:15PM UTC 891
49.4
2 30269082240.2 27 Jul 2026 01:16PM UTC 891
52.85
3 30269082240.3 27 Jul 2026 01:16PM UTC 891
44.28
4 30269082240.4 27 Jul 2026 01:17PM UTC 893
45.63
5 30269082240.5 27 Jul 2026 01:19PM UTC 893
67.21
6 30269082240.6 27 Jul 2026 01:19PM UTC 893
50.73
7 30269082240.7 27 Jul 2026 01:20PM UTC 891
59.05
8 30269082240.8 27 Jul 2026 01:20PM UTC 893
54.1
9 30269082240.9 27 Jul 2026 01:20PM UTC 893
60.2
10 30269082240.10 27 Jul 2026 01:22PM UTC 895
69.47
Source Files on build 30269082240
  • Tree
  • List 895
  • Changed 25
  • Source Changed 0
  • Coverage Changed 25
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 63eb2fe8 on github
  • Prev Build on release/2.026.30 (#30119744135)
  • Next Build on release/2.026.30 (#30270500673)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc