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

kobotoolbox / kpi / 39919307690
57%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 23 Oct 2026 07:44AM UTC
Jobs 10
Files 930
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

23 Oct 2026 07:40AM UTC coverage: 83.56% (+0.05%) from 83.508%
39919307690

push

github

web-flow
feat(pagination): cap the submission count on the data endpoint DEV-2627 (#7708)

### 📣 Summary
Prepares faster data tables on very large projects: the server can stop
counting submissions past a set limit.

### 📖 Description
Before it shows a page of submissions, the server counts every
submission that matches. On very large projects, or when someone can
only see part of the data, that count can be slow, and when it ran too
long the request failed with an "Unsupported query" error.

The submission list can now count the same way as the other capped
lists: past a set limit it reports "many" instead of an exact number,
and if counting takes too long it reports "unknown" and still returns
the page. The limit is set far above the largest projects, so every
project keeps its exact count until the data screens can show "many".

### 💭 Notes
- **Needs #7715 (DEV-3116) merged first, or in the same release.** Some
of the largest projects on production already have more than a million
submissions, the old default limit, so they would get `"many"` right
away, and the data screens can't show it until DEV-2631, DEV-2632,
DEV-2633, DEV-2634 and DEV-2761 ship. #7715 raises
`API_LIMITED_COUNT_MAX` to 100,000,000, so it stays the single gate.
- Builds on #7703 (DEV-1314, now merged): uses its
`LimitedCountPagination`, `PeekNextPageMixin` and `API_LIMITED_COUNT_*`
settings.
- `MongoHelper._get_limited_count` calls `count_documents(limit=L+1)`,
which pymongo sends as `$match / $limit / $group`. Its `maxTimeMS` is
`API_LIMITED_COUNT_TIMEOUT`, or the usual query timeout when that is 0.
The web `maxTimeMS` (125 s) is longer than the 120 s uWSGI limit, so
without the dedicated timeout a slow count would never come back as
`"unknown"`.
- `next` comes from one extra row fetched with the page
(`DataPagination.paginate_queryset`, same peek as
`LimitedCountPagination`), with the count read from the view's
deployment. The paginator owns the window: the view fetches from
`get_offs... (continued)

10726 of 14056 branches covered (76.31%)

28 of 40 new or added lines in 4 files covered. (70.0%)

2811 existing lines in 79 files now uncovered.

34157 of 40877 relevant lines covered (83.56%)

5.51 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
28.48
-8.94% kpi/views/v2/data.py
2
52.97
9.59% kpi/renderers.py
2
70.37
3.54% kpi/utils/mongo_helper.py
1
81.05
48.48% kpi/paginators.py

Coverage Regressions

Lines Coverage ∆ File
312
0.0
-91.23% kobo/apps/openrosa/apps/viewer/pandas_mongo_bridge.py
282
45.68
-41.96% kobo/apps/openrosa/libs/utils/logger_tools.py
209
19.68
-56.33% kobo/apps/openrosa/libs/utils/export_tools.py
206
0.0
-86.19% kobo/apps/openrosa/libs/utils/briefcase_client.py
93
42.11
-48.95% kobo/apps/openrosa/apps/api/viewsets/xform_list_api.py
87
0.0
-87.88% kobo/apps/openrosa/libs/utils/backup_tools.py
70
37.04
-51.85% kobo/apps/openrosa/apps/logger/utils/counters.py
66
33.33
-59.46% kobo/apps/openrosa/apps/viewer/views.py
64
0.0
-64.0% kobo/apps/openrosa/apps/logger/tasks.py
63
33.96
-59.43% kobo/apps/openrosa/apps/api/viewsets/briefcase_api.py
59
48.31
-50.0% kobo/apps/openrosa/apps/api/viewsets/xform_submission_api.py
58
0.0
-90.63% kobo/apps/openrosa/libs/data/query.py
52
57.0
-2.0% kpi/utils/xml.py
51
23.66
-38.93% kobo/apps/openrosa/apps/logger/utils/instance.py
49
28.57
-43.75% kobo/apps/openrosa/apps/logger/views.py
45
54.03
-36.29% kobo/apps/openrosa/apps/logger/signals.py
45
44.3
4.65% kpi/deployment_backends/openrosa_backend.py
43
46.1
-15.99% kobo/apps/openrosa/apps/viewer/models/data_dictionary.py
41
40.48
-24.4% kobo/apps/openrosa/apps/main/models/meta_data.py
40
0.0
-40.82% kobo/apps/openrosa/apps/viewer/xls_writer.py
40
23.29
-54.79% kobo/apps/openrosa/libs/utils/image_tools.py
38
24.14
-32.76% kobo/apps/openrosa/apps/viewer/tasks.py
37
51.22
-45.12% kobo/apps/openrosa/libs/serializers/xform_serializer.py
36
24.49
-73.47% kobo/apps/openrosa/apps/logger/import_tools.py
34
47.87
1.57% kobo/apps/audit_log/models.py
34
56.67
-37.78% kobo/apps/openrosa/libs/renderers/renderers.py
33
57.26
-26.61% kobo/apps/openrosa/apps/logger/models/attachment.py
33
49.02
-32.35% kobo/apps/openrosa/apps/viewer/models/export.py
32
58.33
-13.33% kobo/apps/openrosa/apps/viewer/models/parsed_instance.py
31
78.05
-10.8% kobo/apps/openrosa/apps/logger/xform_instance_parser.py
30
0.0
-75.0% kobo/apps/openrosa/apps/django_digest_backends/cache.py
29
28.48
-8.94% kpi/views/v2/data.py
27
34.0
-54.0% kobo/apps/data_collectors/authentication.py
27
62.73
-2.73% kpi/permissions.py
26
27.78
-72.22% kobo/apps/openrosa/libs/utils/decorators.py
24
72.04
-11.37% kobo/apps/openrosa/apps/logger/models/xform.py
24
29.67
-26.37% kobo/apps/openrosa/libs/utils/user_auth.py
24
32.88
-16.44% kobo/apps/openrosa/libs/utils/viewer_tools.py
21
55.0
-15.83% kobo/apps/openrosa/libs/utils/middleware.py
20
43.9
-48.78% kobo/apps/openrosa/libs/filters.py
17
16.22
-45.95% kobo/apps/openrosa/apps/logger/utils/database_query.py
17
41.94
-54.84% kobo/apps/openrosa/libs/authentication.py
15
20.0
-60.0% kobo/apps/openrosa/apps/api/utils/xml.py
15
31.71
-36.59% kobo/apps/openrosa/apps/logger/xform_fs.py
15
70.37
3.54% kpi/utils/mongo_helper.py
15
64.76
-7.62% kpi/utils/object_permission.py
14
75.38
-7.18% kobo/apps/openrosa/apps/logger/models/instance.py
14
44.0
-56.0% kobo/apps/openrosa/libs/utils/model_tools.py
13
52.56
-15.38% kpi/authentication.py
11
63.57
3.57% kobo/apps/audit_log/signals.py
11
45.16
-17.74% kpi/views/v2/attachment.py
10
30.12
-6.02% kpi/utils/storage.py
9
41.18
-52.94% kpi/utils/viewset_mixins.py
7
30.56
-6.48% kobo/apps/openrosa/apps/api/tools.py
7
41.67
-58.33% kobo/apps/openrosa/apps/logger/utils/attachment.py
7
31.25
-43.75% kobo/apps/openrosa/libs/utils/string.py
7
66.35
12.24% kpi/deployment_backends/base_backend.py
6
83.05
-10.17% kobo/apps/openrosa/apps/logger/exceptions.py
6
69.57
-26.09% kobo/apps/openrosa/libs/permissions.py
5
33.1
-3.52% kobo/apps/mass_emails/user_queries.py
5
72.22
-27.78% kobo/apps/openrosa/apps/logger/models/daily_xform_submission_counter.py
5
75.0
-25.0% kobo/apps/openrosa/apps/logger/models/monthly_xform_submission_counter.py
5
0.0
-38.46% kobo/apps/openrosa/apps/main/context_processors.py
5
66.67
-33.33% kobo/apps/openrosa/apps/viewer/signals.py
5
50.0
-50.0% kobo/apps/openrosa/libs/mixins/openrosa_headers_mixin.py
5
40.0
-50.0% kpi/utils/fuzzy_int.py
4
45.45
-36.36% kobo/apps/openrosa/koboform/__init__.py
4
0.0
-100.0% kobo/apps/openrosa/libs/utils/storage.py
3
60.0
-30.0% kobo/apps/openrosa/libs/serializers/data_serializer.py
3
60.0
-30.0% kpi/mixins/mfa.py
2
83.33
0.0% kobo/urls.py
2
52.97
9.59% kpi/renderers.py
1
78.57
44.05% kobo/apps/audit_log/base_views.py
1
75.0
-25.0% kobo/apps/audit_log/mixins.py
1
92.86
32.14% kobo/apps/audit_log/utils.py
1
96.67
-3.33% kpi/fields/kpi_uid.py
1
91.48
29.98% kpi/models/asset.py
1
94.12
24.12% kpi/utils/django_orm_helper.py
1
75.0
-6.25% kpi/utils/drf_exceptions.py
Jobs
ID Job ID Ran Files Coverage
1 39919307690.1 23 Oct 2026 07:44AM UTC 925
52.85
2 39919307690.2 23 Oct 2026 07:45AM UTC 927
50.47
3 39919307690.3 23 Oct 2026 07:45AM UTC 925
43.47
4 39919307690.4 23 Oct 2026 07:46AM UTC 925
58.31
5 39919307690.5 23 Oct 2026 07:46AM UTC 927
54.07
6 39919307690.6 23 Oct 2026 07:46AM UTC 927
44.73
7 39919307690.7 23 Oct 2026 07:48AM UTC 927
59.37
8 39919307690.8 23 Oct 2026 07:50AM UTC 928
68.67
9 39919307690.9 23 Oct 2026 07:51AM UTC 930
71.08
10 39919307690.10 23 Oct 2026 08:29AM UTC 925
49.23
Source Files on build 39919307690
  • Tree
  • List 930
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 9977690b on github
  • Prev Build on main (#39915801072)
  • Next Build on main (#39922915296)
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