fix: #3637295 Wait for derivatives another request is generating, with the lock API (local and S3)

Issue: https://www.drupal.org/node/3637295

Requests for an image still being generated got an uncaught 503 error page.

  • DrimageManager wraps generation in a lock, like core. Other requests wait up to 2 s and get the finished image, then a plain 503 with Retry-After: 3.
  • DrimageS3Subscriber gets the same handling through the shared DrimageDeliveryTrait.
  • Tests: Kernel tests for both subscribers, and a functional feature with stress scenarios.

Stress (about 2,000 requests at once): 1.0.14 had 414 broken responses and 273 logged errors. This MR has none.

Remaining tasks

  • Separate issue: the web server can serve a half-written image (core writes it in place).

AI-Generated: Yes

Checkpoints:

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release
Edited by Rajab Natshah

Merge request reports

Loading
Loading