Review main Merged

56468[FEATURE] Use new REST API for update checks

Susi Moog CR +2 V +2 Expert +587 −623 updated 04/04/18, 09:26

Commit message

A new REST api for get.typo3.org was built and should be used
for update checks and additional information gathering.

With this patch the core upgrade and version service is refactored
to use the new API and an additional information in the system
informatian tool bar is displayed.

With the new API it would be possible to add change logs or
links to news for new versions easily in the future.

Additional info:
https://get.typo3.org/v1/api/doc

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Alexander Opitz +1
    • Andreas Kienast +1
  • Verified V +2
    • Stefan Neufeind +2
    • Alexander Opitz +1
    • TYPO3com +1 CI

Issues 1

Files 14

Review log 5470

Show 3345 earlier messages
  1. Susi Moog uploaded patch set 1 03/28/18, 11:51

  2. TYPO3com voted on patch set 1 V -1 03/28/18, 11:52 Completed build in 01m 22s on Wed, 28 Mar, 01:52 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21822

  3. Mathias Brodala commented on patch set 1 03/28/18, 12:06

    I know it's WIP but still some things I'd like to say.

    CoreVersionService.php:50

    Why this? The current state is/could be used for injection in unit tests.

    ext_localconf.php:95

    This should be renamed since it's obviously not a controller. ;-)
  4. Susi Moog commented on patch set 1 03/28/18, 12:27

    ext_localconf.php:95 Reply

    will do but copied the name from belog ;)
  5. Mathias Brodala commented on patch set 1 03/28/18, 12:28

    ext_localconf.php:95 Reply

    OK, then we have another location to fix, thanks for mentioning. ;-)
  6. Georg Ringer commented on patch set 1 03/28/18, 12:41

    SystemInformationController.php:2

    strict

    SystemInformationController.php:70

    should we translate that?

    CoreVersionService.php:23

    strict?
  7. Susi Moog commented on patch set 1 03/28/18, 12:54

    CoreVersionService.php:23 Reply

    may be breaking as the class is "older", will check.

    CoreVersionService.php:50 Reply

    because the registry is only used in deprecated methods.
  8. Mathias Brodala commented on patch set 1 03/28/18, 13:00

    CoreVersionService.php:50 Reply

    OK, then you at least need to put the result of the GU::makeInstance() call into $this->registry I guess.
  9. Susi Moog commented on patch set 1 03/28/18, 13:01

    CoreVersionService.php:50 Reply

    yes, noticed that while commenting ;) thanks.
  10. Susi Moog uploaded patch set 2 03/28/18, 14:32

  11. Susi Moog uploaded patch set 3 03/28/18, 14:40

  12. TYPO3com voted on patch set 2 V -1 03/28/18, 14:41 Completed build in 09m 30s on Wed, 28 Mar, 04:41 PM Test Summary: 30656 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21830

  13. Susi Moog commented on patch set 3 V -1 03/28/18, 14:43

    forgot the extension scanner (again :()
  14. Susi Moog uploaded patch set 4 03/28/18, 14:45

  15. Mathias Brodala commented on patch set 4 CR -1 03/28/18, 14:47

    On it.
  16. TYPO3com voted on patch set 3 V +1 03/28/18, 14:49 Completed build in 08m 44s on Wed, 28 Mar, 04:49 PM Test Summary: 30871 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21831

  17. TYPO3com voted on patch set 4 V +1 03/28/18, 14:54 Completed build in 08m 49s on Wed, 28 Mar, 04:54 PM Test Summary: 30871 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21832

  18. Mathias Brodala uploaded patch set 5 03/28/18, 15:06

  19. Mathias Brodala uploaded patch set 6 03/28/18, 15:08

  20. Mathias Brodala commented on patch set 6 03/28/18, 15:09

    locallang.xlf:74

    I opted to keep the old string to avoid unnecessary work for translators for a minimal change.
  21. TYPO3com voted on patch set 5 V -1 03/28/18, 15:15 Completed build in 08m 52s on Wed, 28 Mar, 05:15 PM Test Summary: 54 of 31023 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21834

  22. TYPO3com voted on patch set 6 V -1 03/28/18, 15:17 Completed build in 08m 14s on Wed, 28 Mar, 05:17 PM Test Summary: 54 of 31023 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21835

  23. Susi Moog commented on patch set 6 03/28/18, 15:25

    > (1 comment) That change actually was a semantic one. Whereas before it was only checked whether the latest version was a security update it is now also checked if any version between the current and latest was a security update.
  24. Mathias Brodala commented on patch set 6 03/29/18, 08:17

    > > (1 comment) > > That change actually was a semantic one. Whereas before it was only > checked whether the latest version was a security update it is now > also checked if any version between the current and latest was a > security update. Hm, what are you referring to? Gerrit didn't add my comment to your message. I also wonder what went wrong with the tests. All acceptance tests fail now but I cannot see the issue in the Bamboo artifacts.
  25. Susi Moog commented on patch set 6 03/29/18, 08:56

    will have a look at the bamboo thing. I was referring to the language file change - the 'this' vs 'the' thing had a reason ;)
  26. Mathias Brodala commented on patch set 6 03/29/18, 09:04

    > I was referring to the language file change - the 'this' vs 'the' > thing had a reason ;) OK, now I get what you mean. But personally in this case "this" and "the" doesn't make much difference to me. Maybe the whole sentence can be improved if we need to change it anyways. Something like this: > There is a new version of TYPO3 available which includes security fixes. The user doesn't and shouldn't really care if its the newest version which brings the fixes or any of the versions released in between.
  27. Susi Moog uploaded patch set 7 03/29/18, 09:17

  28. Susi Moog commented on patch set 7 03/29/18, 09:19

    changed the sentence again, let's see what bamboo tells us now (maybe the failing acceptance tests where just a glitch)
  29. TYPO3com voted on patch set 7 V -1 03/29/18, 09:25 Completed build in 08m 07s on Thu, 29 Mar, 11:25 AM Test Summary: 54 of 31023 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21844

  30. Stefan Neufeind uploaded patch set 8 03/30/18, 12:36

  31. Stefan Neufeind uploaded patch set 9 03/30/18, 12:37

  32. Stefan Neufeind commented on patch set 9 03/30/18, 12:38

    rebased
  33. TYPO3com voted on patch set 8 V -1 03/30/18, 12:45 Completed build in 08m 47s on Fri, 30 Mar, 02:45 PM Test Summary: 54 of 31062 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21878

  34. TYPO3com voted on patch set 9 V -1 03/30/18, 12:46 Completed build in 08m 28s on Fri, 30 Mar, 02:46 PM Test Summary: 54 of 31062 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21879

  35. Susi Moog uploaded patch set 10 04/02/18, 14:37

  36. TYPO3com voted on patch set 10 V +1 04/02/18, 14:46 Completed build in 08m 20s on Mon, 2 Apr, 04:46 PM Test Summary: 30915 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21913

  37. Susi Moog uploaded patch set 11 04/02/18, 15:49

  38. TYPO3com voted on patch set 11 V +1 04/02/18, 15:58 Completed build in 09m 15s on Mon, 2 Apr, 05:58 PM Test Summary: 30915 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21914

  39. Georg Ringer commented on patch set 11 04/03/18, 05:55

    CoreUpdateService.php:78

    why not change the property in typo3/cms-composer-installers to a const and use it here as well?

    CoreVersionServiceTest.php:41

    are we now using this, even though it is only for 7.1 and we try to be compatible with 7.0?
  40. Susi Moog commented on patch set 11 04/03/18, 06:18

    CoreVersionServiceTest.php:41 Reply

    see vote and discussion in core team channel some weeks ago, basically because of some composer dependencies we can't get lower than 7.1 anymore
  41. Susi Moog commented on patch set 11 04/03/18, 06:21

    CoreUpdateService.php:78 Reply

    I can't even find it in cms-composer-installers, but I would not want that kind of hidden dependency. As for setting it here and in coreversionservice - while pointing nearly to the same url, download and api url are two different things for me, that's why I'm using two vars.
  42. Mathias Brodala commented on patch set 12 04/03/18, 07:38

    Published edit on patch set 11.
  43. TYPO3com voted on patch set 12 V +1 04/03/18, 07:46 Completed build in 07m 58s on Tue, 3 Apr, 09:46 AM Test Summary: 30915 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21917

  44. Georg Ringer voted on patch set 12 V +1 CR +1 04/03/18, 08:31

  45. Andreas Kienast commented on patch set 12 04/03/18, 09:14

    Deprecation-84549-DeprecateMethodsInCoreVersionService.rst:14

    have been marked as

    CoreVersionService.php:43

    @deprecated in new line

    CoreVersionService.php:50

    I thought we disagreed on using root namespaces.
  1. Susi Moog commented on patch set 12 04/03/18, 09:55

    CoreVersionService.php:43 Reply Unresolved

    nope, as the parameter is deprecated, not the method ;)

    CoreVersionService.php:50 Reply Unresolved

    I thought we agreed on it doesn't matter ;) - but I can remove it if you want.
  2. Susi Moog commented on patch set 13 04/03/18, 09:55

    Published edit on patch set 12.
  3. Susi Moog commented on patch set 14 04/03/18, 09:55

    Published edit on patch set 13.
  4. Susi Moog commented on patch set 12 04/03/18, 09:56

    Deprecation-84549-DeprecateMethodsInCoreVersionService.rst:14 Reply Unresolved

    Done
  5. TYPO3com voted on patch set 13 V +1 04/03/18, 10:05 Completed build in 09m 31s on Tue, 3 Apr, 12:05 PM Test Summary: 30915 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21918

  6. TYPO3com voted on patch set 14 V +1 04/03/18, 10:06 Completed build in 10m 22s on Tue, 3 Apr, 12:06 PM Test Summary: 30915 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21919

  7. Frank Nägler voted on patch set 14 V +1 CR +1 04/03/18, 14:26

  8. Stefan Neufeind commented on patch set 14 V -1 04/03/18, 14:43

    tried to apply this on a fresh 9.1.0-install (to have a "released version" as base) and tried update-check in the backend. That gave me: "Unknown action method coreUpdateUpdateVersionMatrixAction in controller upgrade"
  9. Stefan Neufeind commented on patch set 14 04/03/18, 14:48

    seems to be still called from JS in typo3/sysext/install/Resources/Public/JavaScript/Modules/CoreUpdate.js
  10. Susi Moog uploaded patch set 15 04/03/18, 15:45

  11. Susi Moog commented on patch set 15 04/03/18, 15:46

    > seems to be still called from JS in typo3/sysext/install/Resources/Public/JavaScript/Modules/CoreUpdate.js good catch, "magic" call via data-action-attribute in fluid - wasn't found by my IDE, fixed now ;)
  12. Stefan Neufeind commented on patch set 15 V +1 04/03/18, 15:51

    update-check works for me now
  13. TYPO3com voted on patch set 15 V +1 04/03/18, 15:53 Completed build in 07m 39s on Tue, 3 Apr, 05:53 PM Test Summary: 30915 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21936

  14. Andreas Kienast commented on patch set 15 04/03/18, 18:31

    Hint: The current approach kills the "Your system is fully operational. Have a nice day" message. IMO that's not critical, maybe we even should drop that message as it's potentially misleading.
  15. Andreas Kienast voted on patch set 15 CR +1 04/03/18, 18:42

  16. Andreas Kienast rebased onto patch set 16 04/03/18, 19:08

  17. TYPO3com commented on patch set 16 04/03/18, 19:17 Completed build in 09m 45s on Tue, 3 Apr, 09:17 PM Test Summary: 30915 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21946

  18. Jigal van Hemert commented on patch set 16 04/03/18, 21:04

    CoreVersionService.php:47

    Nothing functional, but yoda notation?

    CoreVersionService.php:47

    Nothing functional, but yoda notation?

    Typo3VersionMessage.php:36

    Can we have an option to disable this check/message? If you actively monitor installations the time between the release and the moment they are deployed (perhaps waiting for approval by the client) user can spam the support system.

    Typo3VersionMessage.php:44

    yoda notation?

    Typo3VersionMessage.php:47

    If a previous version which is still younger than the current version is security relevant this message should also be shown.
  19. Susi Moog commented on patch set 16 04/04/18, 05:03

    Typo3VersionMessage.php:36 Reply

    Actually no, not as a separate option. If you need to disable the check you can just "un-register" the signal, but I would not make it any easier to disable the message, as I'd take the risk of multiple support tickets for the benefit of more secure installations any time. Creating an explicit option of disabling the check would also have the risk of people disabling the check not to be responsible ad called-out for timely updates.

    Typo3VersionMessage.php:44 Reply

    as far as I know we don't have any rules about that (and the pre-existing code uses both) - and I prefer that notation for simple type checks.

    Typo3VersionMessage.php:47 Reply

    and it will, as the check actually checks if any younger version is security relevant (if any is security relevant === update is security relevant)
  20. Susi Moog commented on patch set 16 04/04/18, 05:07

    > Hint: The current approach kills the "Your system is fully > operational. Have a nice day" message. IMO that's not critical, > maybe we even should drop that message as it's potentially > misleading. That's actually a flaw in the fluid rendering of that message, as it does not check message levels but handles "any" message as potential error (instead of those with error levels) - that would be a separate bug fix I guess.
  21. Alexander Opitz commented on patch set 16 CR +1 04/04/18, 08:09

    I'm fine with the yoda style and the fluid message should be handled as another issue (with adding issue number here as reference)
  22. Alexander Opitz voted on patch set 16 V +1 04/04/18, 08:43

  23. Stefan Neufeind voted on patch set 16 CR +1 04/04/18, 08:49

  24. Stefan Neufeind commented on patch set 16 V +2 CR +2 04/04/18, 09:26

    merged by request of Susi :-)
  25. Stefan Neufeind merged patch set 17 04/04/18, 09:26