Delete local object on fetch when receiving HTTP 410, split fetcher (fixes #1256) #154

Closed
nutomic wants to merge 2 commits from deletion-on-fetch into move_views_to_diesel
Owner

Edit: This time it worked fine in my tests, everything is working correctly except for user deletion (see the todo in lemmy_apub/src/http/user.rs). Here are the steps for testing, it might be good to add such a case to the federation tests:

  1. create a user/community/post/comment on instance alpha
  2. fetch that object on instance beta by searching for it
  3. do not follow any actor on alpha from beta
  4. delete the object on alpha
  5. at this point, the object wont be deleted on beta, as its not a follower and doesnt get notified about the deletion
  6. do the same search from step 2 again
  7. the search will fail, but if you go back to view the object on beta, it will be marked as deleted
Edit: This time it worked fine in my tests, everything is working correctly except for user deletion (see the todo in `lemmy_apub/src/http/user.rs`). Here are the steps for testing, it might be good to add such a case to the federation tests: 1. create a user/community/post/comment on instance alpha 2. fetch that object on instance beta by searching for it 3. do *not* follow any actor on alpha from beta 4. delete the object on alpha 5. at this point, the object wont be deleted on beta, as its not a follower and doesnt get notified about the deletion 6. do the same search from step 2 again 7. the search will fail, but if you go back to view the object on beta, it will be marked as deleted
nutomic added 1 commit 2021-01-07 17:13:06 +00:00
nutomic changed title from WIP: Delete local object on fetch when receiving HTTP 410, split fetcher (fixes #1256) to Delete local object on fetch when receiving HTTP 410, split fetcher (fixes #1256) 2021-01-09 12:34:36 +00:00
nutomic added 1 commit 2021-01-09 13:34:32 +00:00
nutomic reviewed 2021-01-09 15:35:57 +00:00
@ -19,3 +11,1 @@
echo "All instances started."
sudo docker-compose logs -f
sudo docker-compose up
Author
Owner

Those while loops dont seem to be working anymore, and anyway its better to see the startup logs in case there are errors. So I removed those.

Those while loops dont seem to be working anymore, and anyway its better to see the startup logs in case there are errors. So I removed those.
Author
Owner

Federation tests are passing locally but failing in CI. I dont see how it could be related to these changes, as everything after a certain point fails with ECONNREFUSED 127.0.0.1:8541.

Also, docker/federation/run-tests.bash is stuck forever at "waiting for lemmy to start". I propose we remove that and use api_tests/run-federation-test.sh instead.

Federation tests are passing locally but failing in CI. I dont see how it could be related to these changes, as everything after a certain point fails with `ECONNREFUSED 127.0.0.1:8541`. Also, `docker/federation/run-tests.bash` is stuck forever at "waiting for lemmy to start". I propose we remove that and use `api_tests/run-federation-test.sh` instead.
nutomic added 1 commit 2021-01-12 12:40:30 +00:00
nutomic force-pushed deletion-on-fetch from c0580aec35 to 521cd55913 2021-01-12 15:12:01 +00:00 Compare
Owner

This is merged, but it was a squash and merge.

This is merged, but it was a squash and merge.
dessalines closed this pull request 2021-01-12 16:13:21 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LemmyNet/lemmy#154
No description provided.