Commit Graph

13464 Commits (8396d5e46a5d11ffa9abf221bb85b19107a3106b)
 

Author SHA1 Message Date
Shlee 984d3ad84f
Merge pull request #7207 from pixelfed/shleeable-patch-1
Fix typo
2 weeks ago
Shlee caffc40a45
Fix URL construction for API timeline request 2 weeks ago
Shlee 784e4eec6a
Merge pull request #7206 from pixelfed/shleeable-patch-2
Update README.md
2 weeks ago
Shlee b64c37d7eb
Update README.md 2 weeks ago
Shlee 3e9abdb12c
Merge pull request #7205 from pixelfed/shleeable-patch-1
Comment out NPM packages until new webui
2 weeks ago
Shlee 5b566752e8
Update dependabot.yml 2 weeks ago
Shlee 3a34c48fd6
Merge pull request #7202 from pixelfed/test-fix-2
Refactor tests for modern phpunit
2 weeks ago
Your Name 888fa1bc30 Fix tests 2 weeks ago
Shlee 289251985a
Merge pull request #7199 from pixelfed/fix/story-publish-validation-exception
Laravel 13 Prep: Stop swallowing overlay ValidationException into a generic 500
2 weeks ago
Shlee 499dc44b48
Merge pull request #7200 from pixelfed/fix/custom-filter-dangling-transaction
Fix dangling DB transactions in CustomFilterController
2 weeks ago
Your Name 62d3bc8406 Stop swallowing overlay ValidationException into a generic 500
publishNext() throws ValidationException::withMessages() for invalid
story overlays (bad text/hashtag/mention/url/type), but the enclosing
catch (\Exception $e) caught it too, since ValidationException extends
Exception. Clients got a generic 500 "Failed to create story" instead
of the intended 422 with field-level errors, and the log was flooded
with ordinary user-input validation failures logged as server errors.
Catch ValidationException separately, roll back, and rethrow it so
Laravel's exception handler renders the normal 422 response.
2 weeks ago
Your Name 8fa18ff8c6 Fix dangling DB transactions in CustomFilterController
store() and update() open a manual DB::beginTransaction() but had early
return paths (duplicate keyword, keyword not found, per-filter keyword
limit) that hit neither DB::commit() nor the catch block's rollback,
leaving the transaction open past the end of the request. Add the
missing DB::rollBack() call on each early-exit branch, matching the
manual-transaction pattern used elsewhere in the app.
2 weeks ago
Shlee fa0857253c
Merge pull request #7198 from pixelfed/refactor/horizon-priority-supervisors
Laravel 13 Prep: Update Horizon
2 weeks ago
Shlee 7e468230d6
Update horizon.php 2 weeks ago
Your Name bbe7cfa8e1 Split Horizon into priority-based supervisors, add balanceCooldown
and notification routing

All 15 queues previously ran through one auto-balanced supervisor.
Horizon's `balance: auto` does not honor queue array order for
priority, so despite queue names implying priority ('high' vs 'low'),
a burst on any one queue could starve any other sharing that
supervisor - e.g. a burst of mmo (image/video optimization, 23
dispatch sites, CPU/IO heavy) could delay high-queue DM/follow
delivery just as easily as it could delay low-queue background work.

Split into 4 supervisors grouped by actual job characteristics
(checked via grep across every ->onQueue() call site, not guessed):
- supervisor-priority: high, inbox, pushnotify, follow, default,
  shared - user-facing federation/DM/notification delivery.
- supervisor-fanout: feed, story, groups - bursty timeline/story
  fanout writes triggered by posts, likes, and follows.
- supervisor-media: mmo - image/video optimize/resize/thumbnail.
  Runs a fixed worker pool (balance: false) instead of auto-scaling,
  so it can't claim workers away from the other pools under load.
- supervisor-background: low, delete, adelete, move, intbg - imports,
  crawling, account deletion/migration; not time-sensitive.

Moved the shared supervisor shape into `defaults` (keyed per
supervisor name, per Horizon's own merge behavior) so `environments`
only needs to override what actually differs, instead of each
environment fully redefining supervisor-1 from scratch. Existing env
vars (HORIZON_MAX_PROCESSES, HORIZON_MIN_PROCESSES,
HORIZON_BALANCE_STRATEGY, HORIZON_SUPERVISOR_*) keep governing the
priority supervisor for continuity with existing deployments; the
three new supervisors get their own HORIZON_*_MAX_PROCESSES vars
with conservative defaults.

Also:
- Added balanceCooldown: 3 explicitly (previously relied on
  SupervisorOptions' own constructor default of the same value -
  behavior is unchanged, just no longer implicit).
- Wired LongWaitDetected notification routing
  (Horizon::routeMailNotificationsTo/routeSlackNotificationsTo) to
  new optional config('horizon.notification_routing') keys, sourced
  from env vars. Previously these were hardcoded, commented-out
  examples with nowhere to actually alert on the `waits` thresholds
  already configured below.

Verified by actually starting `php artisan horizon` and inspecting
`horizon:supervisors`: all 4 supervisors registered with exactly the
intended queues, supervisor-media correctly running fixed (non-auto)
balancing. Cross-checked every ->onQueue() call site in app/ against
the new supervisor queue lists - exact match, no queue dropped or
duplicated. Full test suite (715/715) and Larastan clean.
2 weeks ago
Shlee cedfe1a0c1
Merge pull request #7197 from pixelfed/fix/horizon-retry-after-timeout-order
Fix/horizon retry after timeout order
2 weeks ago
Shlee 4f06102741
Update queue.php 2 weeks ago
Your Name 582083a7fa Fix Redis queue retry_after being shorter than Horizon's timeout
config/queue.php's redis connection defaulted retry_after to 90s,
while config/horizon.php's supervisor-1 defaults to a 300s timeout
in both environments. Per Horizon's documented timeout-chain
requirement (job timeout < supervisor timeout < retry_after), this
was backwards: any job legitimately running between 90s and 300s
would get treated as dead by the queue driver and picked up by a
second worker before Horizon's own supervisor had a chance to time
it out, causing the same job to run twice concurrently.

Bumps the default to 330s (a 30s margin over the supervisor timeout)
and documents the relationship inline so it doesn't regress if
either value is tuned later.
2 weeks ago
Shlee 125217fdf3
Merge pull request #7196 from pixelfed/upgrade/laravel-13
Upgrade to Laravel 13
2 weeks ago
Your Name 42620e584b Upgrade to Laravel 13
- laravel/framework ^12.0 -> ^13.0
- spatie/laravel-backup ^9.2.9 -> ^10.0 (forced: 9.x pins
  illuminate/notifications ^12.40, incompatible with L13)
- Drop psalm/plugin-laravel + vimeo/psalm (dev-only static analysis):
  the only version chain compatible with L13's testbench-core needs
  vimeo/psalm ^7.0.0-beta, which requires narrowing the project's
  declared PHP floor (composer platform.php is pinned to 8.3.0 to
  keep composer.lock installable on the oldest supported PHP patch;
  the psalm 7 betas require specific 8.3.16+/8.4.3+/8.5.0+ floors).
  Its CI workflow (.github/workflows/php-psalm.yml) was already
  disabled (`on: []`, "too many errors"). Larastan/PHPStan remains
  as the project's static analysis tool, unaffected.
- Rename VerifyCsrfToken/ValidateCsrfToken -> PreventRequestForgery
  in bootstrap/app.php and config/sanctum.php (the L13 rename; old
  classes remain as deprecated aliases but new code should reference
  the new name), and validateCsrfTokens() -> preventRequestForgery()
  in the middleware config.

Everything else (cache serializable_classes, cache/session/redis key
prefixes, upsert() uniqueBy, JobAttempted/QueueBusy event properties,
pagination view names, Manager::extend bindings, model-boot nested
instantiation) was checked against the app's actual code and found
to be either already handled, already using the new convention, or
not applicable to any pattern in this codebase.

All 715 tests pass (verified against a clean baseline with Redis
available locally via Docker); Pint and Larastan (the project's
configured `composer analyse` scope) are both clean.
2 weeks ago
Shlee 6538ab0368
Merge pull request #7194 from pixelfed/refactor/lazily-refresh-database
Use LazilyRefreshDatabase instead of plain RefreshDatabase in tests
2 weeks ago
Your Name 255bdaa2a0 Use LazilyRefreshDatabase instead of plain RefreshDatabase in tests
Aligns with the app's dominant convention (84 files vs 10). Avoids
running migrations for tests that never touch the database.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 weeks ago
Shlee 140221fe90
Merge pull request #7192 from pixelfed/refactor/str-of-to-native
Laravel 13 Prep: Replace Str::of() fluent chains with static Str::/native calls
2 weeks ago
Your Name a424493420 Replace Str::of() fluent chains with static Str::/native calls
Aligns with the app's dominant convention (171 static Str:: calls vs
24 Str::of() chains). Uses Str::afterLast() for the repeated
"segment after last slash" pattern, Str::matchAll() where a
Collection return is needed, and native explode()/substr() where a
plain array/string suffices.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 weeks ago
Shlee a1fab5419b
Merge pull request #7191 from pixelfed/refactor/now-helper-over-carbon
Laravel 13 Prep: Use now() helper instead of Carbon::now() for current-time access
2 weeks ago
Your Name 277b8aa970 Use now() helper instead of Carbon::now() for current-time access
Aligns with the app's dominant convention (413 now()/today() call
sites vs 12 Carbon::now()). Carbon::parse() calls are untouched since
they parse arbitrary date strings, not current-time access.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 weeks ago
dansup e6edffcc6a
Merge pull request #7190 from pixelfed/staging
Update README.md
2 weeks ago
Daniel Supernault 2df104c309
Update README.md
Remove DigitalOcean
2 weeks ago
dansup b9d4bf7097
Merge pull request #7189 from pixelfed/staging
Fix SoftwareUpdate notices
2 weeks ago
Daniel Supernault 6ddc803ae1
Fix SoftwareUpdate notices 2 weeks ago
dansup ecc256f483
Merge pull request #7187 from pixelfed/staging
New Release (v0.12.10)
2 weeks ago
Daniel Supernault e53a2cd378
Update changelog 2 weeks ago
Daniel Supernault fb3e218d64
Bump version 2 weeks ago
dansup 6322bca304
Merge pull request #7185 from pixelfed/staging
Staging
2 weeks ago
Shlee 905b38a4c3
Merge pull request #7186 from pixelfed/shleeable-patch-2
Update StoryExpireRemoteCacheTest.php
2 weeks ago
Shlee 84df3de562
Update StoryExpireRemoteCacheTest.php 2 weeks ago
Shlee 89427c8c6b
Merge pull request #7184 from pixelfed/shleeable-patch-1
Update docker-push.yml
2 weeks ago
Shlee 6fcc518720
Update docker-push.yml 2 weeks ago
Shlee fdcdc62291
Update Ubuntu version in Docker workflow 2 weeks ago
Shlee 503c86e147
Update docker-tag.yml 2 weeks ago
Shlee 9357c1117f
Update docker-push.yml 2 weeks ago
Daniel Supernault 7a5192481c
Fix StoryExpireRemoteCacheTest 2 weeks ago
dansup a2643bb187
Merge pull request #7183 from pixelfed/staging
Update StoryService and add has_story to AccountTransformer
2 weeks ago
Daniel Supernault bbd7618c46
Update StoryService and add has_story to AccountTransformer 2 weeks ago
dansup 7c1fb49a01
Merge pull request #7182 from pixelfed/staging
Fix StoryCarousel cache invalidation
2 weeks ago
Daniel Supernault 7975ba9c75
Fix StoryCarousel cache invalidation 2 weeks ago
dansup 5b73e101e0
Merge pull request #7181 from pixelfed/staging
Update account suggestions
2 weeks ago
Daniel Supernault 915879ff57
Update account suggestions 2 weeks ago
dansup fb7977e7e9
Merge pull request #7180 from pixelfed/staging
Staging
2 weeks ago
Daniel Supernault 9aafa37364
Update ApiV1Controller.php 2 weeks ago