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

kobotoolbox / kpi / 17764863374
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1497-show-most-recently-created-qual-answer
DEFAULT BRANCH: master
Ran 16 Sep 2025 12:26PM UTC
Jobs 2
Files 861
Run time 3min
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

16 Sep 2025 11:53AM UTC coverage: 81.248% (+0.008%) from 81.24%
17764863374

push

github

web-flow
fix(dataCollectors): set correct redis entries DEV-798 (#6228)

### 💭 Notes
Fixes a mistake in how we were manipulating enketo-generated redis
entries for data collectors. When we POST to <enketo>/surveys/all, it
generates a simple string redis entry for the key `or:<url>,<xform_id>`,
NOT a hash at the key `or:<url>` that has a field called `xform_id.` We
were actually creating a new entry with the new longer url hash key
instead of updating the one that enketo creates.


### 👀 Preview steps
This is basically a regression test except using the correct redis keys.
If you've been testing other PRs for this project, it's a good idea to
clean out your redis entries first and start fresh. At least delete any
keys starting with "or:http".

1. Open a django shell and a redis-cli
2. In the django shell, run `set_data_collector_enketo_links('token_a',
['uid_0', 'uid_1'])`
3. 🟢 In redis run `keys "or:http*"`. The result should be empty. 
4. In redis, run `get "or:<kobo_url>/key/token_a,uid_0"` and make note
of the 31-char hash you get back
5. In a browser, navigate to <enketo_url>/x/<31-char hash>
6. 🟢 You should get a response Request to
http://kf.kobo.local:8080/key/token_a/formList?formID=uid_0 failed. This
means it generated the correct request, but we haven't set up
authentication yet so we expect it to fail
7. Repeat steps 3-5 with "uid_1"
8. In the django shell, run
`rename_data_collector_enketo_links('token_a', 'token_b')`
9. Navigate to the same urls you used in enketo earlier (using the 31
char hashes)
10. 🟢 You should get a response Request to
http://kf.kobo.local:8080/key/token_b/formList?formID=uid_0 failed.
(note the changed token)
11. In the django shell, run
`remove_data_collector_enketo_links('token_b', ['uid_1'])`
12. Navigate to the enketo url you used for uid_1
13. 🟢 You should get a response Survey with this ID not found (because
the entry in redis for this token/asset has been removed)
14. In the django shell, run
`remove_data_collector_en... (continued)

6887 of 10852 branches covered (63.46%)

45 of 48 new or added lines in 1 file covered. (93.75%)

763 existing lines in 29 files now uncovered.

26646 of 32796 relevant lines covered (81.25%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
91.78
-0.06% kobo/apps/data_collectors/utils.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
91.78
-0.06% kobo/apps/data_collectors/utils.py
1
87.32
-1.41% kobo/apps/organizations/admin/organization.py
1
85.0
-5.0% kpi/urls/__init__.py
1
93.62
-2.13% kpi/utils/django_orm_helper.py
2
93.53
-1.0% kobo/apps/mass_emails/tasks.py
3
63.64
-27.27% kobo/apps/accounts/utils.py
3
82.42
-1.82% kobo/apps/organizations/models.py
3
86.67
-10.0% kobo/apps/organizations/utils.py
3
90.52
-2.59% kpi/views/environment.py
4
83.33
-8.33% kobo/apps/accounts/mfa/models.py
7
0.0
-100.0% kobo/apps/stripe/apps.py
8
0.0
-100.0% kobo/apps/stripe/urls.py
10
83.33
-11.11% kobo/apps/subsequences/api_view.py
12
35.0
-60.0% kobo/apps/stripe/utils/import_management.py
12
0.0
-75.0% kobo/apps/stripe/utils/view_utils.py
14
86.07
-2.71% kobo/apps/openrosa/libs/utils/logger_tools.py
15
0.0
-100.0% kobo/apps/stripe/tasks.py
19
0.0
-65.52% kobo/apps/stripe/admin.py
23
0.0
-92.0% kobo/apps/stripe/signals.py
24
75.49
-23.53% kpi/utils/usage_calculator.py
25
47.89
-35.21% kobo/apps/mass_emails/user_queries.py
26
27.78
-72.22% kobo/apps/stripe/utils/limit_enforcement.py
27
57.97
-39.13% kobo/apps/trackers/utils.py
40
42.5
-50.0% kobo/apps/trash_bin/tasks/attachment.py
64
0.0
-98.46% kobo/apps/stripe/serializers.py
64
21.43
-76.19% kobo/apps/stripe/utils/billing_dates.py
86
26.5
-73.5% kobo/apps/stripe/utils/subscription_limits.py
111
0.0
-90.98% kobo/apps/stripe/models.py
154
0.0
-95.65% kobo/apps/stripe/views.py
Jobs
ID Job ID Ran Files Coverage
1 17764863374.1 16 Sep 2025 12:26PM UTC 861
78.92
2 17764863374.2 16 Sep 2025 12:28PM UTC 861
81.23
Source Files on build 17764863374
  • Tree
  • List 861
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 5d356123 on github
  • Prev Build on main (#17764845739)
  • Next Build on main (#17764845739)
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