Skip to content

fix(federation): remove background jobs when removing trusted servers #53760

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Jul 2, 2025

Summary

Add event listener to remove matching background jobs for trusted server url.

Motivation: When debugging federation locally, I occasionally remove and re-add the server. This can result in multiple background jobs for the same url/target, but with different tokens. I've encountered this issue several times. Therefore, I added an event listener to remove them immediately. I won't backport this change as it has minimal impact on production systems (since those jobs will expire eventually), and it primarily improves the developer experience.

Checklist

@kesselb kesselb requested review from hamza221 and pabzm July 2, 2025 10:47
@kesselb kesselb self-assigned this Jul 2, 2025
@kesselb kesselb force-pushed the bug/noid/federation-background-job-same-url-different-token branch from 1e448cd to 6465f42 Compare July 2, 2025 14:06
Add event listener to remove matching background jobs for trusted server url.

Signed-off-by: Daniel Kesselberg <[email protected]>
@kesselb kesselb force-pushed the bug/noid/federation-background-job-same-url-different-token branch from 6465f42 to af8e175 Compare July 2, 2025 14:07
@kesselb kesselb marked this pull request as ready for review July 2, 2025 14:08
@kesselb kesselb requested review from nickvergessen and a team as code owners July 2, 2025 14:08
@kesselb kesselb requested review from ArtificialOwl, artonge and provokateurin and removed request for a team July 2, 2025 14:08
@kesselb kesselb added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jul 2, 2025
@nickvergessen
Copy link
Member

Btw while on it, when another server adds your server as trusted, they run this background job all the time, but as a "recipient" you don't see that someone is asking to get added as a trusted server, neither can you deny it, so the other server gives up, right?

@kesselb
Copy link
Contributor Author

kesselb commented Jul 2, 2025

Btw while on it, when another server adds your server as trusted, they run this background job all the time, but as a "recipient" you don't see that someone is asking to get added as a trusted server, neither can you deny it, so the other server gives up, right?

Yes

kesselb added 2 commits July 2, 2025 17:52
iterator_to_array on PHP 8.1 does not accept an array and fails hard with a type error

Signed-off-by: Daniel Kesselberg <[email protected]>
@kesselb
Copy link
Contributor Author

kesselb commented Jul 2, 2025

@pabzm
Copy link
Member

pabzm commented Jul 4, 2025

I can't dive into this in the next few days, sorry.

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

Successfully merging this pull request may close these issues.

3 participants