Skip to content

fix(files_external): align filesystem change detection defaults - #64333

Open
joshtrichards wants to merge 5 commits into
masterfrom
jtr/fix-extStorage-align-check-default
Open

joshtrichards wants to merge 5 commits into
masterfrom
jtr/fix-extStorage-align-check-default

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Sep 14, 2026

Copy link
Copy Markdown
Member

Summary

The web interface initializes new external storage mounts with filesystem_check_changes = 1, but files_external:create, files_external:import, and other non-GUI creation paths could omit the option.

When the option was absent, the runtime fell back to the global filesystem_check_changes setting, whose default is 0 (Never). As a result, files added to or removed from the underlying storage could remain invisible until a manual occ files:scan or another operation refreshed the file cache.

This change ensures external storage mounts consistently use filesystem_check_changes = 1 (Once every direct access) when no mount-specific value is configured.

Changes:

  • Apply a compatibility default of 1 when loading existing external storage mounts without filesystem_check_changes.
  • Apply and persist the same default when adding new mounts through StoragesService::addStorage().
  • Preserve explicitly configured values:
    • 0 — Never
    • 1 — Once every direct access
    • 2 — Always
  • Add regression coverage for:
    • the default applied to newly added mounts;
    • preservation of explicit values;
    • loading existing mounts without the option.

The global filesystem_check_changes setting is unchanged, and existing explicit mount settings are preserved.

TODO

  • Backport to v33-v35

Checklist

AI (if applicable)

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

Apply the OncePerRequest filesystem-check policy when an external mount does not define filesystem_check_changes.

This keeps mounts created through occ and imports consistent with GUI-created mounts while preserving explicitly configured values.

Fixes #53249

Signed-off-by: Josh <josh.t.richards@gmail.com>
Verify that mounts without an explicit filesystem_check_changes option default to checking once per request, while preserving explicit values for Never, OncePerRequest, and Always.

Also cover loading legacy mounts that lack the option.

Assisted-by: Copilot:gpt-5.6-luna

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 36 milestone Sep 14, 2026
@joshtrichards
joshtrichards requested a review from a team as a code owner September 14, 2026 21:35
@joshtrichards
joshtrichards requested review from Altahrim and leftybournes and removed request for a team September 14, 2026 21:35
@joshtrichards joshtrichards added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 14, 2026
Accept native mount-option values in DBConfigService and add round-trip
coverage for numeric and boolean options. Also skip the inherited
filesystem-check test for UserGlobalStoragesService, which is read-only.

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable35

@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable34

@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable33

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
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.

S3 external storage created via occ files_external:create does not detect remote file changes

3 participants