Review main Abandoned

74062[BUGFIX] Remove imagemin from 'grunt build' task

Jochen Roth CR 0 V 0 Easy +1 −1 updated 03/29/22, 19:10

Commit message

The 'grunt build' task includes the
'imagemin' task to compress images in
/Resources/Public/Icons/Flags.

This task is only required to run once
the images in that folder changed.

Therefore, this task is removed from
'grunt build'. Execution has to be
done manually with 'grunt imagemin'.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 1825

  1. Jochen Roth uploaded patch set 1 03/25/22, 15:29

  2. Jochen Roth uploaded patch set 2 03/25/22, 15:33

  3. Jochen Roth uploaded patch set 3 03/25/22, 15:37

  4. core-ci voted on patch set 2 V +1 03/25/22, 15:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25146

  5. core-ci voted on patch set 1 V -1 03/25/22, 15:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25145

  6. core-ci voted on patch set 3 V -1 03/25/22, 15:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25147

  7. Mathias Brodala commented on patch set 3 03/25/22, 16:54

    Gruntfile.js:923

    Is this necessary at all? The "imagemin" task should be available already.
  8. Jochen Roth uploaded patch set 4 03/28/22, 07:53

  9. Mathias Brodala commented on patch set 4 03/28/22, 07:58

    Gruntfile.js:923 Reply

    Done
  10. Jochen Roth uploaded patch set 5 03/28/22, 08:02

  11. core-ci voted on patch set 4 V -1 03/28/22, 08:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25198

  12. Jochen Roth rebased onto patch set 6 03/28/22, 08:15

  13. core-ci voted on patch set 5 V +1 03/28/22, 08:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25199

  14. core-ci voted on patch set 6 V +1 03/28/22, 08:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25200

  15. Oli Bartsch updated the commit message in patch set 7 03/28/22, 11:02

  16. Oli Bartsch commented on patch set 7 V +1 CR +1 03/28/22, 11:05

    ^
  17. Mathias Brodala voted on patch set 7 CR +1 03/28/22, 11:05

  18. core-ci voted on patch set 7 V +1 03/28/22, 11:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25209

  19. Benjamin Franzke commented on patch set 7 CR -1 03/28/22, 11:20

    Needs to be added as separate step to CI then, otherwise it's likely that we break or forget to run the task.
  20. Mathias Brodala commented on patch set 7 03/28/22, 12:44

    Reply

    Well, the point was to NOT have this run in the CI by default anymore since it wastes time and resources. Another option would be adjusting the GitLab pipeline to run this task selectively if there are changes in the mentioned directory. Then this job needs to fail if there are changes after running "grunt imagemin".
  21. Benjamin Franzke commented on patch set 7 03/28/22, 12:57

    Reply

    This intention is not mentioned – so I my guess is that the intention was to make `grunt build` faster for developers. ;) `grunt build` (in TYPO3 src) is primarly a developer tool, and that is secondarly *also* triggered on CI (only for verficiation). So changes to `grunt build` have the primary goal to change DX, and CI changes are a side-effect. So if CI changes are the intention then that needs to be mentioned in the commit message. Nevertheless CI should run all the commands, wasted resources is not an argument here. After all, our CI is all about wasting resources, in order to verify state.
  22. Oli Bartsch voted on patch set 7 V 0 CR 0 03/28/22, 15:01

  23. Stefan Bürk commented on patch set 7 CR -1 03/28/22, 16:04

    Reply

    Background to the error message: The used node package `imagemin-optipng`, which is a "plugin" for "optipng" tries to download the "optipng-bin" file, which failes. As the corresponding package is not installed, a "rebuild" is not triggerd (source missing). Thus the error. It sais that it cannot spawn the binary (because it's missing). I have done a quick check. If "zlib-dev" and "libpng-dev" are added as alpine packages and "optipng-bin" installed globally along with yarn in the "typo3/core-testing-js" image, the "Build/Scripts/runTests.sh -s checkGruntClean" works without error. I would say keeping this task (even if it needs some resources) will ensure that no non-optimized flags are added / changed in the future. Will have a talk with @lolli later about image change. If not installing "optipng-bin" globally in the image, we have to add it as package - but then the "Build/Scripts/runTests.sh -s checkGruntClean" will trigger a compile when download is not possible - which is a even furhter resource usage. Will discuss this with lolli. In the end - I would rather get this working again instead of removing "it".
  24. Stefan Bürk commented on patch set 7 03/28/22, 21:09

    Reply Unresolved

    Updated the image(s): ``` $ Build/Scripts/runTests.sh -u $ Build/Scripts/runTests.sh -s checkGruntClean ``` issue gone.
  25. Christian Kuhn abandoned the change 03/29/22, 19:10

    abandoned: this is fixed in the image now.