Skip to content

Fix FilesystemManager caching - #9120

Open
nolanpro wants to merge 1 commit into
developfrom
fix-filesystem-caching
Open

nolanpro wants to merge 1 commit into
developfrom
fix-filesystem-caching

Conversation

@nolanpro

@nolanpro nolanpro commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Attempt to fix filesystem caching issue caught by nightly testbench

ci:deploy
ci:run-testbench

@cursor

cursor Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes tenant-switch storage behavior in worker processes; incorrect flushing could misroute reads/writes across tenant and landlord storage.

Overview
Fixes tenant isolation for file I/O in long-lived Horizon/Octane workers where Laravel’s FilesystemManager kept cached disk adapters pointed at the previous root even after multitenancy config was rewritten.

SwitchTenant now calls a new flushFilesystemDisks helper after tenant disk roots (and lang disk) are updated in makeCurrent, and again when forgetCurrent restores landlord filesystems.disks roots/URLs before other teardown. Flushing uses Storage::forgetDisk and drops the filesystem container binding so the next Storage::disk() resolves the correct tenant or landlord path.

A unit test warms the landlord local disk, switches to a fake tenant, asserts paths under storage/tenant_{id}, and verifies forgetCurrent restores the original landlord path.

Reviewed by Cursor Bugbot for commit 6ff4554. Bugbot is set up for automated code reviews on this repo. Configure here.

@nolanpro

nolanpro commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

QA server K8S was successfully deployed https://tenant-1.ci-a891df23ff.engk8s.processmaker.net

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant