Problem/Motivation

Noticed by @webchick when on 9.0.x
available updates screenshot recommending 9.1.x release

This is because there is no new release newer than the dev release the user is currently on. At the time this was found there was no 9.x releases at all except dev snapshots. In this case the dev snapshot should not have been recommended because it is not in a supported branch.

Proposed resolution

Never recommend a release, dev snapshot or others, that is not in a recommend branch.

This will stop 9.1.x-dev snapshot from being recommended. It does not mean that a dev snapshot will never be recommended if it is in a supported branch and there are no other releases to recommend. This much more likely to happen contrib than it is in core.

This solution is the not the full solution to #3100115: The update module should recommend updates based on supported_branches rather than major versions majors because the user would still be shown and recommend the most recent full release in major and not a support branch.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

Comments

tedbow created an issue. See original summary.

tedbow’s picture

Status: Active » Needs review
StatusFileSize
new882 bytes

Let's see if we have explicit test coverage that expects the current behavior

dww’s picture

I'm pretty sure webchick was on a git checkout. That's why it says "Unknown release date". Update module has (by design) never been able to work from raw checkouts (neither CVS nor Git). It was deemed too much complication to add support for those directly into core, considered a developer-only-workflow to deploy from checkouts, and punted to contrib (cvs_deploy and git_deploy respectively). If you use a tarball, the packaging system injects the info it needs to work properly.

Tempted to call this "works as designed", not a bug.

If we've changed our minds about any of the above, then we need to re-scope this issue into a "Move git_deploy into core" style issue/plan.

Furthermore, I don't think this is a bug. If you're on a dev snapshot tarball, and the only newer release than what you have is another -dev release, Update module should tell you when newer -dev snapshots are available. That's its job. ;)

So, what's it gonna be? I see 3 ways forward:

A) Close this as a works-as-designed support request.

B) Move git_deploy into core.

C) Continue to debate the pros/cons of putting a band-aid on this by adding logic to Update to prevent it from giving you accurate information if you're on the bleeding edge of core development and the only newer update it has to offer is another -dev snapshot.

Cheers,
-Derek

tedbow’s picture

A) Close this as a works-as-designed support request.

I agree this might be the best answer. If so I think we should then repurpose this issue to just add test coverage for the expected behavior. I think #2 passing shows we don't have test coverage for this "design".

webchick’s picture

a) Yes, I was on a git clone.
b) Regardless, however, 9.1.x-dev is not a viable target. It's purely a placeholder for us to point issues to. (Though it will be a viable target in a few months.)

Expected behaviour though IMO would be to recommend 9.0.x-dev in this case. Regardless if it's an unknown core version or not, it doesn't seem like we should be recommending leaping ahead a minor version only to get the same level of stability.

webchick’s picture

StatusFileSize
new92.84 KB

Confirmed this release is marked unsupported on D.o:

Drupal core release table

Therefore, there's no reason 9.1.x should ever be shown in Update Status, let alone as "recommended." I think this is an actual problem, albeit one likely to affect very few people in practice (hopefully).

@Mixologic pointed out that the feed at https://updates.drupal.org/release-history/drupal/current includes this element:

<supported_branches>8.7.,8.8.,8.9.,9.0.</supported_branches>

The bug IMO is that Update Status needs to cross-check that what it's recommending appears in that list.

webchick’s picture

Title: A dev release will be recommended if there is no other recommended release » In case of unknown version/git clone, Update Status recommends the latest release, even if it is unsupported

Maybe a better title?

tedbow’s picture

Title: In case of unknown version/git clone, Update Status recommends the latest release, even if it is unsupported » In case of no recommended update is found Update Status recommends the latest release, even if it is unsupported
StatusFileSize
new797 bytes
new838 bytes

Here I think is the correct fix

we shouldn't recommend it if it is not in a supported branch

tedbow’s picture

StatusFileSize
new873 bytes
new1.42 KB

There is only 2 places we set $project_data['recommended'] lets add this check there too.

Status: Needs review » Needs work

The last submitted patch, 9: 3111929-9.patch, failed testing. View results

tedbow’s picture

Status: Needs work » Needs review
Related issues: +#3110917: [meta] Fix update XML fixtures bad data
StatusFileSize
new767 bytes
new2.17 KB

The test failed because the xml core/modules/update/tests/modules/update_test/aaa_update_test.8.x-1.2.xml did not have supported_branches.

Originally the test passed because of

  else {
    // Malformed XML file? Stick with the current branch.
    $target_major = $existing_major;
  }

So since supported_branches wasn't set we hit this fallback.

Other XML test fixtures are malformed some for a long time a few from recent changes. I opened #3110917: [meta] Fix update XML fixtures bad data recently

tedbow’s picture

Running #11 on 8.9.x too. It should pass and be committed to each branch

tedbow’s picture

The issue needs to update. The real problem is recommended a non-supported branch. Besides the dev problem this won't be problem for core. It won't be problem for contrib until Semantic releases

tedbow’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update +Needs tests

removing this from the summary but if someone this is important than we should open another issue.

Decide if this is actually ever valid recommendation.
For instance:

  1. There is contrib module and there is 8.x-1.x branch but no releases on the branch
  2. The developer realizes the approach is wrong and starts a 8.x-2.x branch(maybe people are using 8.x-1.x and was asked to keep it for them)
  3. The developer hasn't released any releases on 8.x-2.x releases either

In this case should 8.x-2.x-dev actually be recommended? Otherwise how the developer know that there is a 8.x-2.x branch at all. Maybe they would continue to use 8.x-1.x-dev and write custom code against it's API waiting for the 8.x-1.0 release.

It seems in that case maybe 8.x-2.x should be "also available"

tedbow’s picture

  1. Added 2 other checks for $is_in_supported_branch() when update_calculate_project_update_status() is setting the latest_version and setting dev_version. We should not be showing any download links to versions that are unsupported branches.

    For instance in core currently https://updates.drupal.org/release-history/drupal/current
    <supported_branches>8.7.,8.8.,8.9.,9.0.</supported_branches>
    So our future development branches are considered supported.

  2. I updated the XMLtest fixtures that \Drupal\Tests\update\Functional\UpdateCoreTest::testNormalUpdateAvailable() uses for the cases where the expected recommend release is in the 8.0.x minor branch. I added an extra release in the 8.1.x branch.

    For some reason(probably my copy/paste error in #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates) in the XML it previously had <supported_branches>8.0.,8.1.</supported_branches> even there are no 8.1.x releases in the XML. I remove move 8.1.

    Therefore the add 8.1.0 release should be ignored by the test because it is not in a support branch.

  3. I also updated the XML test fixtures for \Drupal\Tests\update\Functional\UpdateContribTest::testNormalUpdateAvailable that expect a 8.x-1.x release and added 8.x-2.x release. It should also be ignored.
  4. I am adding
tedbow’s picture

StatusFileSize
new4.06 KB
new18.89 KB

Here is simpler change. It just tests each release to see if it is in a supported branch if it is not then it goes to the next release.

The last submitted patch, 15: 3111929-15-no-fix-FAIL.patch, failed testing. View results

tedbow’s picture

Issue summary: View changes
tedbow’s picture

Priority: Normal » Major
Issue summary: View changes

changing to critical because the problem involves the user seeing downloads that aren't in supported branches.

This solution is the not the full solution to #3100115: The update module should recommend updates based on supported_branches rather than major versions majors because the user would still be shown and recommend the most recent full release in major and not a support branch. But I believe this issue is the critical part of #3100115

tim.plunkett’s picture

Status: Needs review » Needs work

Nice to see #3110917: [meta] Fix update XML fixtures bad data opened. It's always scary to be operating with bad fixtures 😬

Just one minor question, the new approach in #16 is very straightforward. Still needs tests though. NW for that.

  1. +++ b/core/modules/update/update.compare.inc
    @@ -343,6 +343,12 @@ function update_calculate_project_update_status(&$project_data, $available) {
       foreach ($available['releases'] as $version => $release) {
    +    if (!$is_in_supported_branch($version)) {
    
    @@ -392,14 +398,12 @@ function update_calculate_project_update_status(&$project_data, $available) {
    -      if ($is_in_supported_branch($release['version'])) {
    

    Is there a difference between $version and $release['version']?

    Or is this similar to iterating over an array of entities, and choosing between the array key or $entity->id()?

tedbow’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new30.4 KB
new30.04 KB
new30.19 KB

@tim.plunkett thanks for the review

  1. Still needs tests though. NW for that.

    +++ b/core/modules/update/tests/modules/update_test/drupal.0.0-alpha1.xml
    @@ -3,13 +3,27 @@
    +  <release>
    +    <!-- This release is not in a supported branch; therefore it should not be recommended. -->
    +    <name>Drupal 8.1.0</name>
    +    <version>8.1.0</version>
    +    <tag>DRUPAL-8-1-0</tag>
    +    <status>published</status>
    +    <release_link>http://example.com/drupal-8-1-0-release</release_link>
    +    <download_link>http://example.com/drupal-8-1-0.tar.gz</download_link>
    +    <date>1250425521</date>
    +    <terms>
    +      <term><name>Release type</name><value>New features</value></term>
    +      <term><name>Release type</name><value>Bug fixes</value></term>
    +    </terms>
    + </release>
    

    So by adding this new release which is not in supported branch it adds test coverage that this release is ignored in \Drupal\Tests\update\Functional\UpdateCoreTest::testNormalUpdateAvailable()

    This is what I was trying to explain in #15.2 but obviously this is not super clear. I thought about just adding a comment about this but I think it is clearer to assert the release is name is nowhere on the page.

    I switched this 8.2.0 which is also not in a supported branch and would be recommended if it were in a supported branch since it is most recent release for the major.

    Also because 8.2.0 is newer than all expected release in testNormalUpdateAvailable it can be added to all the fixtures used by this test method.

    In addition I am adding an explicit assert and comment to explained why this is not being shown on the available updates.

    // The XML test fixtures for this method all contain the '8.2.0' release
    // but because '8.2.0' is not in a supported branch it will not be in
    // the available updates.
    $this->assertNoRaw('8.2.0');
    

    I did the same for the contrib version.

  2. +++ b/core/modules/update/tests/modules/update_test/drupal.0.0-alpha1.xml
    @@ -3,13 +3,27 @@
    +  <release>
    +    <!-- This release is not in a supported branch; therefore it should not be recommended. -->
    +    <name>Drupal 8.1.0</name>
    +    <version>8.1.0</version>
    +    <tag>DRUPAL-8-1-0</tag>
    +    <status>published</status>
    +    <release_link>http://example.com/drupal-8-1-0-release</release_link>
    +    <download_link>http://example.com/drupal-8-1-0.tar.gz</download_link>
    +    <date>1250425521</date>
    +    <terms>
    +      <term><name>Release type</name><value>New features</value></term>
    +      <term><name>Release type</name><value>Bug fixes</value></term>
    +    </terms>
    + </release>
    

    So by adding this new release which is not in supported branch it adds test coverage that this release is ignored in \Drupal\Tests\update\Functional\UpdateCoreTest::testNormalUpdateAvailable()

    This is what I was trying to explain in #15.2 but obviously this is not super clear. I thought about just adding a comment about this but I think it is clearer to assert the release is name is nowhere on the page.

    I switched this 8.2.0 which is also not in a supported branch and would be recommended if it were in a supported branch since it is most recent release for the major.

    Also because 8.2.0 is newer than all expected release in testNormalUpdateAvailable it can be added to all the fixtures used by this test method.

    In addition I am adding an explicit assert and comment to explained why this is not being shown on the available updates.

    // The XML test fixtures for this method all contain the '8.2.0' release
    // but because '8.2.0' is not in a supported branch it will not be in
    // the available updates.
    $this->assertNoRaw('8.2.0');
    

    I did the same for the contrib version.

    In addition I added the same assert and comment to \Drupal\Tests\update\Functional\UpdateCoreTest::testNoUpdatesAvailable() which uses these same XML fixtures. Because this is asserting that there no available updates and 8.2.0 is newer than all test installed versions I think this is even more clear that 8.2.0 is being skipped because it is in an unsupported branch.

  3. 3111929-15-no-fix-FAIL.patch I was attempting to show with the fix the release in the unsupported branch would be recommend.

    I will upload new test-only patch and with the new assert it should be clearer because the core tests will fail on the 2 new assert statements.

    The contrib version will not fail in test-only version because supported branches don't specify a minor.

  4. +++ b/core/modules/update/tests/modules/update_test/drupal.0.0.xml
    @@ -3,13 +3,27 @@
    -<supported_branches>8.0.,8.1.</supported_branches>
    +<supported_branches>8.0.</supported_branches>
    

    Since we are now using the 8.2.0 release we no longer have to change these lines.

    I commented in #3110917-3: [meta] Fix update XML fixtures bad data that we really don't need 8.1. here.

  5. Is there a difference between $version and $release['version']?

    No difference the releases array is keyed by version number and they contain the same in the version key.

    But I will change this to use $release['version'] because this comes more directly from the XML.

The last submitted patch, 21: 3111929-21-test-only-FAIL.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 21: 3111929-21.patch, failed testing. View results

tedbow’s picture

ok #21 was an unexpected fail but not because of problem with this patch with the commit in #3096078: Display core compatibility ranges for available module updates

The test that failed here Drupal\Tests\update\Functional\UpdateContribTest::testCoreCompatibilityMessage() also uses the some of the core XML test fixtures that have been update.
Basically it tests that a contrib module will display the core compatibility range

This module is compatible with Drupal core: 8.0.0 to 8.1.1

But because 8.2.0 was added it now shows

This module is compatible with Drupal core: 8.0.0 to 8.2.0

But actually because we are looking at the available updates 8.2.0 should have been ignored here also. So it was problem in #3096078 it didn't ignore it. I will comment on that issue.

tedbow’s picture

Status: Needs work » Needs review
StatusFileSize
new14.87 KB
new33.68 KB
  1. fixing the fail explained in #24

    I made duplicates of the drupal.1.1.*.xml files that are also used in \Drupal\Tests\update\Functional\UpdateContribTest::testCoreCompatibilityMessage()
    in the copies I didn't add the 8.2.0 release that was adding in this issue. I added a @todo to remove this files in #3112962: Core compatibility messages on contrib available updates should consider supported branches

  2. re #26 I don't think it is a duplicate of #310011: Accessing cron.php from localhost. In that issue we still need to determine what is the 'recommended' release

    Basically the problem for core in that issue is:

    1. a site is on 9.0.0
    2. there is a release 9.0.1
    3. there is also a release 9.1.1.
    4. Currently the recommended release will be 9.1.1
    5. If want to recommend that latest in the current branch we would also recommend 9.0.1

    I think #310011 could be tricker than this issue it might need wording changes and discussion as to whether the above behavior is also correct for contrib once it is using semantic versioning.

    So hopefully we can get this issue sooner and make that issue smaller.

catch’s picture

Priority: Major » Critical
Issue tags: +Drupal 9.0.0-beta1 requirement

After discussion with webchick and xjm, bumping this to critical and beta blocking.

I think this issue resolves the beta-blocking part of #3100115: The update module should recommend updates based on supported_branches rather than major versions majors (it would still be critical just not block the beta), but please confirm either way.

tedbow’s picture

StatusFileSize
new1.73 KB
new33.16 KB
  1. +++ b/core/modules/update/tests/src/Functional/UpdateCoreTest.php
    @@ -62,6 +62,11 @@ protected function setSystemInfo($version) {
    +   * The XML fixtures for this method with expected releases in the '8.0.'
    +   * branch have only '8.0.' set for 'supported_branches'. These fixtures also
    +   * contain the '8.1.0' release but because '8.1.0' is not in a supported
    +   * branch it will not be in the available updates.
    

    This comment is now wrong because now all the XML fixtures have the have new 8.2.0 release

    Removing this comment because now there is comment before the new assert that explains this.

  2. +++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php
    @@ -564,18 +568,21 @@ public function testCoreCompatibilityMessage() {
    + // delight the '*-core_compatibility.xml' files in suffix in

    'delete' not 'delight' 😂

  3. re #28. yes I think this issue can be beta blocking and #3100115: The update module should recommend updates based on supported_branches rather than major versions majors. Once this issue is fixed then we won't recommend releases in unsupported branches.

tim.plunkett’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

The explanation in #21 was very helpful, thanks @tedbow

Changes in #29 are straightforward.

Sufficient test coverage now, and it's much clearer. Also there are @todos pointing to the right places for the future.

I'm calling this RTBC!

dww’s picture

Status: Reviewed & tested by the community » Needs work

Sorry I was away for a while from this issue. Sorry I brushed it off as "by design".

However, this isn't RTBC. Reviewing the patch in order, I first have a few questions about the test fixture changes, but then the final point is possibly a deal-breaker for this whole approach.

  1. +++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_0.xml
    @@ -10,6 +10,20 @@
    +    <tag>DRUPAL-8--3-0</tag>
    
    +++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_1-alpha1.xml
    @@ -10,6 +10,20 @@
    +      <tag>DRUPAL-8--3-0</tag>
    

    Maybe it doesn't matter, but tags haven't looked like this since the CVS days. Seems like if we want accurate test fixtures, we should use accurate tag values.

    https://updates.drupal.org/release-history/token/current

    <releases>
    <release>
    <name>token 8.x-1.6</name>
    <version>8.x-1.6</version>
    <tag>8.x-1.6</tag>
    <status>published</status>
    <release_link>
    https://www.drupal.org/project/token/releases/8.x-1.6
    </release_link>
    <download_link>
    https://ftp.drupal.org/files/projects/token-8.x-1.6.tar.gz
    </download_link>
    <date>1577708583</date>
    ...
    
  2. +++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_0.xml
    @@ -10,6 +10,20 @@
    +    <terms>
    +      <term><name>Release type</name><value>New features</value></term>
    +      <term><name>Release type</name><value>Bug fixes</value></term>
    +    </terms>
    +  </release>
    

    Also probably doesn't matter, but the real feeds have a whole <files> section, too. Guess we don't care?

  3. +++ b/core/modules/update/tests/modules/update_test/aaa_update_test.8.x-1.2.xml
    @@ -4,9 +4,7 @@
    - <recommended_major>1</recommended_major>
    - <supported_majors>1</supported_majors>
    - <default_major>1</default_major>
    + <supported_branches>8.x-1.</supported_branches>
    

    Shouldn't this have happened in another issue? ;) Did we miss some of this when converting to use /current/* feeds?

  4. +++ b/core/modules/update/tests/modules/update_test/drupal.0.0-alpha1.xml
    @@ -10,6 +10,20 @@
    +    <tag>DRUPAL-8-2-0</tag>
    
    +++ b/core/modules/update/tests/modules/update_test/drupal.0.0-beta1.xml
    @@ -10,6 +10,20 @@
    +    <tag>DRUPAL-8-2-0</tag>
    

    More CVS tags, this time for core...

  5. In terms of the actual fix,
    +++ b/core/modules/update/update.compare.inc
    @@ -343,6 +343,12 @@ function update_calculate_project_update_status(&$project_data, $available) {
    +    if (!$is_in_supported_branch($release['version'])) {
    +      // In all cases we only want to show the user releases in supported
    +      // branches. If this version is not in a supported branch, do not evaluate
    +      // the release.
    +      continue;
    +    }
    

    This function isn't just about "showing the user releases". A few lines below this hunk, we have all this:

        // First, if this is the existing release, check a few conditions.
        if ($project_data['existing_version'] === $version) {
          if (isset($release['terms']['Release type']) &&
              in_array('Insecure', $release['terms']['Release type'])) {
            $project_data['status'] = UpdateManagerInterface::NOT_SECURE;
          }
          elseif ($release['status'] == 'unpublished') {
            $project_data['status'] = UpdateManagerInterface::REVOKED;
            if (empty($project_data['extra'])) {
              $project_data['extra'] = [];
            }
            $project_data['extra'][] = [
              'class' => ['release-revoked'],
              'label' => t('Release revoked'),
              'data' => t('Your currently installed release has been revoked, and is n\
    o longer available for download. Disabling everything included in this release or \
    upgrading is strongly recommended!'),
            ];
          }
    ...
    

    Probably we don't have test coverage for any of this, which is why the patch is green. :( But I think this patch, as written, would stop update.module from reporting that people are running a version that's been revoked for security reasons. Presumably such a branch would be marked unsupported, then this patch would hide it and the site admin would never know.

    Perhaps we can salvage this approach by moving the check for is_supported after all the stuff where we see if the current release has been revoked or something.

Thanks/sorry,
-Derek

dww’s picture

Re: #31.5:

Looking closer, I think this would be peachy keen if we inserted the !$is_in_supported_branch() check into this:

    // Otherwise, ignore unpublished, insecure, or unsupported releases.
    if ($release['status'] == 'unpublished' ||
        (isset($release['terms']['Release type']) &&
         (in_array('Insecure', $release['terms']['Release type']) ||
          in_array('Unsupported', $release['terms']['Release type'])))) {
      continue;
    }

Of course, #NeedsFollowup and #NeedsTests for the fact that I had to spot this manually, and the bot didn't tell us. :/

dww’s picture

Title: In case of no recommended update is found Update Status recommends the latest release, even if it is unsupported » In case no recommended update is found, Update Status recommends the latest release, even if it is unsupported
dww’s picture

Status: Needs work » Needs review
StatusFileSize
new32.63 KB
new3.87 KB
new5.93 KB
new1.05 KB

Like so.

Interdiff seems confused, and is flagging stuff I didn't actually change. Also attaching a raw diff of the two patch files. Attaching the actual relevant changes I made as 3111929-34.relevant-changes.patch.txt in case that helps. /shrug

dww’s picture

xjm’s picture

Status: Needs review » Needs work
+++ b/core/modules/update/tests/modules/update_test/drupal.1.1-alpha1-core_compatibility.xml
@@ -1,4 +1,8 @@
+@todo Remove this file in https://www.drupal.org/project/drupal/issues/3112962
+@see \Drupal\Tests\update\Functional\UpdateContribTest::testCoreCompatibilityMessage

No, let's not do this in test fixtures.

xjm’s picture

+++ b/core/modules/update/update.compare.inc
@@ -343,12 +343,6 @@
-    if (!$is_in_supported_branch($release['version'])) {
-      // In all cases we only want to show the user releases in supported
-      // branches. If this version is not in a supported branch, do not evaluate
-      // the release.
-      continue;
-    }

@@ -388,6 +382,7 @@
+        !$is_in_supported_branch($release['version']) ||

If there is an actual bug here, it needs test coverage in this issue. Otherwise, the "before" seems better.

tedbow’s picture

@dww thanks for the reviews and patches.

re #31
1-4 yes we should fix the problem with xml fixtures. Just copied from another release which were. i opened #3110917: [meta] Fix update XML fixtures bad data but no need to make more problems here
5. Yes I think you fix is correct and it points to the fact that we have missing test coverage. But I think the test coverage for the current problem is good just need to the missing in #3113292: Update module has no tests for changes to status of the installed release (revoked, etc)

xjm’s picture

@tedbow and I crossposted. I think the test coverage needs to be added here, since the patch introduced a regression that was then fixed. When that happens, we add a test scenario.

dww’s picture

Then maybe we should postpone this on #3113292: Update module has no tests for changes to status of the installed release (revoked, etc) and promote that to critical? We should have those tests, regardless of this issue, and they're basically completely independent of what this issue is talking about. It just so happens that the lack of those tests meant the fix in here would have broken that other functionality if I hadn't noticed it myself.

If we commit tests in a separate issue, we can come back and re-queue tests on #29 vs. #34 and see the results...

xjm’s picture

Status: Needs work » Postponed

I'm alright with that approach. Bumping its status and postponing this for now.

xjm’s picture

Title: In case no recommended update is found, Update Status recommends the latest release, even if it is unsupported » If no recommended update is found, Update Status recommends the latest release, even if it is unsupported
dww’s picture

Status: Postponed » Needs review

@alexpott committed the tests from #3113292: Update module has no tests for changes to status of the installed release (revoked, etc) to 8.9.x and 9.0.x (yay, thanks!). Requeued #29 and #34.

#34 fixes #31.5.
#31.1 and 4 are better solved at #3113798: Remove unused (and generally wrong) <tag> markup from Update module test XML fixtures
#31.2 is better in scope at #3110917: [meta] Fix update XML fixtures bad data
#31.3 is probably still needed here.

Maybe NW, but NR for now.

Thanks,
-Derek

The last submitted patch, 29: 3111929-29.patch, failed testing. View results

tedbow’s picture

re #43
@dww thanks for getting this started again.

  1. #31.3 is probably still needed here.

    Yep, \Drupal\Tests\update\Functional\UpdateContribTest::testCoreCompatibilityMessage() will fail without this change because it will not longer be a recommended release since it is not in a recommended branch. Yes we missed it before but because of the bug this issue addresses the test passed because it was still the recommended release.

  2. The fails in #29 are expected now that we have the new tests
dww’s picture

Status: Needs review » Needs work

#31.1 and 4 are better solved at #3113798: Remove unused (and generally wrong) <tag> markup from Update module test XML fixtures so I don't care if we add more bogus values here.
#31.2 is better in scope at #3110917: [meta] Fix update XML fixtures bad data and definitely out of scope here.
#45 confirms that #31.3 is still needed here.

So I think the only remaining @todo is to remove the @todo per #36. ;) I think. Maybe @xjm can clarify what they'd prefer to resolve that?

tedbow’s picture

Status: Needs work » Needs review
StatusFileSize
new1.45 KB
new32.02 KB

I removed the xml @todo's as per #36.
We have

+++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php
@@ -564,18 +568,21 @@ public function testCoreCompatibilityMessage() {
+    // @todo Use the drupal-1.1*.xml files without the '-core_compatibility' and
+    // delete the '*-core_compatibility.xml' files in suffix in
+    // https://www.drupal.org/project/drupal/issues/3112962.

This @todo also tell us delete the files so I think this is ok.

tim.plunkett’s picture

Was great to see the patch in #29 fail as expected after the other issue, yay.

Those todos removed in #47 pointed to #3112962: Core compatibility messages on contrib available updates should consider supported branches, but one is left over:

+++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php
@@ -564,18 +568,21 @@ public function testCoreCompatibilityMessage() {
+    // @todo Use the drupal-1.1*.xml files without the '-core_compatibility' and
+    // delete the '*-core_compatibility.xml' files in suffix in
+    // https://www.drupal.org/project/drupal/issues/3112962.

Also, this isn't that issue. (idk if that matters)

tedbow’s picture

RE #48 Yes we still need at least 1 todo for #3112962: Core compatibility messages on contrib available updates should consider supported branches

I updated the comment to hopefully make it more clear what we need to do in that issue.

tedbow’s picture

StatusFileSize
new1.5 KB
new32.29 KB

whoops here is the todo comment change I mentioned in #49

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

This was RTBC in #30, until #31 spun out that other issue, which is now resolved.
#43/46 nicely summed up the outstanding points of feedback, which were addressed in #47.
And #50 addressed my question.

Marking this back to RTBC!

tedbow’s picture

StatusFileSize
new32.33 KB

@tim.plunkett thanks for reviewing

just a reroll

  • Gábor Hojtsy committed 19f61cd on 9.0.x
    Issue #3111929 by tedbow, dww, webchick, xjm, tim.plunkett, catch: If no...

  • Gábor Hojtsy committed 9eb91e1 on 8.9.x
    Issue #3111929 by tedbow, dww, webchick, xjm, tim.plunkett, catch: If no...
gábor hojtsy’s picture

Version: 9.0.x-dev » 8.8.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Yay, so many test coverage for such a few lines of fix :) I like how the solution for a random bug found by @webchick is also a fit for new efforts for supporting semantic versioning :)

Committed! Does this need to go into 8.8? I assume so. Sent testing for that too.

tedbow’s picture

@Gábor Hojtsy thanks for committing this! Thanks @webchick for finding the 🐜, thanks everyone for helping getting it done!

Yes I think we want all the related test coverage backported. I also sent it back for testing but canceled mine. The patch still applies

tedbow’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

re me in #56

Yes I think we want all the related test coverage backported

So many issues getting committed I was confused. This is not a test-only patch.

Yes, I think this is critical to backport so that under no circumstances do we recommend and unsupported release.

Marking RTBC because previous patch applies and passes on 8.8.x se #52

  • Gábor Hojtsy committed fb4e1b8 on 8.8.x
    Issue #3111929 by tedbow, dww, webchick, xjm, tim.plunkett, catch: If no...
gábor hojtsy’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed
StatusFileSize
new36.07 KB

Superb, thanks!

Backport all the things!!!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.