Skip to content
Snippets Groups Projects

Issue #3227518: Never show a "Not supported!" version as "Recommended"

Closed Kunal Sachdev requested to merge issue/drupal-3227518:3227518-never-show-a into 9.5.x

Merge request reports

Approval is optional

Closed by quietonequietone 1 year ago (Mar 30, 2024 1:42am UTC)

Merge details

  • The changes were not merged into 9.5.x.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 This XML file is the exact same as the file drupal.1.xml except
4 'supported_branches' in this file does not contain the '8.0.' branch. Therefore,
5 all the releases that start with '8.0.' are in an unsupported branch.
  • Comment on lines +3 to +5

    Need to change this comment

  • I did a comparison between this file and drupal.1.xml. drupal.1.xml at least also has Drupal 8.2.0 release so maybe that should be added here? There might be other differences. If the intention of this issue is the supported_branches is the only difference lets update this file so that is true

  • Please register or sign in to reply
  • 1 <?xml version="1.0" encoding="utf-8"?>
    2 <!--
    3 This XML file is the exact same as the file semver_test.1.xml except
    4 'supported_branches' in this file does not contain the '8.0.' branch. Therefore,
    5 all the releases that start with '8.0.' are in an unsupported branch.
  • Kunal Sachdev added 2 commits

    added 2 commits

    Compare with previous version

  • Kunal Sachdev added 3 commits

    added 3 commits

    • ead2e8ce - added new variable to determine the release is supported
    • c45fdf23 - changed drupalci to test only functional tests in update module
    • d831c763 - corrected testgroups in drupalci file

    Compare with previous version

  • Ted Bowman
  • 248 248 $this->assertUpdateTableTextContains($unsupported_version);
    249 249 $this->assertUpdateTableElementContains('error.svg');
    250 250 $this->assertUpdateTableTextContains('Release not supported: Your currently installed release is now unsupported, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!');
    251 $this->assertVersionUpdateLinks($new_version_label, $newer_version);
    251 if ($newer_version !== NULL) {
    • Suggested change
      217 if ($newer_version !== NULL) {
      217 if ($newer_version) {

      Surely we don't want to try and confirm the update version links if $newer_version is an empty string?

    • Since NULL is the default value for this parameter in the this assert then if this value not NULL then we intentionally sent a value in to be tested. This is always a literal string from a test case never user input. So I think if we have anything beside the default value we should pass that onto assertVersionUpdateLinks().

      If we want to change anything here I think it would be in the else to have

      $this->assertNotEmpty($newer_version);

      Because that would problem in the test logic

    • Why we would add $this->assertNotEmpty($newer_version); in else?

      Edited by Kunal Sachdev
    • I think it should be in if

    • @kunal.sachdev yes I think you are correct.

    • Please register or sign in to reply
  • Kunal Sachdev added 43 commits

    added 43 commits

    • d831c763...afc5a87e - 40 commits from branch project:9.3.x
    • 8948b513 - Merge branch '9.3.x' into 3227518-never-show-a
    • b151c1a2 - reverted changes in the drupalci file
    • 298cc5a6 - changed the error message according to the conditions

    Compare with previous version

  • Kunal Sachdev added 1 commit

    added 1 commit

    Compare with previous version

  • Kunal Sachdev added 1 commit

    added 1 commit

    Compare with previous version

  • Kunal Sachdev added 1 commit

    added 1 commit

    • 9ea36272 - added condition for checking also available version

    Compare with previous version

  • Kunal Sachdev added 9 commits

    added 9 commits

    • 9ea36272...59d8ab1f - 7 commits from branch project:9.3.x
    • 39960219 - Merge branch '9.3.x' into 3227518-never-show-a
    • 55cd579f - added test coverage for the also available case

    Compare with previous version

  • Kunal Sachdev added 1 commit

    added 1 commit

    Compare with previous version

  • Kunal Sachdev added 1 commit

    added 1 commit

    • 33f1a9f1 - changed order of release in fixture

    Compare with previous version

  • Ted Bowman added 1 commit

    added 1 commit

    • a5a00051 - Revert "changed order of release in fixture"

    Compare with previous version

  • Ted Bowman added 27 commits

    added 27 commits

    • a5a00051...81690f84 - 12 commits from branch project:9.3.x
    • d2d94d41 - added test coverage to prove that this problem currently exists
    • bd732733 - added comment for the new test coverage
    • abc24758 - phpcbf
    • ecc5a99f - added new variable to determine the release is supported
    • b35427a8 - changed drupalci to test only functional tests in update module
    • 970cb189 - corrected testgroups in drupalci file
    • 041eec54 - reverted changes in the drupalci file
    • 3e15e4d8 - changed the error message according to the conditions
    • bfeb3c78 - phpcbf
    • b509db38 - reverted drupalci.yml
    • 9609d239 - added condition for checking also available version
    • 0bfa530b - added test coverage for the also available case
    • 23d790c4 - phpcbf
    • 56f6d8bf - changed order of release in fixture
    • 61d65918 - Revert "changed order of release in fixture"

    Compare with previous version

  • Ted Bowman
  • 430 430 $this->standardTests();
    431 431 $this->confirmUnsupportedStatus('8.0.3', '8.1.0', 'Recommended version:');
    432 432 }
    433 // Test when the newest branch is unsupported and no update is available.
    434 foreach (['8.1.0', '8.1.0-beta1'] as $installed) {
    435 $this->setProjectInstalledVersion($installed);
    436 $this->refreshUpdateStatus([$this->updateProject => '1.1-unsupported']);
    437 $this->standardTests();
    438 $this->confirmUnsupportedStatus($installed);
    439 }
    440 // Test when the current version is unsupported and the recommended version is supported and there is also an available version
    441 $this->setProjectInstalledVersion('8.0.3');
    442 $this->refreshUpdateStatus([$this->updateProject => '1.0-supported']);
    443 $this->standardTests();
    444 $this->confirmUnsupportedStatus('8.0.3', '8.1.0', 'Recommended version:');
    445 $this->confirmUnsupportedStatus('8.0.3', '8.2.0', 'Also available:');
    • I may have suggested this but it was because I forgot that the update module only uses "Also available:" for next majors not next minors. It will always recommend the last secure & supported version in the major as "Recommended version:". So we probably should remove the 8.2.0 release from semver_test.1.0-supported.xml and the drupal version of the XML which is missing currently.

      This is going a problem for the Automatic Updates module because in this test case the MVP of the Automatic Updates module will not support jumping a minor.

    • changed this line in version 13 of the diff

    • Please register or sign in to reply
  • Kunal Sachdev added 20 commits

    added 20 commits

    • d06a9d08 - added test coverage to prove that this problem currently exists
    • 0171113b - added comment for the new test coverage
    • 408d7b3d - phpcbf
    • ead2e8ce - added new variable to determine the release is supported
    • c45fdf23 - changed drupalci to test only functional tests in update module
    • d831c763 - corrected testgroups in drupalci file
    • 8948b513 - Merge branch '9.3.x' into 3227518-never-show-a
    • b151c1a2 - reverted changes in the drupalci file
    • 298cc5a6 - changed the error message according to the conditions
    • a9de5ab2 - phpcbf
    • 8930855f - reverted drupalci.yml
    • 9ea36272 - added condition for checking also available version
    • 39960219 - Merge branch '9.3.x' into 3227518-never-show-a
    • 55cd579f - added test coverage for the also available case
    • be754446 - phpcbf
    • 33f1a9f1 - changed order of release in fixture
    • 04c37ada - Merge branch '9.3.x' into 3227518-never-show-a
    • e9d67d0e - merge conflict resolved
    • ef4605b9 - Merge branch '3227518-never-show-a' of git.drupal.org:issue/drupal-3227518...
    • 98d94076 - added test to show the current logic is broken

    Compare with previous version

  • 431 431 $this->confirmUnsupportedStatus('8.0.3', '8.1.0', 'Recommended version:');
    432 432 }
    433 // Test when the newest branch is unsupported and no update is available.
    434 foreach (['8.1.0', '8.1.0-beta1'] as $installed) {
    435 $this->setProjectInstalledVersion($installed);
    436 $this->refreshUpdateStatus([$this->updateProject => '1.1-unsupported']);
    437 $this->standardTests();
    438 $this->confirmUnsupportedStatus($installed);
    439 }
    440 $this->setProjectInstalledVersion('8.0.3');
    441 $this->refreshUpdateStatus([$this->updateProject => '1.0-supported']);
    442 $this->standardTests();
    443 // This shows how the logic is currently broken as it skips all the releases
    444 // between 8.0.3 and 10.0.0.
    445 $this->confirmUnsupportedStatus('8.0.3', '10.0.0', 'Recommended version:');
    446 $this->assertUpdateTableTextNotContains('Also available');
  • Kunal Sachdev added 1 commit

    added 1 commit

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading