fix(AppDisableListener): pass full provider key to deleteProvider - #265
Merged
kyteinsky merged 1 commit intoAug 13, 2026
Merged
Conversation
AppDisableListener passed the bare provider id (e.g. "mail") instead of the full provider key appId__providerId (e.g. "mail__mail") to ActionScheduler::deleteProvider(). The backend rejects the bare id (is_valid_provider_id / ^[a-zA-Z0-9_-]+__[a-zA-Z0-9_-]+$), and because it validates the whole ActionsQueueItems batch in one model_validate() call, this single poisoned row makes updates_processing_thread throw on every poll and freezes the entire oc_context_chat_action_queue indefinitely. The correct full key is already available in $key, so pass it directly. Also document in ActionScheduler::deleteProvider() that the full appId__providerId key is expected. Fixes nextcloud#258 Signed-off-by: weltmaister <55494283+weltmaister@users.noreply.github.com>
weltmaister
force-pushed
the
fix/appdisable-provider-key
branch
from
August 10, 2026 17:05
485ec28 to
6bc4101
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AppDisableListenerschedules adelete_provider_idaction using the bare provider id (e.g.mail) instead of the full provider keyappId__providerId(e.g.mail__mail). The backend rejects the bare id (is_valid_provider_id,^[a-zA-Z0-9_-]+__[a-zA-Z0-9_-]+$).Because
context_chat_backend'supdates_processing_threadvalidates the wholeActionsQueueItemsbatch in a singlemodel_validate()call, this one invalid item makes it throw on every poll and freezes the entireoc_context_chat_action_queueindefinitely — access-declaration updates, deletions, etc. stop propagating and it never recovers on its own.Details in #258.
Fix
$keyalready holds the correct full key (appId__providerId), so pass it directly toActionScheduler::deleteProvider()instead of the split-off$providerId.Also documented on
ActionScheduler::deleteProvider()that it expects the fullappId__providerIdkey (as returned byProviderConfigService::getConfigKey()), matching every other caller.Trigger / impact
AppDisableEventfires whenever an app that registered a content provider is disabled — including during app updates /occ upgrade. The Mail app registers provider idmail, so each disable produced one poisoneddelete_provider_id: mailrow. Observed effect: 500+update_access_decl_source_idactions stuck for ~1 day; ACL/share changes not reflected in semantic search until the poison rows were removed manually.Note
Secondary hardening —
updates_processing_threadvalidating/skipping per item (like the files path already does viaItemValidationError) instead of aborting the whole batch — belongs incontext_chat_backendand is out of scope here.