Skip to content

fix: flush migration logs after each process message - #231

Merged
Nikolas Evers (vintagesucks) merged 1 commit into
trunkfrom
fix/flush-migration-logs-per-message
Oct 9, 2026
Merged

Nikolas Evers (vintagesucks) merged 1 commit into
trunkfrom
fix/flush-migration-logs-per-message

Conversation

@vintagesucks

@vintagesucks Nikolas Evers (vintagesucks) commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

failing nightly 2026-10-07 and #229's merge, with a green nightly in between, all on the same commit

  • LoggingService writes its buffer every 50 entries1, on a service reset, or when the PHP process ends. The admin worker's consume request never resets services2 and keeps polling for up to 20 s3, so a run can finish with its last log entries still in memory (35 and 30 in the two failing runs)
  • MigrationProcessHandler now flushes after each process message, so every batch's logs are stored before the next one runs

Footnotes

  1. https://github.com/shopware/SwagMigrationAssistant/blob/d9ee89e697c03da9d5cc1989384860d36fb12d3f/src/Migration/Logging/LoggingService.php#L102-L103 ↩

  2. https://github.com/shopware/shopware/blob/04ab398d47d25932684a6997db66ce72becb8e7d/src/Core/Framework/MessageQueue/Api/ConsumeMessagesController.php#L67-L81 ↩

  3. 20 s time limit per request: https://github.com/shopware/shopware/blob/04ab398d47d25932684a6997db66ce72becb8e7d/src/Core/Framework/MessageQueue/Api/ConsumeMessagesController.php#L69 (default from https://github.com/shopware/shopware/blob/04ab398d47d25932684a6997db66ce72becb8e7d/src/Core/Framework/Resources/config/packages/shopware.yaml#L420), and it only returns early when no message was handled: https://github.com/shopware/shopware/blob/04ab398d47d25932684a6997db66ce72becb8e7d/src/Core/Framework/MessageQueue/Subscriber/EarlyReturnMessagesListener.php#L36-L40 ↩

@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.36%. Comparing base (d191cfc) to head (7601855).
⚠️ Report is 1 commits behind head on trunk.

Files with missing lines Patch % Lines
src/DependencyInjection/migration.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk     #231      +/-   ##
============================================
- Coverage     65.36%   65.36%   -0.01%     
  Complexity     4786     4786              
============================================
  Files           654      654              
  Lines         21756    21758       +2     
============================================
+ Hits          14221    14222       +1     
- Misses         7535     7536       +1     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/Migration/MessageQueue/Handler/MigrationProcessHandler.php
@vintagesucks
Nikolas Evers (vintagesucks) merged commit 6b55c1f into trunk Oct 9, 2026
10 of 12 checks passed
@vintagesucks
Nikolas Evers (vintagesucks) deleted the fix/flush-migration-logs-per-message branch October 9, 2026 07:18
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.

3 participants