Back to Codeberg

How to do federation related migrations while federation is considered to be unstable #67

forgejo-contrib-federation-issues-67.md

latest8.1 KB
Original Source

forgejo-contrib/federation

Watch21

Star82

Fork

You've already forked federation

6

CodeIssues 16Pull requests 8Projects 2ActivityActions

How to do federation related migrations while federation is considered to be unstable #67

New issue

Open

opened 2025-10-24 17:49:22 +02:00 by jerger · 4 comments

jerger commented 2025-10-24 17:49:22 +02:00

Owner

Copy link

I would expect to see no return err in the migration code. At least at the outer most level of migration function. In the inner level errors might be used to rollback transactions.

By silent errors in federation migrations data stored in database can get inconsistent.

To solve this I propose an "doctor command" wich

  1. deletes invalid (detected by federation data model validate) federation data or
  2. drop of all federation related data, tables, constraints & indexes and recreation of an empty db structure.

This will produce some loose ends in the world around (other systems federating with the one under migration). But I think, every system in the world has to be prepared to these loose ends. I propose to accept this inconsistency.

I would expect to see no return err in the migration code. At least at the outer most level of migration function. In the inner level errors might be used to rollback transactions. By silent errors in federation migrations data stored in database can get inconsistent. To solve this I propose an "doctor command" wich 1. deletes invalid (detected by federation data model validate) federation data or 2. drop of all federation related data, tables, constraints & indexes and recreation of an empty db structure. This will produce some loose ends in the world around (other systems federating with the one under migration). But I think, every system in the world has to be prepared to these loose ends. I propose to accept this inconsistency.

jerger referenced this issue from forgejo/forgejo 2025-10-24 17:50:54 +02:00 feat(activitypub): use structure @[email protected]:port for actors #9254

![](/avatars/d3e911eec058bc2605b5bf5a1af2c968f64815a2f6aedefd3e5f93cb6ba514a4 "Panagiotis "Ivory" Vasilopoulos")

![](/avatars/d3e911eec058bc2605b5bf5a1af2c968f64815a2f6aedefd3e5f93cb6ba514a4 "Panagiotis "Ivory" Vasilopoulos") n0toose commented 2025-10-24 18:05:07 +02:00

Collaborator

Copy link

I see this as a hard blocker that is too complex for me to deal with (forgejo/forgejo#9254 (comment)), so I will refrain from working on forgejo/forgejo#9254 further until this is resolved.

I see this as a hard blocker that is too complex for me to deal with (https://codeberg.org/forgejo/forgejo/pulls/9254#issuecomment-7889327), so I will refrain from working on https://codeberg.org/forgejo/forgejo/pulls/9254 further until this is resolved.

Gusted commented 2025-10-24 18:16:46 +02:00

Owner

Copy link

I disagree with this proposition, I have listed my reasons in #65 (comment). I really would like to hear why the federation migrations are being made so complex.

I disagree with this proposition, I have listed my reasons in https://codeberg.org/forgejo-contrib/federation/pulls/65#issuecomment-7794077. I really would like to hear why the federation migrations are being made so complex.

![](/avatars/d3e911eec058bc2605b5bf5a1af2c968f64815a2f6aedefd3e5f93cb6ba514a4 "Panagiotis "Ivory" Vasilopoulos") n0toose referenced this issue from forgejo/forgejo 2025-10-24 19:00:21 +02:00 feat(activitypub): use structure @[email protected]:port for actors #9254

![](/avatars/d3e911eec058bc2605b5bf5a1af2c968f64815a2f6aedefd3e5f93cb6ba514a4 "Panagiotis "Ivory" Vasilopoulos")

![](/avatars/d3e911eec058bc2605b5bf5a1af2c968f64815a2f6aedefd3e5f93cb6ba514a4 "Panagiotis "Ivory" Vasilopoulos") n0toose commented 2025-11-11 13:21:29 +01:00

Collaborator

Copy link

We discussed half of this proposition in yesterday's meeting (see #65), so half of it is covered. As far as the other half is concerned, I believe @gusted's disagreement mostly concerns the forgejo doctor proposition for the time being (feel free to correct me if I'm wrong).

We discussed half of this proposition in yesterday's meeting (see https://codeberg.org/forgejo-contrib/federation/pulls/65), so half of it is covered. As far as the other half is concerned, I believe @gusted's disagreement mostly concerns the forgejo doctor proposition *for the time being* (feel free to correct me if I'm wrong).

![](/avatars/d3e911eec058bc2605b5bf5a1af2c968f64815a2f6aedefd3e5f93cb6ba514a4 "Panagiotis "Ivory" Vasilopoulos")

![](/avatars/d3e911eec058bc2605b5bf5a1af2c968f64815a2f6aedefd3e5f93cb6ba514a4 "Panagiotis "Ivory" Vasilopoulos") n0toose commented 2025-11-11 13:22:04 +01:00

Collaborator

Copy link

In my pull request (forgejo/forgejo#9254), we chose to delete accounts in case of a conflict instead.

In my pull request (https://codeberg.org/forgejo/forgejo/pulls/9254), we chose to delete accounts in case of a conflict instead.

Sign in to join this conversation.

No Branch/Tag specified

BranchesTags

main

feat/add-generated-threat-analysis

n0toose/admin-panel

n0toose/readme-forgefed-mention

n0toose/ap-username-changes

ap-username-changes-for-pr-9254

adr-signing-and-encryption

No results found.

Labels Clear labels No items

No labels

Milestone

Clear milestone

No items

No milestone

Projects

Clear projects

No items

No project

Assignees

Clear assignees

No assignees

3 participants ![](/avatars/d3e911eec058bc2605b5bf5a1af2c968f64815a2f6aedefd3e5f93cb6ba514a4 "Panagiotis "Ivory" Vasilopoulos")

Notifications Subscribe

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

forgejo-contrib/federation#67

WritePreview

Loading…

Add table

| Rows | | | Columns | |

CancelOK

Add a link

Url Description Hint: With a URL in your clipboard, you can paste directly into the editor to create a link.

CancelOK

CancelSave

Reference in a new issue

Repository

forgejo-contrib/federation

Title

Body

Create issue

No description provided.

Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?

No Yes