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

kobotoolbox / kpi / 17841054955
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1257-remove-v1-forms-endpoint
DEFAULT BRANCH: master
Ran 18 Sep 2025 09:31PM UTC
Jobs 2
Files 666
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

18 Sep 2025 08:50PM UTC coverage: 81.43% (-0.05%) from 81.478%
17841054955

push

github

web-flow
feat(projectOwnership): store all transfer errors  (#6268)

### 📣 Summary
Retain all errors from transferring a project, displaying up to 100 in
Django admin.

### 📖 Description
When transferring a project, there may be any number of errors that
occur when handling individual files. Store individual errors for
individual files instead of just the broad 'Some attachments could not
be transferred' for easier debugging. These individual errors will be
displayed in Django admin.

### 👷 Description for instance maintainers
Adds a trivial migration (new table). Table may become very large if
there are lots of transfers with lots of errors.

### 💭 Notes
Creates a new model for storing all errors from a transfer since if we
are transferring a project with a lot of attachments and they all fail
we could end up with thousands of errors. We do want to track them all,
but not in one long string field, so we add the TransferStatusError
object. If there are more than a hundred errors, we don't want to
overwhelm the display in Django admin, so we just show the first 100 and
it will be up to a developer to look for the rest.

Additional updates:

Make the task to move media files more like the task to move attachments
by recording individual errors.

Updates the process to move files to reraise errors if requested instead
of just logging and swallowing them. This allows us to have more
specific error logs rather than just "Failed to move attachment."

Updates the save method on attachments to only update the user_id if
`update_fields=['user_id']` rather than going through all the
recalculation of hash and size. This prevents us from having duplicate
errors from trying to move and then save a busted file.

Record an error if we're trying to update the status of a TransferStatus
from 'success' to something else. This should never happen but we have
reason to believe there is a race condition that is making it happen.

### 👀 Preview steps
Make sure to restart the worker... (continued)

6485 of 10179 branches covered (63.71%)

21 of 60 new or added lines in 5 files covered. (35.0%)

2 existing lines in 2 files now uncovered.

24530 of 30124 relevant lines covered (81.43%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
95.05
1.08% kobo/apps/project_ownership/models/transfer.py
2
92.86
-1.64% kobo/apps/openrosa/apps/logger/models/attachment.py
2
73.17
2.9% kpi/fields/file.py
9
47.14
-6.08% kobo/apps/project_ownership/admin.py
25
74.67
-5.03% kobo/apps/project_ownership/utils.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
74.67
-5.03% kobo/apps/project_ownership/utils.py
1
73.17
2.9% kpi/fields/file.py
Jobs
ID Job ID Ran Files Coverage
1 17841054955.1 18 Sep 2025 09:31PM UTC 666
78.91
2 17841054955.2 18 Sep 2025 09:33PM UTC 666
81.41
Source Files on build 17841054955
  • Tree
  • List 666
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • d81cbf1a on github
  • Prev Build on release/2.025.34 (#17814481971)
  • Next Build on release/2.025.34 (#17926629572)
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