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

kobotoolbox / kpi / 38784352033
83%
master: 76%

Build:
Build:
LAST BUILD BRANCH: reorganize-constance-fieldsets
DEFAULT BRANCH: master
Ran 15 Oct 2026 06:22PM UTC
Jobs 10
Files 914
Run time 1min
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

15 Oct 2026 06:17PM UTC coverage: 83.126% (+0.04%) from 83.086%
38784352033

push

github

web-flow
fix(attachments)!: recount drifted storage counters DEV-3015 (#7696)

### 📣 Summary
Storage usage that drifted away from the files actually stored,
sometimes below zero, gets repaired.

### 📖 Description
#7680 stopped storage usage from drifting, but did not repair the
accounts where it had already drifted. Their projects are now recounted
from the files they actually hold, in the background, so their storage
usage matches what they really store again. Some accounts may then show
more storage than before, and others less.

### 👷 Description for instance maintainers
A new partial index on attachments lets the recount find the projects
that may have drifted quickly. With `SKIP_HEAVY_MIGRATIONS`, migration
`logger/0056` only prints the SQL to run by hand:

```sql
CREATE INDEX CONCURRENTLY "attach_inactive_xform_id_idx"
    ON "logger_attachment" ("xform_id")
    WHERE "delete_status" IS NOT NULL;
```

A new periodic task, `recount-drifted-storage-counters`, recounts these
projects in turns and starts over once done.

Storage recounts no longer suspend submissions. The
`fix-stale-submissions-suspended-flag` task, which unlocks accounts left
suspended (e.g. by a worker of the previous version stopped during the
deployment), now runs every 15 minutes on the low priority queue instead
of on Sunday nights only.

⚠️ **Known issues:** Submission suspensions can be lifted while
`populate_submission_counters` recalculates user's counters. This will
be fixed in another PR.

⚠️ **Breaking change**: in addition to what #7680 says about it,
`update_attachment_storage_bytes` is rewritten. It only recounts project
counters, from the attachments they actually hold, without suspending
submissions. `--sync`, `--no-lock` and `--chunks` are gone, and
`--force` now means "start over". Usage:
- `./manage.py update_attachment_storage_bytes`: recount the projects
that may have drifted (same selection as the task)
- `--username <username>`: recount every project of one user
- `-... (continued)

10369 of 13687 branches covered (75.76%)

136 of 142 new or added lines in 6 files covered. (95.77%)

6 existing lines in 2 files now uncovered.

33149 of 39878 relevant lines covered (83.13%)

5.51 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
0.0
0.0% kobo/apps/long_running_migrations/jobs/0027_backfill_remaining_root_uuid.py
2
64.0
64.0% kobo/apps/openrosa/apps/logger/tasks.py
1
88.89
34.89% kobo/apps/openrosa/apps/logger/utils/counters.py

Coverage Regressions

Lines Coverage ∆ File
5
54.38
1.57% kobo/apps/audit_log/models.py
1
0.0
0.0% kobo/apps/long_running_migrations/jobs/0027_backfill_remaining_root_uuid.py
Jobs
ID Job ID Ran Files Coverage
1 38784352033.1 15 Oct 2026 06:22PM UTC 909
52.69
2 38784352033.2 15 Oct 2026 06:22PM UTC 909
49.91
3 38784352033.3 15 Oct 2026 06:23PM UTC 909
43.68
4 38784352033.4 15 Oct 2026 06:24PM UTC 911
44.96
5 38784352033.5 15 Oct 2026 06:25PM UTC 911
53.93
6 38784352033.6 15 Oct 2026 06:25PM UTC 911
51.16
7 38784352033.7 15 Oct 2026 06:26PM UTC 909
58.39
8 38784352033.8 15 Oct 2026 06:26PM UTC 912
67.7
9 38784352033.9 15 Oct 2026 06:27PM UTC 911
59.47
10 38784352033.10 15 Oct 2026 06:29PM UTC 914
70.11
Source Files on build 38784352033
  • Tree
  • List 914
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 4fa2aaba on github
  • Prev Build on release/2.026.37 (#38752843126)
  • Next Build on release/2.026.37 (#38914364267)
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