Problem/Motivation

Because of #2807145: [policy, no patch] Allow contrib projects to specify multiple major core branches, Drupal 9 may need to retrieve modules that start with 8.x-. The update module is not currently aware that modules starting with 8.x can be compatible with Drupal 9. Also once as part of #3009338: [META] Support semantic versioning for extensions (modules, themes, etc) in Drupal core, and allow modules to be compatible with Drupal 8 and 9 at the same time Drupal also need to retrieve modules that have semantic versioning releases and don't start with 8.x

Drupal.org now offers a new update xml feed /current that returns both 8.x- modules but also all the new semantic version modules that will be available.

We can't simply switch the /current feed because it does not have the same metadata for projects and releases.

Proposed resolution

  1. Update requests should no longer request information from URLs that have \Drupal::CORE_COMPATIBILITY(8.x) as the final path segment. This should be replaced with 'current'. For example, a request that previously requested https://updates.drupal.org/release-history/paragraphs/8.x will now request https://updates.drupal.org/release-history/paragraphs/current
  2. The contents of /current has a somewhat different structure than what was returned by requests to /8.x, The update module and its tests will need refactoring to reflect those changes.
    • The following tags are no longer provided, the information should be parsed from the version tag instead: version_major, version_minor, version_patch, version_extra
    • recommended_major (which differed depending on the API requested) has been removed. This was only used to determine which major version should be used for available updates if the currently installed version is not supported. Instead the next major version that is supported, as determined by supported_branches. Since currently contrib modules don't have branches that have minor version the supported branches should be the same.

      For core which does have minor branches this will not distinguish between minor core branches. This the same functionality that the update module currently provides for core since the current XML only sends recommended_major not branches.

    • supported_majors replaced with supported_branches, which includes core compatibility for non-semver version numbers.

      In addition to determining the major version should be used as the target major for updates, all updates that are in unsupported branches will not be shown.

    • Other tags are removed from the new XML feed and weren't used in core at all
      api_version(also no longer relevant), mdhash, filesize

Remaining tasks

Follow-ups
#3100115: The update module should recommend updates based on supported_branches rather than major versions majors
#3100386: Create contrib update module test cases that use semantic versioning

User interface changes

API changes

Data model changes

Release notes snippet

In order for Drupal core's Update Manager module to list all updates for modules when drupal.org allows new semantic version releases of modules, the Update Manager module now requests an alternative XML feed from updates.drupal.org. The path for the new feed ends in /current rather than /8.x. The new feed will include not only module releases with version numbers starting with 8.x-, such as 8.x-3.1, but also all releases that use the new semantic versioning number system. Site owners will not need to make any changes for this change. For those interested in the differences between the new and old XML feeds the differences are detailed in this documentation page.

CommentFileSizeAuthor
#108 3074993-8.8-reroll.patch200.07 KBtedbow
#101 3074993-101.patch197.06 KBtedbow
#101 interdiff-99-101.txt4.87 KBtedbow
#99 3074993-99-interdiff.txt4.34 KBkim.pepper
#99 3074993-99.patch196 KBkim.pepper
#94 3074993-94.patch195.68 KBtedbow
#94 interdiff-90-94.txt14.3 KBtedbow
#90 3074993-90.patch192.28 KBtedbow
#90 interdiff-82-90.txt9.64 KBtedbow
#82 3074993-82.patch189.97 KBtedbow
#82 interdiff-80-82.txt5.1 KBtedbow
#82 3074993-82-only-strpos-fix.patch189.01 KBtedbow
#82 interdiff-82-only-strpos-fix.txt737 bytestedbow
#80 3074993-80.patch189.01 KBtedbow
#80 interdiff-78-80.txt15.47 KBtedbow
#78 3074993-78.patch193.99 KBtedbow
#78 interdiff-75-78.txt4.5 KBtedbow
#75 3074993-75.patch193.01 KBtedbow
#75 interdiff-72-75.txt3.93 KBtedbow
#72 3074993-72.patch190.92 KBtedbow
#72 interdiff-71-72.txt9.27 KBtedbow
#71 3074993-71.patch189.72 KBtedbow
#71 interdiff-68-71.txt8.14 KBtedbow
#68 3074993-68-reroll.patch189.16 KBtedbow
#66 interdiff-64-66.txt114.69 KBtedbow
#66 3074993-66.patch189.04 KBtedbow
#64 3074993-64.patch133.93 KBtedbow
#64 interdiff-61-64.txt44.99 KBtedbow
#64 3074993-64.patch133.93 KBtedbow
#64 interdiff-61-64.txt44.99 KBtedbow
#61 3074993-61.patch103.53 KBtedbow
#61 interdiff-57-60.txt3.71 KBtedbow
#57 3074993-57.patch103.57 KBtedbow
#57 interdiff-56-57.patch23.81 KBtedbow
#56 3074993-56.patch104.16 KBtedbow
#56 interdiff-51-56.txt3.42 KBtedbow
#53 3074993-53-non-suppported_branch.patch104.65 KBtedbow
#53 interdiff.txt2.91 KBtedbow
#51 3074993-51-REROLL.patch102.36 KBbnjmnm
#47 3074993-47.patch102.32 KBtedbow
#47 interdiff-46-47.txt2.31 KBtedbow
#46 3074993-46.patch102.25 KBtedbow
#46 interdiff-45-46.txt20.01 KBtedbow
#45 3074993-45.patch101.92 KBtedbow
#45 interdiff-44-45.txt13.14 KBtedbow
#44 3074993-44.patch102.55 KBtedbow
#40 3074993-40_plus_3085717-11.patch86.01 KBtedbow
#38 3085717-13_plus_3085717-11.patch80.71 KBtedbow
#38 3085717-13.patch2.91 KBtedbow
#27 interdiff-23-27.patch546 bytestedbow
#27 3074993-27.patch15.17 KBtedbow
#23 3074993-23.patch15.14 KBtedbow
#2 3074993-2.patch2.88 KBtedbow
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tedbow created an issue. See original summary.

tedbow’s picture

Status: Active » Needs review
FileSize
2.88 KB

Here is a patch that just uses "/all"

drumm’s picture

I haven’t done a full look through of the code lately. I suspect there may be some logic that ignores the API compatibility prefix, assuming it is the same all the time. Be sure that testing for 8.x-1.0 > 7.x-2.0 exists.

Wim Leers’s picture

The changes look fine.

But … only somebody who knows the existing translation infrastructure can truly sign off on this. I think that's @drumm and @Gábor Hojtsy, who else?

cilefen’s picture

Title: Use "all" in update url's instead of CORE_COMPATIBILITY » Use "all" in update URLs instead of CORE_COMPATIBILITY
Gábor Hojtsy’s picture

Status: Needs review » Needs work

only somebody who knows the existing translation infrastructure can truly sign off on this

This has nothing to do with the translation infrastructure, that would be #3016471: Make localization file download major version agnostic. This is about fetching available update data for modules. We should check some scenarios:

1. Changing to /all/ will return 7.x, etc. releases of the modules. This will increase processing need on the client on the data. Not sure if we have projects which had LOTs of releases to the extent this could be a penalty but would be good to check. @drumm can maybe help query the Drupal.org DB for projects ordered by number of releases.

2. Changing to /all/ will return 9.x releases in 8.x and vice versa. Do we have code elsewhere to filter those out? Will d.o allow 9.x release prefixes? If so, will those be explicitly only 9.x+ compatible or could those be also 8.x compatible? If so how does Drupal core tell which release to suggest as viable new update to install. (While update module currently does not resolve the requirements/dependencies of projects (nor info.yml nor composer.json), at least it only suggests projects compatible with the same major core version. Changing this to /all/ changes that behaviour once people release 9.x branched projects (if we allow that).

Wim Leers’s picture

Oops, right. Sorry. Mixing up issues 🙃

drumm’s picture

@drumm can maybe help query the Drupal.org DB for projects ordered by number of releases.

mysql> SELECT n.title project, n.type, count(1) releases, concat('https://www.drupal.org/i/', n.nid) link FROM node n INNER JOIN field_data_field_release_project fdf_rp ON fdf_rp.field_release_project_target_id = n.nid WHERE n.status = 1 GROUP BY n.nid ORDER BY releases DESC LIMIT 50;

Project Type Releases
Drupal core project_core 367
Webform project_module 239
DruStack project_distribution 232
OpenFed project_distribution 185
HTML Mail project_module 169
Lingotek Translation project_module 148
Commerce Kickstart project_distribution 146
OM Maximenu project_module 146
Domain Access project_module 135
Varbase: The Ultimate Drupal 8 CMS Starter Kit (Bootstrap Ready) project_distribution 131
Mail System project_module 130
Video project_module 129
Organic groups project_module 121
Lightning project_distribution 120
H5P - Create and Share Rich Content and Applications project_module 120
Koumbit Platforms (kplatforms) project_module 116
OM 2 HTML5 project_theme 116
Media project_module 116
Quiz project_module 115
Open Social project_distribution 112
Weather project_module 107
Webform CiviCRM Integration project_module 105
Views project_module 105
Omega project_theme 103
DrupalChat project_module 100
Geofield Map project_module 100
Acquia Cloud Site Factory Connector project_module 100
Open Atrium project_distribution 99
Ubercart project_module 99
Bibliography Module project_module 99
Apache Solr Search project_module 99
Panels project_module 98
UIkit project_theme 98
Mailchimp project_module 98
Provision project_module 98
Panopoly project_distribution 97
Bible project_module 96
Date project_module 95
OBiBa Mica project_module 95
Finder project_module 94
Open Atrium Core project_module 92
Drupal Commons project_distribution 92
e-Commerce project_module 90
Web Experience Toolkit project_distribution 89
Web Links project_module 89
Forward project_module 89
GMap Module project_module 88
Acquia Connector project_module 88
Thunder project_distribution 87
Features project_module 87
tedbow’s picture

in #3078111: Project browsing/search compatibility filter should work off dependency data part of the proposed solution is

Implement pulling that data from info.yml files instead of branch names.

So I think this would entail pulling core compatibility from info.yml files into release nodes.

Could this also be used determine what releases should be returned for available update purposes?

It seems like for search any if we have more fine grained search by minors we will still need to be able to search for 8.x or 9.x compatible modules. For instances someone may simply know they are building a Drupal 8(or Drupal 9) site and are looking to see if a module with a general functionality is available.

So if we have search for 8.x or 9.x this means we need to pull this from info.yml files onto release nodes. If we had it on release nodes we could still request '8.x' or '9.x' compatible releases(even though it might not actually be compatible but that is problem now)

tedbow’s picture

in #3078111: Project browsing/search compatibility filter should work off dependency data part of the proposed solution is

Implement pulling that data from info.yml files instead of branch names.

So I think this would entail pulling core compatibility from info.yml files into release nodes.

Could this also be used determine what releases should be returned for available update purposes?

It seems like for search any if we have more fine grained search by minors we will still need to be able to search for 8.x or 9.x compatible modules. For instances someone may simply know they are building a Drupal 8(or Drupal 9) site and are looking to see if a module with a general functionality is available.

So if we have search for 8.x or 9.x this means we need to pull this from info.yml files onto release nodes. If we had it on release nodes we could still request '8.x' or '9.x' compatible releases(even though it might not actually be compatible but that is problem now)

xjm’s picture

Priority: Normal » Critical
Issue tags: +Drupal 9
tedbow’s picture

Title: Use "all" in update URLs instead of CORE_COMPATIBILITY » [PP-1] Use "all" in update URLs instead of CORE_COMPATIBILITY
Status: Needs work » Postponed
Related issues: +#3076183: [Meta] Determine how available updates for modules should be handled if they are not compatible with the current version of Drupal core

Postponing on #3076183: [Meta] Determine how available updates for modules should be handled if they are not compatible with the current version of Drupal core because we need to figure what the functionality should be now that we have modules that are compatible with multiple branches and branch/version name will not correspond directly to core compatibility

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

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

drumm’s picture

We will want change all to current when #2688479: Update update status XML for Drupal 9 and contrib semantic versioning is done. Figuring out how to get this committed is still very important, especially in the 9.0.x branch, so update status can keep working in general.

dww’s picture

I'm pretty concerned about the bandwidth and RAM required for slurping down those 'all' XML feeds. :/ Some of them are completely huge. If we suspect that most sites use 10-50 contrib modules, huge * 20 is Really Huge(tm). ;) Although there is (was?) code to batch fetch the feeds, we still have to load *all* of it into RAM to process the available updates report. We don't (yet?) do the logic one module at a time, independently. Maybe we could. It's been a long time since I looked at any of it.

Therefore, I think a new 'current' feed would be much better for everyone, once it exists. TBD.

However, all this code is going to get much more complicated, since there's no way for update.module on your site to know everything about the requirements/compatibilities/etc of all the future releases coming down those feeds. This whole system was designed ~14 years ago when contrib was totally locked to specific versions of core. Now that we're breaking that assumption, update.module is going to have a really hard time keeping up.

e.g. I'm running token 3.2.5 on 8.9.3 core. Token 4.0.0 is released, which is only compatible with 9.1.x and up. How will update.module know that? What's it going to tell me? That a new release of token is available, but I better click on the release notes and read the fine print? Or are we somehow going to teach update.module all about the dependency web of everything? Or do we hope that all contrib maintainers everywhere actually implement SemVer properly, and update.module never recommends (blindly) that you jump major versions? Or what?

We're getting into the territory of Wrong Tool For the Job(tm).

Either we're going to find ourselves re-implementing all the dependency reconciliation logic of composer, or we're going to have a system that gives people bad advice.

Or we're going to realize that update.module has served us well for a long time, but maybe should now be put out to pasture.

Perhaps we should focus on the composer initiative, and have a UI that talks to that, and can give you a report of what would happen if you did a "composer update"...

Love you, update.module. You were probably my biggest contribution to core. But maybe you need to die. ;)

-Derek

dww’s picture

p.s. If we want to keep update.module for the usage stats on projects, we've got the telemetry initiative for that, right? We could still have folks opt-in to a system that lets core "phone home" to send info about what's in use, PHP versions, etc, but stop linking that to the available updates functionality. That can (should?) be a different system from an in-core web UI around composer update --dry-run (or equivalent).

p.p.s. Is there a more appropriate meta to be having this discussion in?

drumm’s picture

Title: [PP-1] Use "all" in update URLs instead of CORE_COMPATIBILITY » [PP-1] Use "current" in update URLs instead of CORE_COMPATIBILITY

Therefore, I think a new 'current' feed would be much better for everyone, once it exists.

I think I have the code for this all ready to deploy. It needs a bit more testing, and documentation. I expect I’ll be doing that on Monday when I’m back at home.

I am removing the <version_*> tags, so progress on #3085717: [PP-1] Do not rely on version_* tags would be appreciated.

The other big change will be from <supported_majors> to <supported_branches>. “branch” in this case is not a Git/etc branch (releases are not actually aware of Git history, or require logical use of tags and branches); it is the version number with everything after the last . removed. So core using semver may have <supported_branches>7.,8.8.,8.9.,9.0.</supported_branches>, and a contrib module using both semver and legacy versions may have <supported_branches>7.x-1.,8.x-1.,1.1.</supported_branches>. The code for generating these in project_release on Drupal.org is https://git.drupalcode.org/project/project/blob/d4fba0cab5cc6c3b8cd920bc...

<recommended_major> is also going away. If we need a <recommended_branches>, I have that ready to go: https://git.drupalcode.org/project/drupalorg/blob/81b4df451532067dd19d19...

tedbow’s picture

Title: [PP-1] Use "current" in update URLs instead of CORE_COMPATIBILITY » [PP-1] Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates
drumm’s picture

Status: Postponed » Active

#3074998: Add explicit information about core compatibility to update data is also coming into availability. It will take a few days for the data to get fully re-parsed, and xml regenerated. The tag added there is only in the current XML.

tedbow’s picture

Title: [PP-1] Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates » Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates
Assigned: Unassigned » tedbow

#20
@drumm thanks for the drupal.org changes

I working on the changes to display the core compatibility for each module update in line with what has been agreed upon in #3076183: [Meta] Determine how available updates for modules should be handled if they are not compatible with the current version of Drupal core

dww’s picture

General concern before we get too much further in here. Apologies if this is discussed elsewhere that I missed.

What's the long-term plan for the "current" feeds? They're briefly introduced/described at #2688479-7: Update update status XML for Drupal 9 and contrib semantic versioning thusly:

So what's going to happen 8 years from now when a site is still on 8.8.N, queries for updates.d.o/project/drupal/current/current.xml (or whatever it is) and only D9-D11 releases are in that feed?

Is "Current" just going to grow from here on out, eventually becoming so huge and hard to work with that we're not much better off than using "All"?

Do we want something in "current" to indicate a "version" of the API between update.module and updates.d.o? NOT a Drupal Core API compatibility term (which is indeed on the way to the dustbin of history), but a update.module app vs. server API version #? current-v1, then someday we can move to current-v2, etc.

We have to think about this crap now, for whatever we put in 8.8.0, or it's going to come back to haunt future-us in N years. ;)

Thanks,
-Derek

tedbow’s picture

Assigned: tedbow » Unassigned
Issue tags: +Needs
FileSize
15.14 KB

Here is patch that is bit of work in progress. Putting here now because I think we need to work on some other issue first.

for this patch

  1. change to /current instead of /all which #2. See comments since #2 for why
  2. Adds new class \Drupal\update\UpdateProjectCoreCompatibility which sets the core compatibility range based of core_compatiblity which in now in the /current updates feed.

    For an example see https://updates.drupal.org/release-history/commerce_bambora_europe/current
    Not sure if all projects have this feed yet.

    This class calculates the ranges and the message. This may need to be split out into separate classes

  3. Adds unit tests to prove we can get compatibility ranges can be computed from core_compatibility. It can now handle multiple ranges, single version compatibility and combination of the 2

I think are some issues that need to be resolved before we can finish this issue.

  1. #3085717: [PP-1] Do not rely on version_* tags because this aren't in the /current feed. We should be able to fix this before we switch to /current because we can get this information from the version
  2. #3094304: Create tests that cover contrib non-full releases and contrib patch versions which the above is postponed on.
  3. re #18 I think this issue needs Issue Summary Update to document what is being removed or changed in the /current feed.

    The functional test coverage for contrib updates is not comprehensive so for any cases like #3085717 where we are changing where we are getting metadata but the functionality remains the same it would be great if make sure we have test coverage for the current functionality.
    Anything we can do before this issue would be great.

tedbow’s picture

Status: Active » Needs review
Issue tags: -Needs +Needs issue summary update
tedbow’s picture

drumm’s picture

Is "Current" just going to grow from here on out, eventually becoming so huge and hard to work with that we're not much better off than using "All"?

That is the current plan, yes. current includes any release with an 8.x- API compatibility prefix to the version number, or any without an API compatibility prefix.

Bandwidth isn’t too much of a concern here. What can be hard to work with is the general finickiness of formatting - I saw some evidence that release ordering in the XML being significant tripped people up at least a couple times.

Do we want something in "current" to indicate a "version" of the API between update.module and updates.d.o? NOT a Drupal Core API compatibility term (which is indeed on the way to the dustbin of history), but a update.module app vs. server API version #? current-v1, then someday we can move to current-v2, etc.

I’ve never encountered schema documentation, I went ahead and made some: https://www.drupal.org/drupalorg/docs/apis/update-status-xml

current is indeed essentially a new API version. I only added <core_compatiblity> to current and a few things are taken away. I also removed the <release>-level <mdhash> and <filesize> elements, https://git.drupalcode.org/project/drupalorg/commit/25d1c79c84fc75d306d5...

Now is a good time to remove other inessential elements, like <release>’s <status> looks like it is always published. And <download_link> is duplicitous, but core does currently use it.

I don’t want to add much more changed that affect core’s implementation since this does need to get into core for update status to work properly for Drupal 9. There is no https://updates.drupal.org/release-history/drupal/9.x and https://updates.drupal.org/release-history/drupal/8.x does not contain 9.x releases.

The next version of this API might be something completely different, like using Drupal.org’s composer endpoint directly.

tedbow’s picture

  1. @drumm thanks for update

    Now is a good time to remove other inessential elements, like ’s looks like it is always published. And is duplicitous, but core does currently use it.

    I think this is not a great time to be changing more things the update xml because current functionality on the core side is not covered with comprehensive testing. So anything we change on the core side we should really be making sure we add test for the current functionality before update core. Otherwise we have a big risk of breaking the current functionality. see #3094304: Create tests that cover contrib non-full releases and contrib patch versions

    Could we make the switch to /current and then remove what we need to remove? Right now since /current is new do we have to consider it an API for consumers except drupal core itself.

  2. re #23 I forgot add @group to the test.
tedbow’s picture

So thinking more about switching to the /current feed.

If we could changes the /current or the current feed I think this is what would work best with core changes in considering 1) We want to get the "This module is compatible with 8.7.11 to 9.1" changes in during 8.8.0-rc and 2) currently the update module does not great test coverage for modules(non-core) update availability

I think the least disruptive change for core would be

  1. Add core_compatibility to current feed that uses 8.x.

    This would allow to make only the change to show "This module is compatible with 8.7.11 to 9.1"
    Then make sure our test coverage for module update availability is solid.

  2. If we couldn't get that the next best thing would be to have the /current feed be have the same metadata for projects and releases as the current feed with only the addition of core_compatilibity

The last submitted patch, 27: 3074993-27.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

catch’s picture

So what's going to happen 8 years from now when a site is still on 8.8.N, queries for updates.d.o/project/drupal/current/current.xml (or whatever it is) and only D9-D11 releases are in that feed?

This is probably OK I think? - In eight years, 8.8.N will be more than five years out of support.

tedbow’s picture

So many tests failed in #27 because our tests actually call out to updates.drupal.org. So switching to /current actually pulls in the new new /current feed from Drupal.org on our test runs not a mocked XML that can be found under core/modules/update/tests/modules/update_test

Most of the tests under core/modules/update/tests/src/Functional use the mock XML by calling \Drupal\Tests\update\Functional\UpdateTestBase::refreshUpdateStatus which calls

$this->config('update.settings')->set('fetch.url', Url::fromUri('base:' . $url, ['absolute' => TRUE])->toString())->save();

which will fetch the mock XML.

A couple of tests under core/modules/update/tests/src/Functional though I think by mistake don't call \Drupal\Tests\update\Functional\UpdateTestBase::refreshUpdateStatus so they are actually fetching real updates.drupal.org xml in the tests. For instance \Drupal\Tests\update\Functional\UpdateContribTest::testUpdateBrokenFetchURL

Also I think all tests that extend UpdatePathTestBase we trigger update_calculate_project_data() with XML from drupal.org. If the request is successful then if XML has any changes in the format then it will likely cause test errors like in #27

The reason #2 didn't fail any tests is because switching to /all return real updates.drupal.org that was in the same format.
So in effect our tests are testing live updates.drupal.org XML. Is this intentional? It doesn't seem like a good thing.

In the case that our test requests to updates.drupal.org are not successful then this will not cause a test failure unless we were explicitly asserting that "Failed to get available update data" didn't appear which we aren't.

It seems that all tests that extend UpdatePathTestBase or otherwise would trigger request updates.drupal.org should actually be calling something like \Drupal\Tests\update\Functional\UpdateTestBase::refreshUpdateStatus to change the update URL so we aren't making real requests to updates.drupal.org

This would mean we won't be testing live XML from updates.drupal.org. My guess this would also cause our update tests to run a little faster.

tedbow’s picture

#31 is an existing only somewhat related issue .

I created #3095755: Tests should not do requests to updates.drupal.org. If anyone has info/opinions or more info on that problem please comment on that issue

drumm’s picture

Re #30

So what's going to happen 8 years from now when a site is still on 8.8.N, queries for updates.d.o/project/drupal/current/current.xml (or whatever it is) and only D9-D11 releases are in that feed?

https://updates.drupal.org/release-history/drupal/current will indefinitely contain all 8.* & later releases. The simplicity of generating static files is still a bigger win than trying to keep the number of releases in a file down.

drumm’s picture

Re #28

Add core_compatibility to current feed that uses 8.x.

Done, #3074998-29: Add explicit information about core compatibility to update data. All release history XML should be regenerated within the next 20h.

drumm’s picture

So in effect our tests are testing live updates.drupal.org XML. Is this intentional? It doesn't seem like a good thing.

This has caused tests to randomly fail in the past. Testing shouldn’t also be an uptime and connectivity check with Drupal.org. Notably, one of the core tests was downloading translations, and failing often enough to be temporarily be removed until a replacement using bundled artifacts was made.

I think this is not a great time to be changing more things the update xml because current functionality on the core side is not covered with comprehensive testing.

I do have one more change I’d like to consider. I was unable to find a code path which outputs anything other than “published” for the release status, <releases><release><status>published</status>.

dww’s picture

@drumm re: #26:

  • Bandwidth for the downloads isn't my only concern. Update.module also loads all these into RAM. That gets costly on a site with a lot of projects that have a lot of releases...
  • Indeed, the order of releases in the feed was significant to the original implementation of update.module. Probably remains that way now. Doesn't have to stay that way forever.
  • Yeah, I'm not saying we ever documented the schema between updates.d.o and update.module. ;) Just wondering if we should start now. Thanks!
  • Agreed that /current is basically a new schema API version, and if we change it again, we can point it somewhere else and that'll implicitly be a new schema version.

@catch re: #30: I just invented 8 years. ;) Regardless, I'm worried by "that's okay, X will no longer be supported" -- we want update.module to tell people they're not supported and what to upgrade to so they return to the happy pasture of supported Drupalness. So I think whatever we do, we have to plan to support it working far into the future, even past official "supported" status.

@tedbow re: #31: great find! I commented at #3095755: Tests should not do requests to updates.drupal.org.

@drumm re: #33: Fair enough. I think that might come back to haunt us some day, but that's probably the best we can hope for.

Does it make sense to only put 8.8.x and higher core releases in the https://updates.drupal.org/release-history/drupal/current feed, since only core 8.8.x and higher will be consuming it?

Thanks all,
-Derek

tedbow’s picture

I split out #3096078: Display core compatibility ranges for available module updates this because #34 thanks @drumm!

Hopefully it will will make this issue smaller. neither really blocks the other but I think/hope #3096078 will be quicker

tedbow’s picture

Ok so here is patch without "This module is compatible with ...." message logic. It will fail in all the same ways that #27 did for reasons explained in #31. So I am not going to run tests on it.

But I am also uploading another patch that adds #3085717-11: [PP-1] Do not rely on version_* tags. More should pass. not sure about all but want to see.

Status: Needs review » Needs work

The last submitted patch, 38: 3085717-13_plus_3085717-11.patch, failed testing. View results

tedbow’s picture

Status: Needs work » Needs review
FileSize
86.01 KB

Whoops last patch didn't have new files from #3085717-11: [PP-1] Do not rely on version_* tags

Gábor Hojtsy’s picture

@dww: by switching to this "current" "API-version" of the update info, we don't attach to always use it in the future in Drupal 10, 11, etc. For Drupal 10 we can choose to stop growing "current" with items that are not Drupal 9 compatible and switch to composer endpoint data, or whatnot as @drumm indicated above. As you pointed out elsewhere update module is magically holding up but is less and less desirable as a feature set given the much more complicated nature of dependencies both in the back-backend (shorter PHP release cycles) and in Drupal. So I would be surprised if update module as-is survives too long.

Gábor Hojtsy’s picture

Gábor Hojtsy’s picture

tedbow’s picture

Assigned: Unassigned » tedbow
FileSize
102.55 KB

Here is patch that updates the rest of the test XML:

  1. Removes supported_majors and replaces it with supported_branches
  2. Removes recommeded_major and replaces it with recommeded_branch
  3. Doesn't remove default_major yet but I think it should be able to be removed

This is still a work in progress but I think the tests will pass.

There are no changes under core/modules/update/tests/src/Functional so it keeps the update list the same.

I am going clean this up so I am assigning to myself.

tedbow’s picture

+++ b/core/modules/update/src/ReleaseInfo.php
@@ -0,0 +1,94 @@
+class ReleaseInfo {

This should really be ModuleVersionParser and the only thing it needs is a version number.

Fixed this and some other cleanups

tedbow’s picture

This patch removes defualt_major from the test XML and the update logic. This is not in the new /current feed.

tedbow’s picture

+++ b/core/modules/update/src/ModuleVersionParser.php
@@ -0,0 +1,100 @@
+  private function getVersionString() {

A better name would be getVersionStringWithoutCoreCompatibility()

tedbow’s picture

Assigned: tedbow » Unassigned
  1. +++ b/core/modules/update/update.compare.inc
    @@ -232,35 +234,27 @@ function update_calculate_project_update_status(&$project_data, $available) {
    +    $branch_version_parser = new ModuleVersionParser($available['recommended_branch'] . 'x');
    

    Decided to make \Drupal\update\ModuleVersionParser::createFromSupportBranch() instead to return a new module version parser.

  2. Also some comment updates

Unassigning from myself. I am not sure #3085717: [PP-1] Do not rely on version_* tags needs to be its own issue now though it would make this patch a bit smaller if we want to do it first. The patch is mostly big because of the XML changes.

Probably still make sense to do #3094304: Create tests that cover contrib non-full releases and contrib patch versions first. I have a patch started on that.

drumm’s picture

I am not sure #3085717: [PP-1] Do not rely on version_* tags needs to be its own issue now though it would make this patch a bit smaller if we want to do it first.

Agreed, I actually started that as an experiment to help check how doable it might be. Whatever strategy makes the whole switch to /current most committable is best.

drumm’s picture

Removes recommeded_major and replaces it with recommeded_branch

This is actually multiple recommeded_branches if we want to flip this on.

recommeded_major was the recommended major version for each API compatibility, but we do not have specific API compatibility anymore. Switching this to “branch” helps, we’re not doing something like recommending 3.x.x for everyone, when 3 might only work with a certain range of core and other dependencies.

Currently, there are no rules for what can be recommended, other than it had to be supported. I couldn’t think of a good reason to have a restriction, since I wasn’t sure if the whole “recommended” concept still made sense, I don’t know of an analogue* in other projects, and implementing it that way in our form was just easier. (The legacy …/8.x, …/7.x, etc XML generation picks the highest major version that’s recommended in the API compatibility.)

I know it is a larger change, but I’m still not sure that we need “recommended” at all. If we do need it, I don’t know if there’s any way around having multiple recommended branches.

* marking branches as LTS is sort of an analogue, it is a meaningful label for a branch. That’s a whole other issue.

bnjmnm’s picture

A reroll was needed.

bnjmnm’s picture

Issue summary: View changes
Status: Needs review » Needs work

Updated IS to summarize the XML changes.

Went through the patch and only found nits, but this could probably use a bit of clarification as to whether #50 necessitates any additional steps. (There are also some additional possible use cases that @tedbow brought up in a discussion, but it's not yet clear if those are in-scope for this issue)

  1. +++ b/core/modules/update/tests/src/Unit/ModuleVersionParserTest.php
    @@ -0,0 +1,136 @@
    +   * Dataprovider for expected version information.
    

    Split "Dataprovider" into two words.

  2. +++ b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php
    @@ -71,20 +67,20 @@ public function providerTestUpdateBuildFetchUrl() {
    +    $expected = 'http://www.example.com/' . $project['name'] . '/current';
    

    Since a constant is no longer used, this and other instances can now be built inside double quotes instead of dot concatenation.

tedbow’s picture

Status: Needs work » Needs review
FileSize
2.91 KB
104.65 KB
  1. re #50 r

    This is actually multiple recommeded_branches if we want to flip this on.

    So this would be bigger change.

    Right now the current patch doesn't actually touch anything under core/modules/update/tests/src/Functional so functionally it still recommends the same updates.

    but at least with this change we would need

  2. I realize another problem with the current patch.
    +++ b/core/modules/update/update.compare.inc
    @@ -235,35 +236,27 @@ function update_calculate_project_update_status(&$project_data, $available) {
    -  if (in_array($existing_major, $supported_majors)) {
    +  if (in_array($existing_version_parser->getSupportBranch(), $supported_branches)) {
         // Still supported, stay at the current major version.
         $target_major = $existing_major;
    

    I realize now that this will be a problem. The code after this assumes that every release in the $target_major is supported which might not be the case.

    For contrib this actually is a safe assumption currently because with branches like 8.x-1. we can't specify a "minor" branch. But as soon as we have semantic versioning in contrib with branches like 1.2. we would run into a problem.

    Since core already has semantic versioning we would already have this problem. But in core we are very unlikely to have newer full releases in branches that aren't supported.

    I am uploading a patch that demonstrates this problem though.

Status: Needs review » Needs work

The last submitted patch, 53: 3074993-53-non-suppported_branch.patch, failed testing. View results

drumm’s picture

Issue summary: View changes

Clarifying recommended_branches in the issue summary.

tedbow’s picture

Status: Needs work » Needs review
FileSize
3.42 KB
104.16 KB
  1. re #50
    Currently this is how recommended_major is used.
    if (in_array($existing_major, $supported_majors)) {
        // Still supported, stay at the current major version.
        $target_major = $existing_major;
      }
      elseif (isset($available['recommended_major'])) {
        // Since 'recommended_major' is defined, we know this is the new XML
        // format. Therefore, we know the current release is unsupported since
        // its major version was not in the 'supported_majors' list. We should
        // find the best release from the recommended major version.
        $target_major = $available['recommended_major'];
        $project_data['status'] = UpdateManagerInterface::NOT_SUPPORTED;
      }
    

    So I am not sure what our logic should be in we don't have something like this.

    Considering in this issue we are pretty much sticking to the current functionality and not listing update split into branches it seems we still need to have target major if the current major is not supported. On thing we could do is find the next branch that is supported.

    This will have a different effect than our current logic for contrib in this example:

    • 8.x-1.x : unsupported
    • 8.x-2.x: supported but not recommended
    • 8.x-3.x: supported and recommended

    in the current case if you have 8.x-1.x installed you update.module would recommend 8.x-3.x. If don't have recommended_branches we would have to chose in core to recommend 2.x or 3.x(we won't have any concept that 1 major was recommended by the author. but maybe that makes sense, should you skip a major version is this way?

    The current functionality of the update module and the current XML would be to recommend update to 3.x.

    I am including a patch that if the current branch is not supported it will just go to the next major branch that is supported.

  2. not including the change in #53 as this was just to prove a problem with our testing. \Drupal\Tests\update\Functional\UpdateCoreTest::testNoUpdatesAvailable() failed because it used the same test XML but \Drupal\Tests\update\Functional\UpdateCoreTest::testNormalUpdateAvailable() did not
  3. re #48. I meant to upload a patch there. I luckly had the changes in local branch. Including here
tedbow’s picture

  1. +++ b/core/modules/update/src/ModuleVersionParser.php
    @@ -0,0 +1,115 @@
    +  public static function createFromSupportBranch($branch) {
    +    return new static ($branch . 'x');
    +  }
    

    This doesn't have a test

  2. +++ b/core/modules/update/src/ModuleVersionParser.php
    @@ -0,0 +1,115 @@
    +   * version will always be 'x'.
    

    changing this so \Drupal\update\ModuleVersionParser::getPatchVersion() will return NULL.

  3. +++ b/core/modules/update/tests/src/Unit/ModuleVersionParserTest.php
    @@ -0,0 +1,136 @@
    +    $releaseInfo = new ModuleVersionParser($version);
    ...
    +    $releaseInfo = new ModuleVersionParser($version);
    ...
    +    $releaseInfo = new ModuleVersionParser($version);
    ...
    +    $releaseInfo = new ModuleVersionParser($version);
    ...
    +    $releaseInfo = new ModuleVersionParser($version);
    

    These shouldn't be name $releaseInfo but should be updated to match the renamed class.

  4. +++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_0.xml
    @@ -4,9 +4,8 @@
    +<recommended_branch>8.x-1.</recommended_branch>
    

    all the test xml still has recommended_branch. removing

  5. If we are going to not have "recommend_branch" we should make clear that "recommended" is only for project page on Drupal.org and it will not be reflected in the update module.

    It seems there will be very few contrib modules that will be affected by this. You would have to 3 or major versions of Drupal module just for Drupal 8. Otherwise if you just had 2 then effect would be the same.

    I suppose we could figure out if any modules actually have that somehow.

tedbow’s picture

bnjmnm’s picture

Status: Needs review » Needs work

The nits in #52 still need to be addressed

And one other thing:

+++ b/core/modules/update/update.compare.inc
@@ -122,12 +123,14 @@ function update_calculate_project_data($available) {
+ * current version is used. If the current
+ * version is not in supported branch, the project maintainer's recommended
+ * branch is used to determine the major version to use. There's also a check to

There's a line break and missing 'the' here, but that may be irrelevant as this function no longer takes into account the project maintainers recommended branch.

tedbow’s picture

Status: Needs work » Needs review
FileSize
3.71 KB
103.53 KB

Fixed the nits from #52

Update the comment mentioned in #60 for the new functionality

bnjmnm’s picture

Status: Needs review » Reviewed & tested by the community

With that last bit of stuff addressed in #61 this can get RTBC'd.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. Love that is immutable. I wonder if it'd be better to call the object ModuleVersion - as once it is constructed that's what it represents.
  2. +++ b/core/modules/update/src/ModuleVersionParser.php
    @@ -0,0 +1,118 @@
    +    $version_parts = explode('.', $this->getVersionStringWithoutCoreCompatibility());
    

    I wonder if we should do this on construct as when we parsing the XML files we do ->getMajorVersion() followed by ->getMinorVersion() and as this is a value object there's no harm of a $this->versionParts property getting out-of-sync with $this->version.

  3. +++ b/core/modules/update/src/ModuleVersionParser.php
    @@ -0,0 +1,118 @@
    +    $version = strpos($this->version, '8.x-') === 0 ? str_replace('8.x-', '', $this->version) : $this->version;
    

    I know there are plans to remove \Drupal::CORE_COMPATIBILITY which make total sense but this code is analogous to \Drupal\Component\Version\Constraint::parseConstraint() and that's getting its core compatibility from the constant. I think whilst we still have the constant we should be using it.

  4. +++ b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php
    @@ -5,10 +5,6 @@
    -if (!defined('DRUPAL_CORE_COMPATIBILITY')) {
    -  define('DRUPAL_CORE_COMPATIBILITY', '8.x');
    -}
    

    Nice.

tedbow’s picture

Status: Needs work » Needs review
FileSize
44.99 KB
133.93 KB
44.99 KB
133.93 KB
  1. Changed to ModuleVersion. Also change the names are the variables being assigned instances.
  2. fixed
  3. yep that makes sense. Fixed.
  4. 👍

Couple thoughts/questions:

  1. Should \Drupal\update\ModuleVersion be @internal? I could see it being useful for custom code but also anytime we can avoid making an API we should.
  2. \Drupal\update\ModuleVersion::getVersionStringWithoutCoreCompatibility() is now only called in the constructor should would we just move the logic there and remove the method. I like having the constructor easier to read but could be convinced the other way.
  3. I will upload this patch but the tests will fail because #3094304: Create tests that cover contrib non-full releases and contrib patch versions was just committed which adds new
  4. #3094304: Create tests that cover contrib non-full releases and contrib patch versions has been committed 🎉. This means this patch also needs to update those XML files. The tests themselves should not be to updated. This should give us more confidence in committing this.

    This will make the patch a bit bigger but those are clear changes

  5. I noticed we still have api_version in our XML. This is removed in /current. I will remove that in the next patch and check to make sure everything else is removed that should be gone.
alexpott’s picture

@tedbow changes look good. Re questions:
1. Starting out @internal is a good idea. That said I can't imagine making an incompatible API change.
2. Not sure it matters too much given the method is private - but there's also no harm in inlining - up to you.

tedbow’s picture

  1. Adding @internal
  2. Leaving \Drupal\update\ModuleVersion::getVersionStringWithoutCoreCompatibility() I like it for clarity.
  3. Removed other metadata that is no longer in /current feed: api_version(whole point of /current means we aren't using this anymore, mdhash, filesize

    sorry this again make the patch bigger but again just XML changes

  4. Whoops in #64 I uploaded these files 2x. check to make sure these were the same and canceled tests on the other.
bnjmnm’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed the interdiffs and confirmed the feedback since the last RTBC was addressed, and that the test XML matches the structure of the actual content in /current feeds for Drupal and contrib.

tedbow’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
189.16 KB

just a reroll after #3096078: Display core compatibility ranges for available module updates was commited 🎉. Thanks @Gábor Hojtsy!

bnjmnm’s picture

Status: Needs review » Reviewed & tested by the community

Reroll has straightforward changes, so this can go back to RTBC.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work

One question, one missing test case, and some nits. The patch as a whole looks great!

  1. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,125 @@
    +    $this->versionParts = explode('.', $this->getVersionStringWithoutCoreCompatibility());
    ...
    +    return count($this->versionParts) === 2 ? NULL : $this->versionParts[1];
    

    It strikes me that there are a lot of count() calls and ternary operators and numeric array access.

    Instead of keeping versionParts as a property, why not initialize 3 properties?

    Not trying to derail an RTBC issue, but figured I'd ask.

  2. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,125 @@
    +    return $patch === 'x' ? NULL : $patch;
    
    +++ b/core/modules/update/tests/src/Unit/ModuleVersionTest.php
    @@ -0,0 +1,151 @@
    +  public function providerVersionInfos() {
    

    This is missing a case like 1.2.x. Otherwise there's full unit test coverage.

  3. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,125 @@
    +    return new static ($branch . 'x');
    

    Nit: no space between static and (

  4. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,125 @@
    +    $version = strpos($this->version, \Drupal::CORE_COMPATIBILITY) === 0 ? str_replace('8.x-', '', $this->version) : $this->version;
    +    return $version;
    

    Nit: no local variable needed

  5. +++ b/core/modules/update/tests/src/Unit/ModuleVersionTest.php
    @@ -0,0 +1,151 @@
    +  public function testGetMajorVersion($version, $excepted_version_info) {
    

    Nit: here and throughout "expected" is spelled "excepted"

tedbow’s picture

Status: Needs work » Needs review
FileSize
8.14 KB
189.72 KB

@tim.plunkett thanks for the review

  1. was trying to keep the constructor simpler but it does then mean a lot of logic is duplicated. Moving into constructor.
  2. Added test case.
  3. fixed
  4. fixed
  5. fixed
tedbow’s picture

chatted with @tim.plunkett

he suggested

what if instead of new ModuleVersion() we have it be ModuleVersion::fromString() or something , and then the constructor can be
__construct($major, $minor = NULL, $patch = NULL, $extra = NULL)

I changed this to createFromVersionString() because we already have createFromSupportBranch() which also creates from a string. Also I found public static function createFrom 47 times in core and public static function from only 16 times so sticking with that naming convention

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/modules/update/src/ModuleVersion.php
@@ -142,13 +166,12 @@ public function getVersionExtra() {
   public function getSupportBranch() {
-    $version = $this->version;
-    if ($extra = $this->getVersionExtra()) {
-      $version = str_replace("-$extra", '', $version);
+    $branch = $this->useCorePrefix ? static::CORE_COMPATIBILITY_PREFIX : '';
+    $branch .= $this->majorVersion . '.';
+    if ($this->minorVersion) {
+      $branch .= $this->minorVersion . '.';
     }
-    $parts = explode('.', $version);
-    array_pop($parts);
-    return implode('.', $parts) . '.';
+    return $branch;
   }

The changes above are great and address my concern. But I especially like the resulting change to this method!

Setting back to RTBC

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 72: 3074993-72.patch, failed testing. View results

tedbow’s picture

Status: Needs work » Needs review
FileSize
3.93 KB
193.01 KB
+++ b/core/modules/update/src/ModuleVersion.php
@@ -0,0 +1,177 @@
+    if ($this->minorVersion) {

This test should have been !== NULL otherwise "0" won't pass.

Updated and updated test cases in unit tests to "0" in all version parts. We had function tests that broke but not the unit test for the class. Fixed

kim.pepper’s picture

I think we need a test-only patch for #75 to show it failing.

alexpott’s picture

@kim.pepper the need for #75 is shown by the test failures in #72.

tedbow’s picture

+++ b/core/modules/update/src/ModuleVersion.php
@@ -0,0 +1,177 @@
+  /**
+   * Gets the support branch.
+   *
+   * @return string
+   *   The support branch as is used in update XML files.
+   */
+  public function getSupportBranch() {

Chatted with @mixologic. I thought if a contrib module used semantic versioning the would support branches like core 1.2.x. But they will be able to do 1.x also.

So you given a version number you can't determine the support branch.. Change to isInSupportBranch()

tedbow’s picture

Assigned: Unassigned » tedbow
Status: Needs review » Needs work

There is some in 8.9.x that actually doesn't make much sense I think by removing it it might make this patch much simpler. Assigning to myself to research this.

tedbow’s picture

Status: Needs work » Needs review
FileSize
15.47 KB
189.01 KB
  1. Ok here is the code in 8.9.x in update_calculate_project_update_status() I was referring to in #79
    if ($patch != $release['version_patch']) {
      $patch = $release['version_patch'];
      $release_patch_changed = $release;
    }
    if (empty($release['version_extra']) && $patch == $release['version_patch']) {
      $project_data['recommended'] = $release_patch_changed['version'];
      $project_data['releases'][$release_patch_changed['version']] = $release_patch_changed;
    }
    
    1. $patch is only ever referenced in 1 other spot in where it is set to an empty string
    2. In the top if block we check if it is equal to $release['version_patch'] if it isn't we set it as so.
    3. In the 2nd if block we then check $patch == $release['version_patch']. Of course because we will also set it to this value if it is not equal already and since the $patch is not used elsewhere the setting and the checking are meaningless
    4. The same is true for the setting of $release_patch_changed. it is only referenced once outside of this block to set to an empty string. So there no purpose in setting we could simply use $release in second if block.

    This is relevant now because this code is the only place in the update module where version_patch is used coming from the XML. version_minor is not used at all.

    Since we don't need these then we also don't need the new getVersionPatch() and getVersionMinor(). It might seem that since we have value object class for ModuleVersion we should leave these in but since this in @internal class I don't think we should put in any methods that we don't need to use.

    Another reason not to put in these methods is that it is unclear in version string such as 8.x-1.7 if the 7 is a minor or patch number. See #3104912: Swap storage of version minor & patch and the fact that our composer shim would turn this into 1.7.0 both meaning that it is a minor. But we also have documentation that labels this as "PatchLevel" https://www.drupal.org/docs/8/understanding-drupal-8/understanding-drupa....

    As part of #3009338: [META] Support semantic versioning for extensions (modules, themes, etc) in Drupal core, and allow modules to be compatible with Drupal 8 and 9 at the same time we will clean up our documentation but if core itself doesn't need to assess minor or patch for anything then we shouldn't add to the confusion. Once we need to assess these values we can add them.

  2. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,179 @@
    +  public function isInSupportBranch($support_branch) {
    +    $branch_version = static::createFromSupportBranch($support_branch);
    +    if ($branch_version->minorVersion === NULL) {
    +      return $this->getMajorVersion() === $branch_version->getMajorVersion();
    +    }
    +    return $this->getMajorVersion() === $branch_version->getMajorVersion() && $this->getMinorVersion() === $branch_version->getMinorVersion();
    +  }
    

    This actually is overly complicated.

    Really the support branch is simply the version with the last part removed. The part might be the minor-extra or the minor.patch.extra

    So basically it is the start of the version.

    So 8.x-1.1 and 8.x-1.0 are both in the support branch 8.x-1.

    And 1.2.3 and 1.2.0 are both in the support branch 1.2. and they are also in 1. Contrib now will be able to decide if they want to base support on minors or on majors. Hopefully drupal.org will prevent 1 single project from creating both support branches 1.2. and 1..

    Another 2 cases which this current function will not catch is
    8.x-1.2 is not in the support branch 1.2.
    1.2 is not in the support branch 8.x-1.

    for now I am not sure we actually need isInSupport(). We currently already have

    $is_in_supported_branch = function (ModuleVersion $version) use ($supported_branches) {
      foreach ($supported_branches as $supported_branch) {
        if ($version->isInSupportBranch($supported_branch)) {
          return TRUE;
        }
    }
    

    This can simply be changed to

    $is_in_supported_branch = function ($version) use ($supported_branches) {
      foreach ($supported_branches as $supported_branch) {
        if (strpos($version, $supported_branch) === 0) {
          return TRUE;
        }
      }
      return FALSE;
    };
    

    We could move strpos($version, $supported_branch) === 0 back into the class but I don't think we need to.

Status: Needs review » Needs work

The last submitted patch, 80: 3074993-80.patch, failed testing. View results

tedbow’s picture

  1. +++ b/core/modules/update/update.compare.inc
    @@ -353,18 +351,19 @@ function update_calculate_project_update_status(&$project_data, $available) {
    +      if ($is_in_supported_branch($release_module_version)) {
    

    This should not be the ModuleVersion object but rather the version string. This caused a bunch for test failures.

    I will upload a patch with just this fix and not the next to show that will pass tests(and that next problem needs test coverage).

  2. re #80.1 I was wrong about this code. It does actually do something but it is hard to tell what it does and doesn't have test support

    It is true that the $patch == $release['version_patch'] check in the 2nd if statement is useless(though another set of eyes would not be bad).

    I think by point #80.1.4 is wrong.

    The docblock for the function documents how the recommended release should be selected

    *
     * - 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
     *
    

    Basically if there is release with "extra" after the no "extra" release it should be recommended. This is not actually test anywhere.
    So in the code mentioned in the previous comment $release_patch_changed might be from the previous time around the loop.

    I will open a new issue to create test for this. I also think will actually break for semantic versioning but core doesn't do this pattern so it has mattered yet.

  3. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,88 @@
    +  public function getMajorVersion() {
    +    $version_string = strpos($this->version, static::CORE_COMPATIBILITY_PREFIX) === 0 ? str_replace(static::CORE_COMPATIBILITY_PREFIX, '', $this->version) : $this->version;
    +    return explode('.', $version_string)[0];
    +  }
    ...
    +  public function getVersionExtra() {
    +    $version_parts = explode('.', $this->version);
    +    $last_part_split = explode('-', array_pop($version_parts));
    +    return count($last_part_split) == 1 ? NULL : $last_part_split[1];
    +  }
    

    chatted with @tim.plunkett about this and going to move this logic back into the constructor.

xjm’s picture

I think the first issue in #83 was supposed to have been something else, since currently it's referring to this issue?

xjm’s picture

(Bear with me; I'm just starting to review this issue and parts of the IS are hard to understand.)

  1. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,100 @@
    +class ModuleVersion {
    

    I like this class, but there's a number of eyebrow-raisers in it (comments follow).

  2. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,100 @@
    +  /**
    +   * The core compatibility prefix used in version strings.
    +   *
    +   * @var string
    +   */
    +  const CORE_COMPATIBILITY_PREFIX = \Drupal::CORE_COMPATIBILITY . '-';
    

    Immediately confused here... isn't one of our goals to deprecate CORE_COMPATIBILITY? Is there a followup related to this, and how will ModuleVersion work after? Shouldn't we be handling the case where that constant no longer exists?

  3. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,100 @@
    +   * The version extra string.
    

    An example would be good, e.g.:

    If the module version is '2.0.3-alpha1', then the version extra string is 'alpha1'.

    (Or whatever a correct example is here.)

  4. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,100 @@
    +    $version_string = strpos($version_string, static::CORE_COMPATIBILITY_PREFIX) === 0 ? str_replace(static::CORE_COMPATIBILITY_PREFIX, '', $version_string) : $version_string;
    

    This seems to recognize that the module version may not start with CORE_COMPATIBILITY, but (again) not that core itself will deprecate the constant later.

    Also, what about cases where the module is 7.x-1.2? Should we be throwing an exception or otherwise handling prefixes that are not based on the core compatibility constant?

    Finally, I think we should also at least have a code path and @todo for modules with 9.x- prefixes. Right now we're depending on d.o disallowing that branch, but core should also hardcode that expectation so we don't get undefined behavior. The reason I think a followup might be needed is those ≈10 projects that managed to create a 9.x- branch before we disallowed it. We have to decide how we're going to deal with those first. There might already be an infra issue about those projects.

  5. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,100 @@
    +    return new static($major_version, $version_extra);
    ...
    +  protected function __construct($major_version, $version_extra) {
    +    $this->majorVersion = $major_version;
    +    $this->versionExtra = $version_extra;
    

    Wait but... what about semver? It's not supported yet, but we're trying to support it. Also, shouldn't this also support core modules, which do have a minor version?

    Maybe we don't need it yet, but shouldn't we set things up such that a BC break isn't necessary once we do?

  6. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,100 @@
    +   * Constructs a module version object from a support branch.
    

    Does "support branch" in this context mean "supported branch of core"?

  7. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,100 @@
    +   * This can be used to determine the major and minor versions. The patch
    +   * version will always be NULL.
    

    This is the only mention of minor versions in the class.

    Also, will the patch version actually always be NULL?

  8. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,100 @@
    +   *   The version extra string if available otherwise NULL.
    

    Nit: This is a run-on. I'd change it to:
    The version extra string if available, or otherwise NULL.

xjm’s picture

  1. +++ b/core/modules/update/update.compare.inc
    @@ -139,12 +140,13 @@ function update_calculate_project_data($available) {
    + * branches, so the first step is to make sure the development branch of the
    + * current version is still supported. If so, then the major version of the
    

    "currently supported development branches" seems like an oxymoron to me. In core and in the CI branch labels, we use "development branch" to mean the branch that hasn't had a stable release nor pre-release milestone yet, and is therefore totally unsupported.

    Would "currently supported core branches" be accurate? (Or "currently supported branches of the project" if it's about the project's branches and not core?)

  2. +++ b/core/modules/update/update.compare.inc
    @@ -353,18 +355,19 @@ function update_calculate_project_update_status(&$project_data, $available) {
         // Note: Some projects have a HEAD release from CVS days, which could
         // be one of those being compared. They would not have version_major
         // set, so we must call isset first.
    

    We don't call isset() first anymore, so we should update this comment to reflect that we're checking that it's not NULL instead.

    Also, I wonder if any such projects from CVS days are even remotely supported anymore? Maybe we can file a followup to clean that up?

  3. +++ b/core/modules/update/update.compare.inc
    @@ -381,32 +384,37 @@ function update_calculate_project_update_status(&$project_data, $available) {
    -    // Look for the 'recommended' version if we haven't found it yet (see
    ...
    +    // Look for the 'recommended' version if we haven't found it yet (SEE
    

    I don't think we mean to change this line to put SEE in all caps? :) Rolling that back should also un-weirdify the diff.

xjm’s picture

Next step of reviewing this is of course going to be to read update.compare.inc again, which I last did several years ago and which has haunted me ever since. 👻

xjm’s picture

I read through all the test fixture changes just to help verify that the only changes were removing the defunct keys (and I guess that @tedbow wasn't inserting any trolling about llama skeletons or something). I didn't double-check the exact supported branches for each fixture as yet.

A few general questions about the new feed structure (that, by definition, are probably all actually out of scope for this issue):

  1. +++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_1-alpha1.xml
    @@ -3,10 +3,7 @@
    -  <api_version>8.x</api_version>
    
    @@ -17,15 +14,10 @@
    -      <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
    -      <filesize>1073761824</filesize>
    

    The IS doesn't mention these things being removed from the feed, but I'm guessing they must be since this issue removes them. Is the new feed and what was changed and why documented somewhere, maybe in a closed infra issue?

  2. +++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_1-alpha1.xml
    @@ -3,10 +3,7 @@
    +  <supported_branches>8.x-1.</supported_branches>
    

    Whoa, funky, the data from d.o actually ends in a dot?

    Like, does d.o actually strip off the x that actually exists on the ends of the branch names I create in git? 😲

    And like. What if someone creates a 8.x-1.y branch? Or literally calls it 8.x-1. or any other such thing? I guess that probably fails some regex and therefore never ends up in the feed nor other d.o functionality. (Hopefully.)

  3. +++ b/core/modules/update/tests/modules/update_test/aaa_update_test.2_0-beta1.xml
    @@ -3,10 +3,7 @@
    -<default_major>1</default_major>
    

    Is the concept of a default branch also going away?

  4. +++ b/core/modules/update/tests/modules/update_test/aaa_update_test.sec.8.x-2.2_1.x_secure.xml
    @@ -106,15 +83,11 @@
    -   <terms>
    +  <terms>
    

    Now I feel like I need to go back and check the indentation of this in all the fixtures. :P

(I've now set myself up for @tedbow to insert an Easter egg into one of the fixtures and see if I notice it before commit.)

drumm’s picture

Is the new feed and what was changed and why documented somewhere, maybe in a closed infra issue?

https://www.drupal.org/drupalorg/docs/apis/update-status-xml

Whoa, funky, the data from d.o actually ends in a dot?

Like, does d.o actually strip off the x that actually exists on the ends of the branch names I create in git? 😲

And like. What if someone creates a 8.x-1.y branch? Or literally calls it 8.x-1. or any other such thing? I guess that probably fails some regex and therefore never ends up in the feed nor other d.o functionality. (Hopefully.)

Yes. Specifically, everything after the last dot is stripped to determine a release’s “branch”. This is not the same as a Git branch, it is grouping versions into a series.

Nothing is actually preventing people from making non-sensical releases, like tagging 8.x-1.0 on a 7.x-3.x branch. You can make a 8.x-1.y branch, or any other branch/tag you want, but you can only make releases when those match the version number formatting, which is indeed mostly regexps.

Is the concept of a default branch also going away?

Yes. The D7 code comments show this was some legacy layer:

    // Older release history XML file without supported or recommended.
    $supported_majors[] = $available['default_major'];
    // Older release history XML file without recommended, so recommend
    // the currently defined "default_major" version.
    $target_major = $available['default_major'];

Drupal.org can generate all update status XML files within 12 hours, so any we are producing would have been updated. The legacy update status XML still includes default_major since there’s probably a few outdated sites which can’t understand the replacement.

And all of these API elements related to “major” versions just don’t make sense as we move toward semver.

“Default branch” as a property of a Git repository remains, that is part of Git. It never has affected what goes in update status XML. That’s just the branch you get from git clone without a --branch parameter.

tedbow’s picture

re #84, yes indeed did not mean to relate this issue to itself. Was suppose to be #3105463: Create tests for recommended bugfix releases. I blame whoever invented browser tabs 😜
re #85

  1. Changing this to the literal string "8.x-". This will never be "9.x" or any other value because we are moving to semantic versioning for contrib. The ability to make 9.x releases has been removed.
  2. will come back to
  3. It now throws an exception if other core prefixes are found. I added unit test coverage for this.

    I updated update_calculate_project_update_status()

    1. If the currently installed version of module is invalid skips the module
    2. in determining the target major if the current release is not in currently supported branch it used the next supported branch that is value(doesn't throw UnexpectedValueException). If know are valid it uses current major(this is the same a current behavior if supported branches are not provided)
    3. For each release it evaluates it is not valid it will continue to the next 1.
  4. We don't need minor or patch release info right now. This class is already @internal and the constructor is protected. It is always created via the factory methods. Nobody should be extending it so we shouldn't have to worry about BC. But lets make this class final to be sure. I changed to final I don't anybody should be extending this. I don't think our update logic is an API. If we anyway worry about BC here we are effectively making it an API. The other option would be to make the constructor private.

    Patch and Minor are tricky because have documentation that in version strings 8.x-1.2 , 2 is "PatchLevel" but in our composer shim it is converted to 1.2.0 which makes in the minor. If core doesn't have an opinion on this it would easier.

  5. Removed mention of minor this was leftover. Patch should not be mentioned because we can't determine patch at all right now. Added a comment that ::getVersionExtra() will always return NULL for branches.
  6. fixed

re #86

  1. Changed to "currently supported branches for the project"
  2. Since the switch from CVS happened before 8.x and this new /current feed that we are using will only return 8.x and new versions including the semantic version contrib then we should not get any of these releases.

    It would only be problem we weren't making this switch. So removing the comment and the check for NULL. Updated \Drupal\update\ModuleVersion::createFromVersionString() to throw an exception if the major is not numeric. This will mean we will skip these releases because the logic that was put in above in this comment for skipping releases that through exceptions.

  3. fixed

re #87 I am also haunted #87. Someday 🙏 #3100110: Convert update_calculate_project_update_status() into a class

re #88

  1. updated summary. these were never used by core. @drumm pointed out docs in #89
  2. explained in #89
  3. ugghh @todo check all fixture indentations. Not doing now
xjm’s picture

xjm’s picture

  1. Normally I'd worry about still not having a policy for how we use private (technically the docs still say we don't use it and the issue's still open) but given that this is a totally new, totally internal, immutable value-object-thing with factory methods (and not injecting services nor of any conceivable use to contrib with the constructor), I think it's actually totally justifiable in this case under a current read of core policy.

    The only remaining thought I'd have with the class then is that the name itself sounds much more generic and globally useful than it is, but I'm also not sure I agree with myself about making the name something more specific either.

  2. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -7,14 +7,14 @@
    -   * The core compatibility prefix used in version strings.
    +   * The '8.x-' prefix is used on contrib module version numbers.
    

    Maybe this could say "...for both Drupal 8 and 9"? (Or whatever of that fits in 80 characters.)

  3. +++ b/core/modules/update/tests/src/Unit/ModuleVersionTest.php
    @@ -203,4 +225,28 @@ public function providerVersionInfos() {
    +      ['6.x-1.0'],
    +      ['7.x-1.x'],
    +      ['9.x-1.x'],
    +      ['10.x-1.x'],
    ...
    +      ['6.x-1.'],
    +      ['7.x-1.'],
    +      ['9.x-1.'],
    +      ['10.x-1.'],
    

    Should we be testing that 8.x branches aren't invalid as well?
     

  4. Should we add unit test coverage about non-dot-ended branch names?

  5. +++ b/core/modules/update/update.compare.inc
    @@ -140,8 +140,8 @@ function update_calculate_project_data($available) {
    + * series to consider. The project defines the currently supported branches for
    + * the project, so the first step is to make sure the development branch of the
    

    With the rewriting I now realize it says "The project defines... for the project..." We could say "The projecrt defines its currently supported branches in its Drupal.org configuration" or something along those lines.

  6. +++ b/core/modules/update/update.compare.inc
    @@ -254,7 +254,13 @@ function update_calculate_project_update_status(&$project_data, $available) {
    +  catch (UnexpectedValueException $exception) {
    +    // If the version has an unexpected value we can't determine updates.
    +    return;
    
    @@ -274,10 +280,23 @@ function update_calculate_project_update_status(&$project_data, $available) {
    +      catch (UnexpectedValueException $exception) {
    +        continue;
    +      }
    
    @@ -315,7 +334,12 @@ function update_calculate_project_update_status(&$project_data, $available) {
    +    catch (UnexpectedValueException $exception) {
    +      continue;
    +    }
    

    +1 for this; I had originally second-guessed my suggestion throwing an exception because of potential disruptions, but this mitigates it.

  7. +++ b/core/modules/update/update.compare.inc
    @@ -274,10 +280,23 @@ function update_calculate_project_update_status(&$project_data, $available) {
    +      // If there are no valid support branches us the current major.
    

    "us the current major" indeed. We totally are!

    A comma's also needed, so:
    If there are no valid supported branches, use the current major.

xjm’s picture

Status: Needs review » Needs work
tedbow’s picture

Assigned: tedbow » Unassigned
Status: Needs work » Needs review
FileSize
14.3 KB
195.68 KB

re #92

  1. Ok I added final in the last patch. Not changing the name in this 1.
  2. I would rather not specify versions explicitly because I could also see use back out of actually deprecating core: 8.x. Technically if you had module that did something very simple or I guess even complex that interacts with bit of we never change it could be compatible with 8, 9, and 10. 8.x- denotes compatiblity with 8 but know we will ignore at least in 9 and maybe after that.
  3. Yes. I increase test coverage for invalid branches and invalid version numbers. I think we should only parse version numbers that strictly match the version patterns we are expecting.

    So added extra checks for valid branches and valid version strings. Added extra test coverage for all this too.

  4. Done
  5. fixed
  6. fixed

So other code changes

  1. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,112 @@
    +    if (strpos($version_string, static::CORE_PREFIX) === 0) {
    +      $version_string = str_replace(static::CORE_PREFIX, '', $version_string);
    +    }
    

    This would actually would fail for to specific version numbers.

    dev snapshot 8.x-8.x-dev because it has 2 8.x- that would be replaced.

    dev snapshot 8.x-dev in this case 8.x- is actually not a core prefix but a snapshot release for support branch 8. branch

    Fixed and added test cases

  2. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,112 @@
    +      // Ensure the version string has no unsupported core prefixes.
    +      $dot_x_position = strpos($version_string, '.x-');
    +      if ($dot_x_position === 1 || $dot_x_position === 2) {
    +        throw new \UnexpectedValueException("Unexpected version core prefix in $version_string. The only core prefix expected in \Drupal\update\ModuleVersion is '8.x-.");
    +      }
    

    This would fail for dev snapshots for support branches such as 1.x-dev and 10.x-dev

    fixed and added test cases

  3. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -0,0 +1,112 @@
    +    return static::createFromVersionString($branch . 'x');
    

    I realized that adding an "x" on the to end of the branch means that we can't added validation in \Drupal\update\ModuleVersion::createFromVersionString() and throw an exception for versions like 8.x-1.x which is not a valid version number. So changing this to add a "0" instead which will create a valid version number. Since we no longer have getVersionMinor() and getVersionPatch() we don't have to worry about what they would return.

    I also add validation here to make sure the branch ends in "."

  4. +++ b/core/modules/update/tests/src/Unit/ModuleVersionTest.php
    @@ -0,0 +1,252 @@
    +      ['6.x-1.0'],
    +      ['7.x-1.x'],
    +      ['9.x-1.x'],
    +      ['10.x-1.x'],
    ...
    +      ['6.x-1.'],
    +      ['7.x-1.'],
    +      ['9.x-1.'],
    +      ['10.x-1.'],
    +    ];
    

    I realized these are test datasets with no keys. This makes debugging harder.

    I also add 2 other data providers that also have just 1 string argument tests cases. I create new helper method createKeyedTestCases() to create key test cases for all these providers.

xjm’s picture

#91 does not appear to be addressed yet.

xjm’s picture

This would actually would fail for to specific version numbers.

dev snapshot 8.x-8.x-dev because it has 2 8.x- that would be replaced.

dev snapshot 8.x-dev in this case 8.x- is actually not a core prefix but a snapshot release for support branch 8. branch

Nice catch on that!

xjm’s picture

  1. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -40,23 +40,34 @@ final class ModuleVersion {
    +          throw new \UnexpectedValueException("Unexpected version core prefix in $version_string. The only core prefix expected in \Drupal\update\ModuleVersion is '8.x-.");
    
    +++ b/core/modules/update/tests/src/Unit/ModuleVersionTest.php
    @@ -194,59 +131,233 @@ public function providerVersionInfos() {
    +    $this->expectExceptionMessage("Unexpected version core prefix in $version_string. The only core prefix expected in \Drupal\update\ModuleVersion is '8.x-.");
    

    Nitpick here, but we have an allowed value at the end of the string, related to a different value that can end in a literal .. Can we end this and any such exception messages with something like:
    The only core prefix expected... is: 8.x-

    That way we don't need to put a period at the end grammatically and we don't confuse sentence-ending periods with the literal . that we have to deal with also from the update XML.

  2. +++ b/core/modules/update/src/ModuleVersion.php
    @@ -40,23 +40,34 @@ final class ModuleVersion {
    +      throw new \UnexpectedValueException("Unexpected version number in $original_version.");
    

    Same suggestion here, "...in: $var" rather than "...in $var."

+++ b/core/modules/update/tests/src/Unit/ModuleVersionTest.php
@@ -194,59 +131,233 @@ public function providerVersionInfos() {
+  /**
+   * @covers ::createFromSupportBranch
+   *
+   * @dataProvider providerCreateFromSupportBranch
+   */
+  public function testCreateFromSupportBranch($branch, $expected_major) {
...
+  /**
+   * Data provider for providerCreateFromSupportBranch().
+   */
+  public function providerCreateFromSupportBranch() {

(Here and elsewhere.) If we add parameter documentation for the test method (i.e., explaining each key passed from the provider), that goes a long ways to making the strings of numbers more clear in terms of what's being tested. Inline comments in the provider for each case can help too.

xjm’s picture

Status: Needs review » Needs work

NW for #91 and #97.

kim.pepper’s picture

Status: Needs work » Needs review
FileSize
196 KB
4.34 KB

Fixes nits in #91 and #97.

tim.plunkett’s picture

Status: Needs review » Needs work

I last RTBC'd this in #73.
Reviewed every comment and response since then, only two bits of remaining work to be done:

#85.3
Missing examples on docs of \Drupal\update\ModuleVersion::$versionExtra

+++ b/core/modules/update/tests/src/Unit/ModuleVersionTest.php
@@ -277,6 +280,12 @@ public function providerInvalidBranchCorePrefix() {
+   * @param string $branch
+   *   The branch to test.
+   *
+   * @param string $expected_major
+   *   The expected major version.

Extra blank line here, and only 2 of the 7 methods had the docs added.
Additionally, none of the data providers document themselves. See \Drupal\Tests\layout_builder\Unit\OverridesSectionStorageTest::providerTestExtractEntityFromRoute() for an example.


With those two docs changes made, I am comfortable RTBCing this.

tedbow’s picture

Status: Needs work » Needs review
FileSize
4.87 KB
197.06 KB

@kim.pepper thanks addressing #91 and #97
@tim.plunkett thanks for the review

Fixed #100

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

Thanks Ted!
This is ready to go

  • xjm committed b126c02 on 9.0.x
    Issue #3074993 by tedbow, kim.pepper, bnjmnm, drumm, xjm, tim.plunkett,...

  • xjm committed eda1aa6 on 8.9.x
    Issue #3074993 by tedbow, kim.pepper, bnjmnm, drumm, xjm, tim.plunkett,...
xjm’s picture

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

Committed and pushed to 9.0.x and 8.9.x, yay!

I think we might want to backport this even further, so setting to PTBP while I discuss with @catch.

xjm’s picture

Status: Patch (to be ported) » Postponed

@catch and I agreed to backport this (and it'd be great to do before 8.8.2); however, we need to backport #3096078: Display core compatibility ranges for available module updates first, which in turn needs to have its usability issues resolved before being backported to a production release: #3102724: Improve usability of core compatibility ranges on available updates report. So postponing for now.

tedbow’s picture

Assigned: Unassigned » tedbow
Status: Postponed » Patch (to be ported)
tedbow’s picture

Assigned: tedbow » Unassigned
Status: Patch (to be ported) » Needs review
FileSize
200.07 KB

reroll for 8.8.x

tedbow’s picture

Status: Needs review » Reviewed & tested by the community

tests passed 🎉

Gábor Hojtsy’s picture

Re #107, #3102724: Improve usability of core compatibility ranges on available updates report has not actually been committed to Drupal 8.8 yet. Which one depends on which one?

tedbow’s picture

re #110
the xml fixtures in #3102724: Improve usability of core compatibility ranges on available updates report don't have <version_major>, <version_minor> etc.
So they won't pass until this issue is committed.

We could add those to the XML fixtures and see if it passes but it might have other problems.

I think the current issue should get committed first

  • Gábor Hojtsy committed d9c257a on 8.8.x
    Issue #3074993 by tedbow, kim.pepper, bnjmnm, drumm, xjm, tim.plunkett,...
Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Ok that makes sense given that #3102724: Improve usability of core compatibility ranges on available updates report is a reroll away. Reroll-party! Thanks!

xjm’s picture

Issue tags: +8.8.3 release notes

Since this is an important change and could have disruptive impacts compared to a typical patch release, it should be mentioned in the release notes.

tedbow’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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