Monorepo for Tangled tangled.org
854
fork

Configure Feed

Select the types of activity you want to include in your feed.

bug: appview/repo: deleting a repo is not consistent #513

open opened by codeka.io edited

When deleting a repo, there seem to have 3 steps :

  • deleting the AT Protocol record (a delete record send to the PDS)
  • deleting the repository from the knot (with a RPC call)
  • deleting the repository from the database in the app view (done in a transaction)

If one of the steps fails, the repository is not deleted from the database, and is keeped in a dangling state.

Further tries to delete the repository will end with a "Failed to delete repository from PDS" message because the record is already deleted or with a "xrpc request failed".

I'm not a go developer, but this seems to be related to this Go function : https://tangled.org/tangled.org/core/blob/master/appview/repo/repo.go#L834

The code returns if one of the first operations fails, so the actual deletion in the AppView database is never reached.

I guess there a some ways to implement it. Maybe the simplest is to make the RepoDeleteRecord and RepoDelete calls idempotent, so they do not throw an error if the repo has already been deleted. That way the code should be able to reach the AppView database part.

[deleted by author]
[deleted by author]

I'm facing an inconsistency too.

  1. Make a new repo using: (https://tangled.org/repo/new)
  2. Delete this repo: xrpc request failed
  3. Refresh the page, 404. (I assume repo has been deleted, and the repo is no longer on my profile)
  4. Make new repo again. XRPC ERROR 409: Generic: repository ash already being created

You can use https://pdsls.dev to delete a repo but this brings inconsistency.

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:a27wdjlmq3ebx4v5f2jpzvsk/sh.tangled.repo.issue/3ml23gckmvg22