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

kobotoolbox / kpi / 17443910075
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1257-remove-v1-forms-endpoint
DEFAULT BRANCH: master
Ran 03 Sep 2025 07:58PM UTC
Jobs 2
Files 863
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

03 Sep 2025 07:24PM UTC coverage: 81.118% (+0.02%) from 81.095%
17443910075

push

github

web-flow
feat(dataCollectors): utilities for creating enketo links DEV-798 (#6196)

### 💭 Notes
Developer-only changes. Creates the utils we will use to create the
correct enketo links for data collectors, separated out into its own PR
for easier reviewing. The actual processes that call these utils will be
updated in separate PRs.
We are replacing the default 8-char enketo_ids with longer hashes for
more security around data-collector endpoints since they do not require
login. The new ids are only 31 characters long because 32 characters
causes enketo to 404.

There is a quirk mentioned in
https://chat.kobotoolbox.org/#narrow/stream/4-Kobo-Dev/topic/DEV-798.20creating.20enketo.20links/near/684244
that is not handled in this PR because it didn't seem to affect the
functionality. It should probably be handled so we don't end up with
cruft in redis but I think it can be done separately.

### 👀 Preview steps

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 `hget "or:<kobo_url>/key/token_a" "uid_0"` and make
note of the 31-char hash you get back
4. In a browser, navigate to <enketo_url>/x/<hash>
5. 🟢 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
6. Repeat steps 3-5 with "uid_1" 
7. In the django shell, run
`rename_data_collector_enketo_links('token_a', 'token_b')`
8. Navigate to the same urls you used in enketo earlier (using the 31
char hashes)
9. 🟢 You should get a response `Request to
http://kf.kobo.local:8080/key/token_b/formList?formID=uid_0 failed.`
(note the changed token)
10. In the django shell, run
`remove_data_collector_enketo_links('token_b', ['uid_1'])`
11. Navigate to the enketo url you used for `uid_1`
12. 🟢 You should get a response `Survey with this ID not found` (because
the entr... (continued)

6925 of 10921 branches covered (63.41%)

51 of 57 new or added lines in 4 files covered. (89.47%)

1 existing line in 1 file now uncovered.

26691 of 32904 relevant lines covered (81.12%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
75.04
0.04% kpi/deployment_backends/openrosa_backend.py
1
75.0
kpi/deployment_backends/openrosa_utils.py
4
91.84
kobo/apps/data_collectors/utils.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
75.04
0.04% kpi/deployment_backends/openrosa_backend.py
Jobs
ID Job ID Ran Files Coverage
1 17443910075.1 03 Sep 2025 07:58PM UTC 863
78.8
2 17443910075.2 03 Sep 2025 08:02PM UTC 863
81.1
Source Files on build 17443910075
  • Tree
  • List 863
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • fda3dbc9 on github
  • Prev Build on main (#17443594338)
  • Next Build on main (#17457203670)
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