Problem/Motivation

In update_calculate_project_update_status() docblock there is explanation of how recommended releases are determined.

*
 * - 1.6-bugfix <-- recommended version because 1.6 already exists.
 * - 1.6
 *
 * or
 *
 * - 1.6-beta
 * - 1.5 <-- recommended version because no 1.6 exists.
 * - 1.4
 *

In the example there is not special logic around the "bugfix" string just the extra string and whether the regular version comes before or after the version without the extra string at the end.

There is no test coverage for this. It was almost removed in #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates.

I also think this functionality will not work for core or contrib when starts to use semantic versioning. Will confirm this in a test only patch.
Currently core does not do this type of release so it hasn't been a problem.

Proposed resolution

Add tests
Confirm if work for both 8.x-1.0 style versions and semantic versions

Remaining tasks

all

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3105463

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tedbow created an issue. See original summary.

tedbow’s picture

Assigned: tedbow » Unassigned
Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new3.48 KB

Here is patch that removes the logic. I think this will pass all tests. Just proves the lack of test coverage.

This should cause the new tests to fail when they are written

Bumping to critical because I think this should get in before #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates which is critical

tedbow’s picture

StatusFileSize
new3.48 KB

drupalci fix

tedbow’s picture

StatusFileSize
new24.38 KB
new25.61 KB

here is test only patch for contrib and another patch with the tests plus the patch #3 to show that it cause a fail with proper test coverage

Status: Needs review » Needs work

The last submitted patch, 4: 3105463-4-tests-plus-3.patch, failed testing. View results

tedbow’s picture

Status: Needs work » Needs review
Related issues: +#3100386: Create contrib update module test cases that use semantic versioning
StatusFileSize
new22.14 KB
  1. ok the patches in #4 passed/failed as expected.

    3105463-4-tests-plus-3.patch proves what the new test coverage covers.

    Here is complete patch without the drupalci changes.

  2. Drupal core policy currently does not support this type of bugfix release. But we will need this type of test in #3100386: Create contrib update module test cases that use semantic versioning. I updated that issue.
tedbow’s picture

Issue summary: View changes
tedbow’s picture

tedbow’s picture

mpdonadio’s picture

+++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php
@@ -274,7 +274,7 @@ public function testNormalUpdateAvailable() {
+            if ($extra_version == '' || $extra_version === '-bugfix') {

Maybe update that there is nothing special about the string "bugfix"?

mpdonadio’s picture

Status: Needs review » Needs work
xjm’s picture

Issue tags: +beta target
xjm’s picture

Version: 8.9.x-dev » 8.8.x-dev
dww’s picture

Priority: Critical » Normal

I don't think this is at all critical. This is some weird edge-case stuff that doesn't really matter, given d.o release policy, tag/release mapping requirements, etc. I don't believe folks can actually create releases like this on d.o. I don't think this issue blocks anything, or is particularly urgent. Probably removing the code for this is more important than adding tests about it.

tim.plunkett’s picture

Issue tags: -beta target

Agreed with #14, untagging as well

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
tedbow’s picture

Version: 9.3.x-dev » 9.4.x-dev

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.