Skip to content

fix(federation): reset retainJob at start of run() - #60714

Merged
artonge merged 1 commit into
masterfrom
fix/F4-federation-retainjob-reset
Jun 11, 2026
Merged

fix(federation): reset retainJob at start of run()#60714
artonge merged 1 commit into
masterfrom
fix/F4-federation-retainjob-reset

Conversation

@solracsf

@solracsf solracsf commented May 24, 2026

Copy link
Copy Markdown
Member

Summary

JobList::buildJob resolves the job class via Server::get(), and the SimpleContainer caches the resulting instance as a singleton. When the cron loop processes multiple GetSharedSecret or RequestSharedSecret rows in the same pass, the same PHP object is reused, so a prior failure's $this->retainJob = true persisted into the next row's success path. The overridden start() then re-queued an already-successful handshake, causing continuous secret rotation against healthy peers.

Reset $this->retainJob = false at the top of run() so each invocation starts from a known state regardless of prior state on the cached instance.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf solracsf added this to the Nextcloud 35 milestone May 24, 2026
@solracsf
solracsf requested a review from a team as a code owner May 24, 2026 15:44
@solracsf
solracsf requested review from Altahrim, CarlSchwan, leftybournes and salmart-dev and removed request for a team May 24, 2026 15:44
@susnux susnux added the community pull requests from community label Jun 9, 2026
@artonge
artonge merged commit 20bc4e7 into master Jun 11, 2026
199 of 207 checks passed
@artonge
artonge deleted the fix/F4-federation-retainjob-reset branch June 11, 2026 09:04
@nextcloud-bot nextcloud-bot mentioned this pull request Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews community pull requests from community feature: federation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants