Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User import and export improvements #3431

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

hughrun
Copy link
Contributor

@hughrun hughrun commented Sep 8, 2024

Description

This fixes a number of bugs in User imports and exports, and improves the UX.

  • User import makes each relationship, book or status a subtask of the import job
  • Failures of any of the above now do not make the whole job fail
  • improved troubleshooting since import items are separated
  • Tombstones no longer cause an import to fail (Account import fails with error: 'attributedTo' #3381)
  • Users can now see average recent import and export times
  • Users can now see status of imported books, relationships (follows/blocks) and statuses as they are imported
  • Fixed a bug where authors were not added to works, likely leading to import failures
  • Expanded test suite

What type of Pull Request is this?

  • Bug Fix
  • Enhancement
  • Plumbing / Internals / Dependencies
  • Refactor

Does this PR change settings or dependencies, or break something?

  • This PR changes or adds default settings, configuration, or .env values
  • This PR changes or adds dependencies
  • This PR introduces other breaking changes

Details of breaking or configuration changes (if any of above checked)

Documentation

  • New or amended documentation will be required if this PR is merged
  • I have created a matching pull request in the Documentation repository
  • I intend to create a matching pull request in the Documentation repository after this PR is merged

Tests

  • My changes do not need new tests
  • All tests I have added are passing
  • I have written tests but need help to make them pass
  • I have not written tests and need help to write them

- Refactors BookwyrmImportJob to be staged into three sets of subtasks.
- Adds more robust error checking
- Fixes bug in check for moved_to value
- Fixes but where status Tombstones caused imports to fail
- Improves user import job interface to provide more information matching csv imports
This also updated a template tag to be more flexible
- adds tests for importing books in user import
- fixes bug where new authors were not added to Work, throwing error
@hughrun
Copy link
Contributor Author

hughrun commented Sep 8, 2024

@bookwyrm-social/code-review Some eyes on this would be good, there's a lot of new code.
Also any tips on the template error would be good. I see I've missed a closing div tag, is that likely to be it, or have I missed something else?

@hughrun hughrun changed the title Import tombstone User import and export improvements Sep 8, 2024
@mouse-reeve
Copy link
Member

In the course of testing I found an unrelated error in how the status was being composed, so I went in and changed that

Copy link
Member

@mouse-reeve mouse-reeve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all comparatively minor UI changes, but as far as I tested this seemed to work very well!

bookwyrm/models/bookwyrm_import_job.py Outdated Show resolved Hide resolved
bookwyrm/templates/import/user_troubleshoot.html Outdated Show resolved Hide resolved
bookwyrm/templates/import/user_troubleshoot.html Outdated Show resolved Hide resolved
move fail_reason into Job definition

Bump aiohttp from 3.9.4 to 3.10.2

Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.4 to 3.10.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.9.4...v3.10.2)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Convert min_confidence param to string to appease mypy

docker-compose 'version' has been deprecated

remove unused TextField import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account import fails with error: 'attributedTo'
2 participants