Repository navigation
feat(core): import scope that keeps imports quiet - #66175
Open
karlitschek wants to merge 2 commits into
Open
karlitschek wants to merge 2 commits into
karlitschek wants to merge 2 commits into
Conversation
Member
Author
|
This is needed for an upcoming migration app. |
karlitschek
marked this pull request as ready for review
November 3, 2026 12:00
karlitschek
requested review from
a team,
SebastianKrupinski and
kesselb
as code owners
November 3, 2026 12:00
karlitschek
requested review from
Altahrim,
leftybournes,
pabzm,
provokateurin and
sorbaugh
and removed request for
a team
November 3, 2026 12:00
karlitschek
force-pushed
the
feat/import-scope
branch
from
November 3, 2026 12:02
695390c to
c2cd3fe
Compare
susnux
requested review from
a team,
come-nc and
marcoambrosini
and removed request for
a team,
pabzm and
sorbaugh
November 3, 2026 12:12
karlitschek
force-pushed
the
feat/import-scope
branch
3 times, most recently
from
November 3, 2026 19:45
27fbfa5 to
0f248cb
Compare
Migrations and restores write content that users already know, often millions of files and shares at once. Code that runs inside IImportScope::run() is an import: activity events and notifications are dropped and share mails are not sent, so users aren't flooded. Apps that inform users through other channels (activity's file hooks, push) can check IImportScope::isActive(). Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com>
An import that creates shares, or calendar shares, for its users made every recipient a "recently contacted" person of the share owner, because the share and calendar listeners report each new share as a contact interaction. Inside IImportScope the listener skips recording them; the people didn't contact each other, the import did. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com>
karlitschek
force-pushed
the
feat/import-scope
branch
from
November 3, 2026 22:20
0f248cb to
777a04c
Compare
This branch has not been deployed
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
Migrations from other systems and restores from backups write content that users already know, often millions of files, shares and calendar entries at once. Today every one of those writes produces an activity entry, a notification or a share mail, so users get flooded with news about their own old data.
This adds the public API
OCP\Import\IImportScope. Code that runs insideIImportScope::run()counts as an import, and while it is active:publish()/bulkPublish()events,Everything else (events, hooks, file cache, versions, …) works as usual. Calls can be nested; the import ends when the outermost callback returns or throws. Apps that inform users through their own channels can check
IImportScope::isActive().Tests cover the scope itself and each of the consumers (Activity, Notification and Share20 manager tests, contactsinteraction listener).
This draft description was written with AI assistance (Claude Code) at the author's request; the author reviews it before the PR leaves draft.
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)
This change was written with Claude Code (claude-opus-5-5) and is to be reviewed by the author before it leaves draft; every commit carries an
Assisted-bytrailer. Commits still need the author's sign-off (DCO).🤖 Generated with Claude Code