You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(projectOwnership): log errors in transferring attachments DEV-842 (#6060)
### 💭 Notes
Right now we are swallowing errors when trying to move attachments. The
jobs occasionally fail and the lack of logging makes it difficult to
diagnose, so this logs the error before returning False.
### 👀 Preview steps
Make sure you are using s3 storage
1. ℹ️ have at least 2 accounts and a project with an image question
2. Add a few submissions with attachments to the project
3. Transfer the project to another user
4. Before accepting the transfer, update `kpi.fields.file.py:20-23` with
```
from django.apps import apps
Attachment = apps.get_model(model_name='Attachment', app_label='logger')
if isinstance(self.instance, Attachment):
name = 'bad name'
else:
name = self.name
copy_source = {
'Bucket': self.storage.bucket.name,
'Key': name,
}
```
Make sure to restart the worker to pick up the changes
5. As the other user, accept the transfer invitation
6. 🔴 [on main] Notice there is only an `AsyncTaskException` in the
worker logs
7. 🟢 [on PR] Notice there is both an `AsyncTaskException` and a more
detailed `ClientError` in the logs
0 commit comments