Skip to content

[4.x] Change tenant storage listeners into jobs#1446

Open
lukinovec wants to merge 3 commits intomasterfrom
storage-listeners
Open

[4.x] Change tenant storage listeners into jobs#1446
lukinovec wants to merge 3 commits intomasterfrom
storage-listeners

Conversation

@lukinovec
Copy link
Copy Markdown
Contributor

The CreateTenantStorage and DeleteTenantStorage listeners were used alongside JobPipelines. When the TenantCreated JobPipeline had shouldBeQueued(true) and the Listeners\CreateTenantStorage was uncommented, the listener would throw an exception (Stancl\Tenancy\Database\Exceptions\TenantDatabaseDoesNotExistException Database tenantX.sqlite does not exist.) because at the time of executing the listener, the tenant DB wasn't created yet.

This PR changes CreateTenantStorage and DeleteTenantStorage into jobs and puts these commented jobs into the JobPipelines, so that they can be queued with the rest of the jobs.

lukinovec and others added 2 commits March 26, 2026 15:34
Also move the commented jobs to the JobPipelines and update FilesystemTenancyBootstrapperTest accordingly.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.19%. Comparing base (c4960b7) to head (5b2cce3).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1446      +/-   ##
============================================
+ Coverage     86.05%   86.19%   +0.13%     
- Complexity     1152     1154       +2     
============================================
  Files           184      184              
  Lines          3371     3375       +4     
============================================
+ Hits           2901     2909       +8     
+ Misses          470      466       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lukinovec lukinovec marked this pull request as ready for review March 27, 2026 13:40
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