Review main Merged

60306[BUGFIX] Ensure fresh logger instance in scheduler tasks

Helmut Hummel CR +2 V +2 Easy +12 −28 updated 01/09/20, 20:28

Commit message

The AbstractTask always had methods setScheduler and
unsetScheduler to avoid serialization of the scheduler instance.
These methods are called by the scheduler API before serializing
(unset) and after unserializing (set).

Use these methods in favor of the __sleep and __wakup calls
to avoid issues with third party subclasses that implement these methods
and to make sure tasks that are already serialized with an outdated
logger instance are properly updated on next run without the need
to clean them up manually.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Markus Klein +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Markus Klein +1
    • TYPO3com +1 CI

Issues 2

Files 3

Review log 2128

Show 23 earlier messages
  1. Helmut Hummel uploaded patch set 1 03/21/19, 18:34

  2. TYPO3com voted on patch set 1 V -1 03/21/19, 18:50 Completed build in 16m 25s on Thu, 21 Mar, 07:50 PM Test Summary: 8 of 47594 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32878

  3. Stephan Großberndt updated the commit message in patch set 2 03/21/19, 19:12

  1. Stephan Großberndt updated the commit message in patch set 3 03/21/19, 19:13

  2. Stephan Großberndt commented on patch set 3 03/21/19, 19:16

    AbstractTask.php:100

    Why not setScheduler() here?
  3. TYPO3com voted on patch set 3 V -1 03/21/19, 19:27 Completed build in 14m 23s on Thu, 21 Mar, 08:27 PM Test Summary: 8 of 47594 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32880

  4. TYPO3com voted on patch set 2 V -1 03/21/19, 19:28 Completed build in 15m 23s on Thu, 21 Mar, 08:28 PM Test Summary: 8 of 47594 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32879

  5. Helmut Hummel commented on patch set 3 03/21/19, 21:41

    AbstractTask.php:100 Reply

    Because it would set the logger as well, which is also set by makeInstance
  6. Markus Klein commented on patch set 3 03/21/19, 21:44

    AbstractTask.php:100 Reply

    There should definitely be a comment in the code that reminds us on this!
  7. Stephan Großberndt commented on patch set 3 03/21/19, 21:56

  8. Markus Klein commented on patch set 3 03/21/19, 22:36

    AbstractTask.php:100 Reply

    ;-) I'm well aware of this change, I wrote it. My suggestion would be a comment like: // We do not call setScheduler here, because the logger is injected anyways.
  9. Stephan Großberndt commented on patch set 4 03/22/19, 08:13

    Published edit on patch set 3.
  10. Helmut Hummel commented on patch set 3 03/22/19, 08:20

    AbstractTask.php:100 Reply

    Should we write this comment to every logger aware class then? I don't really understand why it is more important to add a comment here. But I'm fine with adding it if you find it helpful.
  11. Stephan Großberndt commented on patch set 4 03/22/19, 08:25

    Tests on this change fail due to PackageManager being instantiated by makeInstance without the mandatory argument DependencyOrderingService $dependencyOrderingService https://bamboo.typo3.com/browse/CORE-GTC-UT0PHP72-32879/test/case/120323275 This change replaced the DependencyResolver by DependencyOrderingService but set it as optional argument https://review.typo3.org/c/Packages/TYPO3.CMS/+/55977/16/typo3/sysext/core/Classes/Package/PackageManager.php This change made the constructor argument mandatory https://review.typo3.org/c/Packages/TYPO3.CMS/+/59212/5/typo3/sysext/core/Classes/Package/PackageManager.php
  12. TYPO3com voted on patch set 4 V -1 03/22/19, 08:27 Completed build in 14m 35s on Fri, 22 Mar, 09:27 AM Test Summary: 8 of 47594 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32881

  13. Markus Klein commented on patch set 4 03/22/19, 09:13

    AbstractTask.php:100 Reply Unresolved

    Nope, of course not. I see this as special case here, as we manually fiddle with the logger. This leaves me with the impression that there is something special here when reading the code. And obviously it is not so clear, since Stephan asked exactly this question. => So yes, I would say a comment can help here. No, I don't insist on it, it just came to my mind. ;-)
  14. Helmut Hummel updated the commit message in patch set 5 03/25/19, 07:53

  15. TYPO3com voted on patch set 5 V -1 03/25/19, 08:07 Completed build in 14m 06s on Mon, 25 Mar, 09:07 AM Test Summary: 8 of 47610 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32934

  16. Susi Moog uploaded patch set 6 12/20/19, 07:40

  17. TYPO3com voted on patch set 6 V -1 12/20/19, 07:50 Completed build in 09m 52s on Fri, 20 Dec, 07:50 AM Test Summary: 6 of 69578 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39542

  18. Susi Moog uploaded patch set 7 12/20/19, 07:54

  19. TYPO3com voted on patch set 7 V +1 12/20/19, 08:04 Completed build in 10m 20s on Fri, 20 Dec, 08:04 AM Test Summary: 69128 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39543

  20. Markus Klein voted on patch set 7 CR +1 12/20/19, 10:27

  21. Benni Mack voted on patch set 7 CR +1 01/09/20, 14:06

  22. Georg Ringer voted on patch set 7 V +1 CR +1 01/09/20, 19:23

  23. Markus Klein voted on patch set 7 V +1 01/09/20, 20:02

  24. Benni Mack voted on patch set 7 V +2 CR +2 01/09/20, 20:28

  25. Benni Mack merged patch set 8 01/09/20, 20:28