72274[BUGFIX] Don't fail language:update command when translation missing
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- Benni Mack +1
-
Verified V +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- Benni Mack +1
- core-ci +1 CI
Issues 4
- Bug #95700CLI command language:update fails due to packages without translation packs
- Bug #96054Command "language:update" does not log error on missing translations
- Feature #96055Let the command "language:update" issue warnings
- Bug #96053Command "language:update" succeeds on missing translations but fails without progress
Files 2
Review log 3141
Show 1116 earlier messages
-
Jochen Roth uploaded patch set 1 11/23/21, 13:59
-
Jochen Roth marked it work in progress 11/23/21, 14:01
-
Mathias Brodala commented on patch set 1 11/23/21, 14:08
I know it's WIP but you surely want to add 11.5 here. ;-) -
core-ci voted on patch set 1 V +1 11/23/21, 14:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19678
-
Jochen Roth uploaded patch set 2 11/23/21, 14:56
-
core-ci voted on patch set 2 V +1 11/23/21, 15:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19679
-
Jochen Roth uploaded patch set 3 11/23/21, 16:16
-
Jochen Roth updated the commit message in patch set 4 11/23/21, 16:19
-
core-ci voted on patch set 3 V +1 11/23/21, 16:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19683
-
core-ci voted on patch set 4 V +1 11/23/21, 16:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19684
-
Jochen Roth uploaded patch set 5 11/24/21, 09:09
-
Jochen Roth marked it ready for review 11/24/21, 09:10
-
Jochen Roth commented on patch set 5 11/24/21, 09:10
Reply
Yep, sure ... sorry need to adjust mit commit msg template ;-) -
Mathias Brodala commented on patch set 5 11/24/21, 09:18
I love all the fixes but personally I'd recommend to do a separate change for every issue. That's the point why I've created multiple issues. ;-)LanguagePackCommand.php:29This not an option AFAIS since typo3/cms-install does not depend on typo3/cms-extensionmanager.LanguagePackCommand.php:147You can simply "return 1" here with an error message before. No need to have an exception on CLI. -
core-ci voted on patch set 5 V -1 11/24/21, 09:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19695
-
Jochen Roth uploaded patch set 6 11/24/21, 10:52
-
core-ci voted on patch set 6 V +1 11/24/21, 11:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19696
-
Jochen Roth uploaded patch set 7 11/24/21, 12:22
-
Jochen Roth commented on patch set 7 11/24/21, 12:23
Reply
Yep, i totally understand that. But it was almost done with very few code changes. Otherwise patch would depend on the other which would make things unnecessarily complicated in this case. 😊LanguagePackCommand.php:29ReplyAckLanguagePackCommand.php:147ReplyAck -
core-ci voted on patch set 7 V +1 11/24/21, 12:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19697
-
Mathias Brodala commented on patch set 7 11/25/21, 08:00
Reply
Ack -
Mathias Brodala commented on patch set 7 CR -1 11/25/21, 08:02
LanguagePackCommand.php:99We should add a "$status = 0" here ...LanguagePackCommand.php:133IMO we should drop this here, the message should always be outputted.LanguagePackCommand.php:149... set "$status = 1" here ...LanguagePackCommand.php:161... and "return $status" here. -
Benni Mack commented on patch set 7 11/25/21, 08:24
LanguagePackCommand.php:68is "fail" really a common flag/option? isn't "--failure-on-error" more appropriate? -
Mathias Brodala commented on patch set 7 11/25/21, 08:34
LanguagePackCommand.php:68ReplyDo you have "popular" examples? The only other one I am aware of currently is "--fail-on-warnings" here: https://github.com/martin-helmich/typo3-typoscript-lint/blob/667eb63e1639b9fd726f72d1825be09ecfbdbb95/src/Command/LintCommand.php#L80 -
Jochen Roth uploaded patch set 8 11/25/21, 09:52
-
Jochen Roth commented on patch set 8 11/25/21, 09:53
LanguagePackCommand.php:68ReplyYep, 'fail-on-warnings' is now used because it throws only warnings now and does not switch visual warnings to errors when `--fail` was set. I went for --fail-on-warnings as a option name because it describes perfectly what i'm doing now. Without the option warnings are thrown but the command will not fail. `fail-on-warnings` will cause the command to fail.LanguagePackCommand.php:99Reply$hasErrors contained the status, so i renamed this to $status and added it here.LanguagePackCommand.php:99ReplyAckLanguagePackCommand.php:133ReplyDoneLanguagePackCommand.php:149ReplyAckLanguagePackCommand.php:149ReplyAckLanguagePackCommand.php:161ReplyAckLanguagePackCommand.php:161ReplyAck -
core-ci voted on patch set 8 V +1 11/25/21, 10:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19724
-
Benni Mack commented on patch set 8 11/25/21, 10:27
Found this: https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html "ignore-errors" Browsing through common CLI commands I use on a daily basis, I did not find any such option actually :) "--ignore", "--skip" or "--prefer" is quite common though in the naming prefixes for options etc -
Mathias Brodala commented on patch set 8 11/25/21, 11:24
Reply
That sounds like it perfectly makes sense if errors/warnings are a deal-breaker for a command. In our case however it's perfectly fine to have the command succeed even if there are warnings. So I'd vote for making the failure mode optional as suggested ATM. -
Mathias Brodala voted on patch set 8 CR +1 11/25/21, 11:25
-
Benni Mack voted on patch set 8 CR +1 11/26/21, 22:47
-
Benni Mack updated the commit message in patch set 9 11/27/21, 12:38
-
Benni Mack updated the commit message in patch set 10 11/27/21, 12:38
-
Benni Mack commented on patch set 10 V +1 CR +1 11/27/21, 12:42
LanguagePackCommand.php:68ReplyAck -
core-ci voted on patch set 9 V +1 11/27/21, 12:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19851
-
core-ci voted on patch set 10 V +1 11/27/21, 12:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19852
-
Stefan Bürk voted on patch set 10 V +1 CR +1 11/27/21, 13:15
-
Andreas Kienast commented on patch set 10 11/27/21, 13:21
LanguagePackService.php:250Didn't Guzzle throw exceptions on every status code >= 400? -
Stefan Bürk commented on patch set 10 11/27/21, 14:27
LanguagePackService.php:250ReplyYes, unless you use the option 'http_errors' => false, which will disable throwing these exceptions. Which has been added in line 251. See: https://docs.guzzlephp.org/en/stable/request-options.html#http-errors -
Christian Kuhn commented on patch set 10 V +2 CR +2 11/27/21, 22:02
LanguagePackService.php:250ReplyDoneLanguagePackService.php:275+1 for dropping catch \exception! -
Christian Kuhn merged patch set 11 11/27/21, 22:02