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

kobotoolbox / kpi / 17068851867
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1475-clean-up-refactor-subsequences
DEFAULT BRANCH: master
Ran 19 Aug 2025 12:38PM UTC
Jobs 1
Files 642
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

19 Aug 2025 11:59AM UTC coverage: 80.974% (-0.007%) from 80.981%
17068851867

push

github

web-flow
feat(projectOwnership): add management command for retrying attachment transfers DEV-842 (#6121)

### đŸ“Ŗ Summary
Add a process for retrying the transfer of attachments after a previous
failure.


### 📖 Description
Add a management command that can be run to retry the transfer of
attachments between old and new owners of a project after an initial
failure.


### 💭 Notes
The management command takes a Transfer uid since `move_attachments`
expects a transfer as the parameter. This also ensures that we are only
trying to copy attachments to the desired recipient. The PR also adds a
generic try/catch around the processing of each attachment as well as
some more logging. This is to make it more easy to determine which
attachments, if any, are failing and why. Once we have a better idea of
the problems occurring we can catch more specific exceptions and remove
the logging if it is getting excessive.

### 👀 Preview steps
This is most easily tested if you are using an S3 backend.

1. â„šī¸ have an MMO with at least two members
2. â„šī¸ have at least one asset with submissions with attachments in the
MMO
3. Update AWS_SECRET_ACCESS_KEY to be something incorrect (this will
ensure the attachment transfers fail the first time around)
4. In Django admin, update the organization owner to a different user
5. In Django shell, verify that the relevant TransferStatus
(status_type='attachments') failed
6. Update the AWS_SECRET_ACCESS_KEY to the correct one and restart the
kpi_worker
7. In a kpi container, run `./manage.py retry_attachment_transfers
<transfer_uid>`
8. đŸŸĸ The attachments should now be transferred to the new location, or
have logged the relevant errors

6182 of 9772 branches covered (63.26%)

8 of 14 new or added lines in 1 file covered. (57.14%)

23366 of 28856 relevant lines covered (80.97%)

0.81 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
78.63
-1.37% kobo/apps/project_ownership/utils.py
Jobs
ID Job ID Ran Files Coverage
1 17068851867.1 19 Aug 2025 12:38PM UTC 642
80.97
Source Files on build 17068851867
  • Tree
  • List 642
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • ebd53031 on github
  • Prev Build on release/2.025.29 (#17068830432)
  • Next Build on release/2.025.29 (#17154626810)
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