87001[TASK] Add details to CLI scheduler:run exceptions
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Philipp Kitzberger +1
- Christian Kuhn +1
- Christoph Lehmann +1
-
Verified V +2 Done
- Garvin Hicking +2
- Philipp Kitzberger +1
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 1
Review log 3442
Show 1317 earlier messages
-
Philipp Kitzberger uploaded patch set 1 11/16/24, 10:34
-
core-ci voted on patch set 1 V +1 11/16/24, 10:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69524
-
Garvin Hicking commented on patch set 1 11/16/24, 12:01
This looks promising, thank you! IMO it could be labelled as a task and probably also go to 13.4... (couldn't review/test yet but added it to my list for next week unless someone gets to it first) -
Mathias Brodala commented on patch set 1 11/18/24, 07:32
SchedulerCommand.php:196This should be combined with the error message outputted afterwards. Said error should be the first thing to output since it's the most important bit. Debugging details can follow. But probably only if $this->io->isVerbose() or ->isDebug() -
Garvin Hicking commented on patch set 1 11/18/24, 07:38
SchedulerCommand.php:196ReplyGood idea on order of things, yes. I'd say though the error message itself without the context is really not helpful, I'd add these extra lines independent of verbose/debug. Or maybe make "title&class" be the fixed output context, and just "description" optional as this probably is least important? -
Philipp Kitzberger commented on patch set 1 11/18/24, 09:48
SchedulerCommand.php:196ReplyRather like this? https://forge.typo3.org/issues/100946#note-11 I wouldnt hide anything behind a verbosity/debug flag at all. In case a scheduler task fails and a mail is being sent, I as a webmaster, want the details right away. -
Benni Mack commented on patch set 1 11/18/24, 13:23
I'm fine adding this to 13.4 as well as a regular TASK. -
Garvin Hicking updated the commit message in patch set 2
V +111/18/24, 19:11 -
core-ci voted on patch set 2 V +1 11/18/24, 19:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69616
-
Garvin Hicking commented on patch set 2 11/18/24, 19:19
SchedulerCommand.php:196ReplyWould be fine by me; @mbrodala@pagemachine.de ? Alternate proposal: ``` [ERROR] boom Exception in scheduler task #3 (Execute console commands) Command: cleanup:previewlinks ``` (I relabelled this patch and added 13.4 as a target, hope that's fine with you all; if not, change it as you prefer 😊) -
Mathias Brodala commented on patch set 2 11/19/24, 08:07
SchedulerCommand.php:196ReplyYup, I'd prefer Garvins suggestion. This way the error keeps its primary position. And additional details follow. -
Philipp Kitzberger uploaded patch set 3
V +111/19/24, 09:05 -
core-ci voted on patch set 3 V -1 11/19/24, 09:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69673
-
Philipp Kitzberger uploaded patch set 4
V -111/19/24, 09:54 -
core-ci voted on patch set 4 V +1 11/19/24, 10:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69681
-
Mathias Brodala commented on patch set 4 CR -1 11/19/24, 10:54
SchedulerCommand.php:195Missing a space here.SchedulerCommand.php:195Since barely anybody still uses pre-*nix MacOS nowadays, this should be "\n" instead. But maybe better skip the description altogether since it probably doesn't help much. -
Philipp Kitzberger uploaded patch set 5
CR -1V +111/19/24, 10:56
-
Philipp Kitzberger commented on patch set 4 11/19/24, 10:57
SchedulerCommand.php:195ReplyDoneSchedulerCommand.php:195ReplyDone -
Mathias Brodala commented on patch set 5 11/19/24, 11:03
SchedulerCommand.php:194No need to implode(), ->error() accepts an array of messages natively. -
core-ci voted on patch set 5 V +1 11/19/24, 11:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69686
-
Mathias Brodala commented on patch set 6
V +111/19/24, 11:23Published edit on patch set 5. -
Mathias Brodala commented on patch set 6 11/19/24, 11:23
SchedulerCommand.php:194ReplyDoneSchedulerCommand.php:196ReplyDone -
core-ci voted on patch set 6 V +1 11/19/24, 11:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69692
-
Garvin Hicking commented on patch set 6 CR +1 V +1 11/19/24, 12:48
Thanks for streamlining this! -
Mathias Brodala voted on patch set 6 CR +1 11/19/24, 13:20
-
Christoph Lehmann commented on patch set 6 11/20/24, 07:45
SchedulerCommand.php:186Also add $e->getLine()and $e->getFile() ? -
Philipp Kitzberger commented on patch set 6 11/20/24, 15:25
SchedulerCommand.php:186ReplyYeah, good idea. I'm all for it. Any other opinions on that? [ERROR] Boom Exception in scheduler task #3 (Execute console commands) Command: cleanup:previewlinks File: /var/www/html/typo3/sysext/workspaces/Classes/Command/CleanupPreviewLinksCommand.php:67 -
Garvin Hicking commented on patch set 7
CR +1V +111/20/24, 16:47Published edit on patch set 6. -
core-ci voted on patch set 7 V +1 11/20/24, 16:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69818
-
Garvin Hicking commented on patch set 7 CR +1 V +1 11/20/24, 17:37
SchedulerCommand.php:186ReplyGood suggestion, thanks! The order is fine for me personally, I adjusted the patch accordingly. Note: For "native" scheduler tasks this reports the line/file properly. However, for "execute console commands", if no specific exceptions are involved, this will resolve to: ``` File: /var/www/html/typo3-core/typo3/sysext/scheduler/Classes/Scheduler.php:169 ``` because there we have: ``` if (!$successfullyExecuted) { throw new FailedExecutionException('Task failed to execute successfully. Class: ' . get_class($task) . ', UID: ' . $task->getTaskUid(), 1250596541); } ``` Thus, for a failed symfony console command the output would look like: ``` [ERROR] Task failed to execute successfully. Class: TYPO3\CMS\Scheduler\Task\ExecuteSchedulableCommandTask, UID: 28 Exception in scheduler task #28 (Execute console commands) Command: mailer:spool:send File: /var/www/html/typo3-core/typo3/sysext/scheduler/Classes/Scheduler.php:169 ``` Once a "native" exception is thrown in a symfony cli command (not just using the CLI `->error/warning()` methods) this would bubble through. That's fine by me and could be tackled by a follow-up (if at all). -
Christian Kuhn voted on patch set 7 CR +1 V +1 11/20/24, 19:38
-
Christoph Lehmann commented on patch set 7 11/20/24, 20:27
SchedulerCommand.php:186Reply> That's fine by me and could be tackled by a follow-up (if at all). For me tooSchedulerCommand.php:190Note: possibly sensitive Symfony command arguments would be send out per cron mail. Maybe just use $task->getCommandIdentifier() instead $task->getAdditionalInformation() -
Torben Hansen commented on patch set 7 CR -1 11/21/24, 14:32
SchedulerCommand.php:190ReplyThis is right and we should not send possible sensitive information via email (possibly not encrypted). -
Oliver Hader commented on patch set 7 CR -1 11/21/24, 14:32
SchedulerCommand.php:190ReplyGood suggestion by Christoph: Details/Configs (e.g. API keys, passwords, ...) should not be transmitted via e-mail. -
Garvin Hicking commented on patch set 8
CR +1V +111/21/24, 19:14Published edit on patch set 7. -
Garvin Hicking commented on patch set 8 CR +1 V +1 11/21/24, 19:15
SchedulerCommand.php:190ReplyThanks for the feedback, I've adjusted this accordingly. Let me know if there are further objections. -
core-ci voted on patch set 8 V +1 11/21/24, 19:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69979
-
Christoph Lehmann voted on patch set 8 CR +1 11/22/24, 12:12
-
Philipp Kitzberger voted on patch set 8 CR +1 V +1 11/22/24, 12:44
-
Christian Kuhn voted on patch set 8 CR +1 V +1 11/22/24, 13:56
-
Garvin Hicking voted on patch set 8 CR +2 V +2 11/22/24, 18:46
-
Garvin Hicking merged patch set 9 11/22/24, 18:56