Problem/Motivation

With the following issues

  1. #2807145: [policy, no patch] Allow contrib projects to specify multiple major core branches
  2. #2313917: Core version key in module's .info.yml doesn't respect core semantic versioning
  3. #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 not be able to tell if a module is compatible with a specific version or even a major version by the prefix 8.x- or 7.x-.

When all these issues are done a new contrib module created after these changes could have these releases:

  • 1.0.0 that is compatible with Drupal 8
  • 1.1.0 which compatible with Drupal 8.8 and above(not drupal 9
  • 1.2.0 that is compatible with Drupal ^8.8 and 9
  • 1.3.0 that is compatible with only Drupal 9

Currently with the metadata in the update xml from Drupal.org there would be no way of telling if these releases would work with the current major version of Drupal.

If a site is running Drupal 8 should they be shown all these updates?

Should we do #3074998: Add explicit information about core compatibility to update data so that Drupal core can filter out some of these?

In these example releases above any one of these updates could be a security release that makes the previous releases insecure.

If we decide not to show releases that are not compatible with the current version of core we should probably show them in any case if they are security releases.

If we decide to show all releases regardless of whether they are compatible with the current major version of Drupal core should there at lease be some message to tell the site owner that they will have to upgrade to the next major version of Drupal to update the module.

It could be possible for site that some of the contrib modules haven't been updated to Drupal 9 and some have and some are only compatible with Drupal 9. If the available updates report shows all of these without any indication of what state each module is in this could be very confusing.

Proposed resolution

In the near term we need a solution for #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 and the fact that all modules will no longer have core: 8.x in their info.yml files. If don't make any change except to use the CURRENT option that drupal.org offers for update XML the user will likely be shown contrib updates that are not compatible with there major version of Drupal(8 for now) without any indication of this.

Step 1: Completed 🎉

As first step we should:

  1. Switch to the new CURRENT #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates
  2. In #3074998: Add explicit information about core compatibility to update data add a new core_compatibility value for each update. This is will be based on core_version_requirement, or if not available, it will be based core: 8.x
  3. Display a message for each available project update that displays the core compatibility range based on 1) actually available Drupal core updates the update module has retrieved from the update server and 2) the core_compatibility for the project update xml (see above). For example:
    Requires Drupal core: 8.8.3 to 8.9.1

    This is now done and committed to 9.0.x, 8.9.x and 8.8.x branches:

  4. In this first step no modules will be filtered out of the list. This will mean hypothetically you could get projects updates with the message like:

    Requires Drupal core: 9.0.0 to 9.0.5

    In the near term this is very unlikely because 1) Drupal 9 is not out so no module should be compatible with it but not Drupal 8 and 2) 9.0.0 should be compatible with 8.9.0 for modules not using deprecated code. Therefore any module that is compatible with 9.0.0 because it remove deprecations should also be compatible with 8.9.0. So the project would likely have this in the project xml: core_compatibility: ^8.9 || ^9 or core_compatibility: ^8.8 || ^9.

Now complete!

Step: 2

After the above is we should determine if we want to filter out updates that aren't compatible with either your current core minor and/or your current core major version

Step 3

Determine if there is a way to display the update compatibility in a way that considers not just core compatibility but also other module compatibility (e.g. PHP version, module dependencies, etc) and other composer dependencies (e.g. #2494073: Prevent modules which have unmet Composer dependencies from being installed).

Remaining tasks

TBD

User interface changes

Available updates changes described/shown in linked issues.

API changes

None, Drupal.org XML changes in #3074998: Add explicit information about core compatibility to update data

CommentFileSizeAuthor
#15 macos-app-update.png626.72 KBwebchick
#15 macos-major-upgrade.png207.99 KBwebchick

Comments

tedbow created an issue. See original summary.

Mixologic’s picture

We cannot tell if a module is compatible with an end users system, *even if* we had someway to verify that at least *core* is compatible.

Core is just another dependency in a module's dependency chain, so in the example in the IS, we could have :

  • 1.2.0 that is compatible with Drupal ^8.8 and 9 and *also* introduces a new dependency on another contrib module

We really don't have any way of knowing whether the end user has that module or not externally.

So, its my opinion that we should treat the modules updates page somewhat as a combination of how composer update --dry-run and composer outdated currently function.

composer update --dry-run shows you what your site could upgrade to, given your existing dependency tree. It would typically only show updates that matched the major api of the existing module (i.e. 1.2.0->1.3.1).

composer outdated will show you *anything* that is newer than your currently installed module. (so 1.2.0 would show 2.0.0-alpha1 as an option). I think it would be useful to see that there may be new, backwards incompatible modules available. but not necessarily recommend them.

Finally, since we are now marking releases of projects as insecure/unsupported, that can happen regardless of a modules compatibility options, as the assumption is that its installed.

gábor hojtsy’s picture

I think there are two problems here:

  1. We want Drupal 8 to keep backwards compatibility in how it works. Yes, it does not care for the whole dependency tree (PHP version you are running, other Drupal modules, outside dependencies that may be conflicting with yours and not even core minor version compatibility from info files). Assuming an 8.x-3.2 module could be only 9.x compatible we can only keep Drupal 8 feature backwards compatibility if we add additional data to the update info so those could be filtered out locally.
  2. The second question area is what we want of future Drupal. Update module has become less and less useful exactly because it cannot check most of the dependency tree, it only checks Drupal core compatibility and done. It cannot catch if a module has a new Drupal dependency or you also need to update core to use the new module version, etc. So we need to define what we want out of update module in Drupal 9 and going forward and also consider what data we need for that.

I think 1 and 2 likely will be different solutions, but I have no doubt that 1 needs additional data in the update feed for backwards compatibility of Drupal 8.

xjm’s picture

Priority: Normal » Critical
Mixologic’s picture

We had a long discussion in slack about this, and I'd like to reiterate some things here:

I don't believe that there is any backwards compatibility that we need to keep compatibility with. There is currently no mechanism for determining whether or not a potential update can be installed on a users site. The only thing we are doing currently is assuming, that because the update came from the 8.x url, that it is compatible, because CORE_COMPATIBILITY = 8.x.

But that's not really the case at all. Modules may add new dependencies in updates, modules may add dependency constraints on drupal:system(>8.8), modules may add or change composer requirements. They might add php requirements as well, like a new php extension or a php version floor. A module may coincidentally be compatible with core, but it can just as likely be not compatible. (I just checked and theres about 264 d8 modules with *some* constraint on drupal:system.)

So from a UX perspective, whats the ideal experience for a user if, say they have a drupal 8.9 site, that cant quite convert to 9.0.0 yet because theres a couple modules that haven't yet converted deprecated code, and updates for some other modules they use start to appear that are 9.0 only because they use some symfony 4/5 apis. What should that user see?

  1. What they would currently see now, that there is an update for their module
  2. Show that an update is available but with a message that their site isn't a high enough version to use it?
  3. Not show the update at all

The first scenario means a user downloads the module, and attempts to install and gets told its incompatible, or they attempt to download with composer, but cannot, because dependency resolution wont allow it.

The second scenario is possible if we provide the core_version_requirement/core_compatibility data in the updates, but the *only* thing it is capable of handling is core itself. Anything else would still act like there's an update

The third scenario seems like we'd be hiding useful information from the user.

So I guess the question is given all the ways that a module can be incompatible with a users site, is it beneficial to have the updates report warn about core compatibility (since it is the most likely way a module will be incompatible), with the understanding that we cant know the rest of the dependency picture and that we might still be telling folks that an incompatible update is available?

Or would it be better to consistently tell users of available updates and let the install process handle the compatibility restrictions?

catch’s picture

fwiw I agree with @mixologic in #5.

Update status' approach is currently to tell you about any available update whether or not it's actually compatible with your site, but this allows you to then go and read the release notes for that version etc. (obviously not everyone does this).

The opposite approach to this is composer's, which if it finds an incompatibility will not inform you at all that it isn't updating, but silently keeps you on your current version. You can just about find out why you're not getting updated by using composer why-not but IME the experience of this is really bad.

For security releases, or when a version of a module goes unsupported, I think we really do want to inform people about updates even if the update is not compatible with their current version, because they still need the information and should get themselves in a position to be able to update. For normal updates, we still should lean towards telling people about updates because the longer we don't, the more likely they'll end up on an unsupported release / hit by a security release they can't update to yet.

So while it would be good for the UI to be able to inform people of likely problems, I do think the current situation while imperfect, is a better compromise than what composer does on the command line and it is likely to be very, very difficult to bridge the two.

tedbow’s picture

re #6

Update status' approach is currently to tell you about any available update whether or not it's actually compatible with your site, but this allows you to then go and read the release notes for that version etc.

emphasis added.

The currently functionality is to show any updates that match the api_version you are currently on as determined by \Drupal::CORE_COMPATIBILITY(@see \Drupal\update\UpdateFetcher::buildFetchUrl()). the update doesn't filter results but it does request only 8.x modules.

Of course currently there are no 9.x modules so this is effectively the same thing. But luckily we do have a url we actually test 😜

https://updates.drupal.org/release-history/bad_judgement/8.x?version=8.x...
Returns the 2 drupal 8 releases. It does not return any Drupal 9 releases

https://updates.drupal.org/release-history/bad_judgement/9.x?version=8.x...
Does return the Drupal 9 release.

Drupal 7 also behaves the same way. Not sure about before.

I am not saying we shouldn't display all updates I just saying we will be changing the way the update module currently behaves and the way the update module in at least Drupal 7 behaves.

Historically upgrading to a new major version of Drupal was super disruptive so didn't do it just because there was an update for your module that was only compatible with the next major version of Drupal.

I think if possible should at least we should put a label on modules that require you to update to the next version of Drupal core. But maybe this should be a should have.

This is not as simple as checking core: 8.x anymore because of core_version_requirement but I think we could do something like \Drupal\Core\Extension\InfoParserDynamic::isConstraintSatisfiedByPreviousVersion() if drupal.org provided the core_version_requirement value for releases.

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.

dww’s picture

Ahh, I just found this issue. I posted some comments at #3074993-16: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates that probably should have been in here.

...
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. ;)

So, uhh, yeah, agreeing with @Mixologic in #5. I'm really not sold that all this effort is worth the trouble. I think end users would get more benefit from the composer initiative, and putting something like a UI around composer update --dry-run and friends.

Mixologic’s picture

So, one end goal on the "someday, it would all be awesome" horizon for the composer initiative is that composer could become the dependency managment/updates interface entirely for core, maybe targeting Drupal 10.

The primary issue with that is composer currently uses *far* too many resources in both memory and cpu to be something we can wrap a web request ui around at the moment. (like gigs of ram and minutes of processing)

We wont be able to even think about doing something of that nature until we've fixed the performance problems with composer - which, there is a lot of work going into looking at ways to do that - but those are all a long ways off (composer 2.0, and many other architectural issues with composer, that are difficult to fix).

So, updates module will likely be around for another few years, so we're going to have to make a best effort to making it usable.

Given that I think Ted's suggestion here:

This is not as simple as checking core: 8.x anymore because of core_version_requirement but I think we could do something like \Drupal\Core\Extension\InfoParserDynamic::isConstraintSatisfiedByPreviousVersion() if drupal.org provided the core_version_requirement value for releases

Would probably be the way to go to handle things like your aforementioned token module situation.

We're now storing the core_version_requirement so we have that data available to put into the metadata: https://www.drupal.org/project/project_dependency/issues/3084046

tedbow’s picture

Looking back at the comments here this might be a good approach for contrib modules

  • Show all updates regardless of whether they would be compatible with their current core version

    This would address @Mixologic and @catch's points above. I think most importantly @catch's point in #6

    For security releases, or when a version of a module goes unsupported, I think we really do want to inform people about updates even if the update is not compatible with their current version, because they still need the information and should get themselves in a position to be able to update.

  • If the module is not compatible with their current version of Drupal core as determined by the projects core_version_requirement display a message with the update like:

    This update requires an update to Drupal core. It requires Drupal [CORE_VERSION_REQUIREMENT]

  • Do not try to change the message based on whether the site would need to update to minor of the same major version or if requires a new major version

    So the message might be

    ....It requires Drupal: ^8.9.1

    or it might be

    ...It requires Drupal: ^9.1

    Obviously the second message means they will have to update to a new version of Drupal core. But it would be up to the user determine that.

    This would require drupal.org to return core_version_requirement in the update xml for each release.

  • If we think updates to a new major version of Drupal is special case we could create a follow up to change the message in that case.

    Unfortunately there is not composer method to call to determine if something is only compatible with the next major version of project.

    We could though determine that because the update module can know all version of Drupal so we could do something like Drupal\Core\Extension\InfoParserDynamic::isConstraintSatisfiedByPreviousVersion() to determine if it is satisfied by them.

    but we could determine that in a follow-up

  • Of course using core_version_requirement is not a perfect way to determine even Drupal core compatibility. Because modules use drupal:system (>8.8)
    If we wanted to we could do a follow up to factor this in. But I think providing info based on core_version_requirement is better than nothing.

    Hopefully this will show all modules that need a major core update though it would not flag all updates that require a minor version update.

  • another idea for a follow up is to not allow drupal:system (>8.8) in Drupal 9. As long as we don't have sub-tree split of Drupal core modules core_version_requirement can now be used replace this.
  • if we did this before #3005229: Provide optional support for using composer.json for dependency metadata then in that issue we should factor in composer.json core requirements if that is what is being used for a module

    Mixologic’s picture

    Unfortunately there is not composer method to call to determine if something is only compatible with the next major version of project.

    There might be.. composer outdated --minor-only exists. More here: https://getcomposer.org/doc/03-cli.md#outdated

    --minor-only (-m): Only shows packages that have minor SemVer-compatible updates.
    

    we can unpostpone https://www.drupal.org/project/infrastructure/issues/3074998 and add the data there, as long as we all understand that data cannot be used for anything more than informing a user that their core version is too outdated for the update. (i.e. not use it to *filter* anything out)

    tedbow’s picture

    @Mixologic re "composer outdated" I was referring to stuff we could call from update module without doing the whole web wrapper around composer thing in the near term.

    Mixologic’s picture

    Ah, yes, I guess I was more thinking -> lets look at the composer source and see what its doing to handle --minor-only except do something potentially similar for 'next major, vs, lets use composer to do this.

    webchick’s picture

    StatusFileSize
    new207.99 KB
    new626.72 KB

    Whenever there are questions about how things ought to work, it's sometimes helpful to look at what other applications do, because those can help inform user expectations.

    Apple handles notifications of new OS versions separately from updates of the "apps" that are installed. I can go to About this Mac > Software Update... and see that macOS Catalina exists...

    Major OS availability indicated elsewhere

    ...but in my App Store updates, I only see updates that are relevant to my currently installed OS:

    Three applications that are installed need an update.

    (I know this is true because I have an iPad that is older than dust, and only a small handful of the apps on it show updates available, despite my newer iPhone has updated the same applications several dozen times over the past few years.)

    Chrome / Firefox would be other good programs to check the workflow of, but I personally can't do that because I have automatic updates enabled, and therefore nothing is out of date. ;P But they too also handle the "platform" version update separately from the "extension" version updates.

    I don't have access to a Windows machine to see how they do it, but that'd be another place to look for inspiration.

    Drawing from those examples, though, I think the user stories to satisfy would be:

    - As a site builder, I expect the list of available updates to be limited to only those that will work with my (minor, preferably; else, fall back to major) version of Drupal.
    - As a site builder, minor/major version updates are Kind Of A Big Deal™ so I don't want to be distracted with thinking about them until I'm in the right headspace/have plenty of time in front of me/etc.
    - However, as a site builder, if a security problem exists that can only be rectified by increasing my minor/major version of Drupal, I DO expect to be notified of that. (Because otherwise how could I possibly know?)

    ^ I'm not sure how feasible those stories are to fulfill, since we'd probably rather not re-implement Composer in Update module. :P But it does make sense to me that those would be the expectations, based on how other update notification systems that people are likely to have interacted with every day work.

    I guess I'm surprised that hacks like drupal:system (>8.8) are still needed/supported; I figured core_version_requirement would be flexible enough to handle those kinds of requirement increases. If it did, that would make the first user story much easier to address, I would think? (if (!empty(core_version_requirement) { ... use it ... } else { use "core" value })

    As far as new dependencies/requirements that get added in in an update that "appears" to be compatible with your system, I don't think that's a huge deal; even with a routine app update on your OS, a newer version of some library could be required, or some other manual thing you need to address prior to updating. Not validating for this is also a "pre-existing condition" in HEAD.

    catch’s picture

    I think some combination of @tedbow's plan in #11 and @webchick's UX ideas in #15 could work well. Maybe in two steps?

    First of all get core_version_requirement into Drupal.org release information and then show it in the existing update status UI.

    Then an UX something like this:

    1. Security updates (all)
    2. Contrib patch and minor updates (compatible)
    3. Core minor or major updates

    However one issue is that while software update processes only show updates you can do and major updates separately, the major updates when they run will always include all your dependent code as well. i.e. if I do an ubuntu major update, that update will include updates to everything else I have installed (at least stuff from the official repositories) without me having to go back and separately update them.

    For us a core minor or major update may or may not require an update to contrib modules and we're assuming a manual process still. So we would probably need to do:

    1. Security updates (all)
    2. Contrib patch and minor updates (compatible)
    3. Core minor or major updates AND contrib updates that require the newer version of core.

    Mixologic’s picture

    One thing worth noting is @drumm's comment here: https://www.drupal.org/project/drupalorg/issues/3074998#comment-13350246

    Projects are what get security updates, and yet Drupal deals in modules, and has a somewhat convoluted way to imitate turning a module back into a project. We'll have to do some of the same sort of thing of turning *module* requirements into *project* requirements. And hope that maintainers don't do weird things like have different core_version_requirement set to different values within their project.

    eg:
    http://git.drupalcode.org/project/drupal/blob/8.9.x/core/lib/Drupal/Core...

    tedbow’s picture

    Thanks @webchick @Mixologic and @catch for further perspective here.

    Given the time frame for getting this stuff done it would be good to get an idea of what is acceptable now and what we want to do later.

    1. re #16

      It sounds like good first step would be

      First of all get core_version_requirement into Drupal.org release information and then show it in the existing update status UI.

      So my understanding of this would be we would show all future update and just show the core_version_requirement or not available core

      That would handled for drupal.org on #3074998: Add explicit information about core compatibility to update data
      Then perhaps we could add into the Update Status UI in #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates because that is the issue originally postponed when I created this issue and it would start to bring in updates that would not be compatible with the current version of core.

    2. I do think we have to keep in mind things we do now that might stop us from making changes later because they will be consider too big of BC or user facing changes.

      One thing that comes to mind.

      If we do 1) and later on when we have more time be able to show: only updates that are compatible with the current major(or minor) core version.

      I am just concerned that if we try to make the change later we will hear feedback "you can't remove updates from the list that you were previously showing to the user"
      I am not saying that isn't valid feedback.

      Just saying it would be good to get an idea of the future plans so we don't paint ourselves into a corner.

      What do we have to do to avoid that situation? Do we need an exact plan now just decide now that it is ok to remove some updates from the list later if they decide to filter on core compatibility?

    3. re #15
      @webchick

      As a site builder, I expect the list of available updates to be limited to only those that will work with my (minor, preferably; else, fall back to major) version of Drupal.

      To me showing only updates that are compatible with the minor version of Drupal core that is installed does not seem better than showing contrib modules that are compatible with my major.

      since we now do security coverage now for 2 minor versions of Drupal core I would think a lot of sites would skip a minor version. After #2998287: Provide accurate information on the security coverage of the 8.x final minor and LTS, and recommend updating to the next major version when appropriate this will be more evident that they can skip a minor and still get security coverage.

      If a site is skipping minor core versions on purpose it seems if we only show them updates that are compatible with their minor they are going to miss a lot of updates that would require to update to the next minor version of core. So even if do show all updates that are security updates they would still miss a lot of bug fix updates. To me having a module that is integral to my site have a bug fix update would be a good reason to update to the next minor version of core.

      I don't think we should worry to much about the fact that we might be showing updates that would require a site to update their Drupal core more than 1 minor version because if they are more than 1 behind they will not a have security coverage for core and we should do everything we can to encourage sites to keep on security supported core minors.

    4. One thing to keep in mind is that if we decide to do 1) now for 8.8 or if too late then 8.9 then the question of filtering out modules that aren't compatible with the current minor(vs major core version is effectively a Drupal 9 question.

      Because if do 1) in 8.8 then the follow up would likely be 8.9. So if there is no 8.10 we don't have to worry about site being on 8.9 and seeing or not seeing updates that are only compatible with future 8 minors

    5. I guess I'm surprised that hacks like drupal:system (>8.8) are still needed/supported; I figured core_version_requirement would be flexible enough to handle those kinds of requirement increases.

      As of Drupal 8.7.7 core_version_requirement you should not need to do use drupal:system (>8.8). Since there modules out there that currently use it I don't think we can dismiss out of hand. Though It maybe be just complicated to factor it in here.

    It would be great if we could get agreement that we wanted to do 1) now with possible filtering of updates later based on UX consideration and feedback such as @webchick comments in #15

    webchick’s picture

    I haven't had a chance to process the rest of that comment, but just quickly:

    To me showing only updates that are compatible with the minor version of Drupal core that is installed does not seem better than showing contrib modules that are compatible with my major.

    What I meant is that if I'm on Drupal 8.6, and there's a (non-security) module update that requires a minimum of Drupal 8.8, I should not see that update in my list. Because then it's just teasing me. It's not actually an option to update to until I complete my D8.6 => D8.8 conversion, which might be several weeks/months from now, and will happen entirely independently of me upgrading, say, Paragraphs module.

    If we show all updates regardless if they're compatible or not, we unnecessarily bloat my "you need to update this stuff" dashboard with non-actionable clutter, which is defintely not ideal, because it then teaches me to ignore update notifications as meaningless noise, when most of the time I should actually really care what's in there and making sure I'm on the latest (feasible) version of the code, esp. in order to make my eventual move from D8.6 -> D8.8 much less error-prone.

    catch’s picture

    What I meant is that if I'm on Drupal 8.6, and there's a (non-security) module update that requires a minimum of Drupal 8.8, I should not see that update in my list.

    The one problem with this though is that the version that requires Drupal 8.8 might also be the only version of that module that's compatible with Drupal 8.8. So when you actually do want to update to Drupal 8.8, we should show that there's also a contrib module update to do at the same time. This could be in a different list somewhere but I think we should try to avoid telling people they only need to update core, then after they've update either their site doesn't work at all due to module incompatibility, or they get a tonne of update notifications they had no idea about.

    catch’s picture

    I do think we have to keep in mind things we do now that might stop us from making changes later because they will be consider too big of BC or user facing changes.

    The update status controller isn't an API, so we should be able to make whatever changes we want to it.

    Even if we decided there was some kind of backwards compatibility issue, there could be a new/old UI switch or an experimental module or some other way to gradually replace it.

    tedbow’s picture

    Not commenting on #19 and #20 for now.

    If we can make any changes to the update module regarding this area in #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates by 8.8.0 as first step to just put a message with each update with the core_version_requirement value before 8.8.0 which is released in less that a month then I think it is urgent we figure out that out now. The other things that are being discussed are more complicated and I think have no chance of getting into 8.8.0 but we could figure those out later.

    The reason I think it is urgent getting something in 8.8.0 in less than a month is:

    1. 8.8.0 comes out in less than a month
    2. We don't know when #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 will be done but hopefully sooner rather than later.
    3. For #3009338 to land we have to get away from requesting updates from drupal.org with the 8.x key. So have to do #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates
    4. 8.8 will be supported or a year until 2020-12-02(from my understanding of working on #2991207: Drupal core should inform the user of the security coverage for the site's installed minor version including final 8.x LTS releases)
    5. 9.0.0 is currently scheduled to come out June 3, 2020(I know this is could be delayed)
    6. As soon as 9.0.0 is released(or before) we can expect some modules to be only Drupal 9 compatible(new modules that require one of Drupal 9's updated dependency for instance)
    7. If we do #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates we didn't have some initial solution for telling the user that a module is only compatible with Drupal 9(probably by showing core_version_requirement) then sites that are on 8.8.0(or any patch release after we haven't solve this) will start to see modules in the update UI that are not compatible with the site's major version

      As far as I know Drupal update status UI has never done that.

    So can we agree as a bare minimum first step we should put a message with core_version_requirement for each update in #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates?

    That would get stuff moving on changes we need coordinate with #3074998: Add explicit information about core compatibility to update data for drupal.org changes.

    Then we can figure out filtering modules based on major or minor core compatibility. Hopefully before any Drupal 9 only modules come out!

    tedbow’s picture

    I chatted with @Mixologic about #22

    tldr:
    Similar to #22 but We could show all updates regardless of core compatibility but instead of showing core compatibility: ^8 || ^9 we should core compatibility: 8.7.10 to 9.1.0(given 9.1.0 is the latest patch release)

    he was concerned about showing core_version_requirement which are composer semver constraints in Update UI. Since a lot of people would not know what that means.

    While I also had concerns about this too I thought anything other that would be too complicated to determine. We figured out that it might not be too complicate to display a range a compatibility for Drupal core.

    We could do this because the update module has access to all all available Drupal core releases via the drupal.org XML it retrieves.

    So for each contrib update we could loop through all releases of Drupal core that are after the installed version.

    We could then display compatiblity something like this example
    Installed core: 8.8.3
    latest 8.x patch release: 8.9.1
    Drupal 9 not released yet
    core_version_requirment: ^8 || ^9

    This module is compatible with Drupal core: 8.8.3 to 8.9.1

    If Drupal 9.0.3 had been released

    This module is compatible with Drupal core: 8.8.3 to 9.0.3

    if core_version_requirment: ^8.8.9 || ^9

    This module is compatible with Drupal core: 8.8.9 to 9.0.3

    Most constraints could be displayed as a range between two versions as they won't have exceptions in between.
    Some constraints though would have exceptions such as core_version_requirment: ^8 || ^9.03
    or core_version_requirment: ~8.8.0 || ^9(which might be used if you mixed up ^ and ~)
    But these would be rarer. We could decide later what to do in this case but a simple solution would just to be list all core versions(>= the installed) that module is compatible with.

    This solution probably won't be that complex and the performance should not be that bad. We ran into similar problems as far as performance in #2313917: Core version key in module's .info.yml doesn't respect core semantic versioning where we introduced core_version_requirement.

    Basically don't have compute core compatibility for each module just for each unique value for core_version_requirement. So if you have 200 modules and most have the core_version_requirement: ^8 || ^9 or core: 8.x you still only have to calculate the core compatibility 2 times for all those modules. But in #2313917 we did test where we had to so a similar calculations and it wasn't much of performance hit.

    dww’s picture

    +1 to not printing the raw semver constraint, and instead showing actual version numbers.

    -1 to showing *all* possible core releases a given thing is compatible with. If you're 6 months behind schedule (which is totally legit and normal for a ton of sites), it's going to be super overwhelming noise on the update report to see

    This module is compatible with Drupal core: 8.9.0, 8.9.1, 8.9.2, 8.9.3, 9.0.0-alpha1, 9.0.0-alpha2, 9.0.0-beta1, 9.0.0-rc1, 9.0.0-rc2, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.0.4, 9.1.0-alpha1, 9.1.0-beta1, 9.1.0-beta2, 9.1.0, 9.1.1, ...

    next to most of your installed projects...

    If there are exceptions, either:
    a) Punt, assume the user isn't going to jump to a less-than-latest version. If they do, they'll find out it's incompatible then.
    b) Figure out the exceptions (if any) and put them in some hidden pop-up thingy?
    c) Figure out the exceptions (if any) and put in a generic "Some exceptions found, please use the latest available release" (more or less).

    p.s. Ugh, I just realized. We're telling contrib maintainers that we suggest they use this:

    core_version_requirement: ^8 || ^9

    Which is going to match 9.1.0, right? How do I know now, when tagging my contrib module's next release, if it's still going to be compatible with 9.1.x? I have no friggin' idea. It's probably going to be wrong by then. At most, shouldn't we be recommending folks do:

    core_version_requirement: ^8 || ^9.0

    ?

    tedbow’s picture

    re #24

    1. core_version_requirement: ^8 || ^9

      Which is going to match 9.1.0, right? How do I know now, when tagging my contrib module's next release, if it's still going to be compatible with 9.1.x? I have no friggin' idea.

      I think is fine. Minor version version are suppose to be backwards compatible(I know in practice this doesn't always work). though in practice because modules will be removing calls to functions we deprecated in 8.8.x then most should use

      core_version_requirement: ^8.8 || ^9

      But this is the same someone doing core: 8.x in contrib module when 8.0.0 was released. Did they 100% know it was going to have no bugs with 8.1.0? of course not. But we didn't suggest all authors use
      - drupal:system (<8.1)
      Because in most cases it will fine when 8.1.0 comes out. Same as 9.1.0. In most cases if module is compatible with 8.8.0 assuming we don't make deprecations 8.9.x(or if they don't use the newly deprecated things) then it should be compatible with 9.0.0, 9.1.0 etc. but not 10.0.0.

      Further more module can set up their automated tests in multiple ways, like Supported, Prerelease to ensure that if their module is not compatible with the next minor version the tests will fail and they will be notified.

      But I think this separate issue and if want recommend something else core_version_requirement(because we want them to assume minor version will not be backward compatible 🙀) then we should open up a different issue.

    2. -1 to showing *all* possible core releases a given thing is compatible with.

      I agree this would be bad. I was just suggestion this would be the simplest thing to figure out in the rare case that a project's core compatibility could not can be expressed as a range between 2 existing versions.

      next to most of your installed projects...

      again I think there will be few modules that actually use core_version_requirement that aren't a simple range.

      But agree we should find the simplest way to express this.

      in the 2 cases I listed above \ that were exceptions they could easily be list as 2 ranges.
      so if we are going off released core version.

      Given:
      Installed core: 8.8.3
      latest 8.8.x: 8.8.7
      latest 8.x patch release: 8.9.1
      Drupal 9 not released yet

      core_version_requirment: ~8.8.0 || ^9

      This module is compatible with Drupal core: 8.8.3 to 8.8.7

      Because 9 hasn't been released it won't come into play.

      If Drupal 9.0.3 had been released

      This module is compatible with Drupal core: 8.8.3 to 8.8.7 and 9.0.0 to 9.03

      so if in those examples it is only 2 ranges. Of course with more complicated core_version_requirement values the displayed message would get longer but I think those would be very rare and any site is likely to only have 1 or 2 at most.

    3. So I would update my suggestion from #23 to be

      As a first step: We could show all updates regardless of core compatibility but instead of showing core compatibility: ^8 || ^9 we should core compatibility: 8.7.10 to 9.1.0(given 9.1.0 is the latest patch release) or the simplest possible way to express the compatibility

      I think we can figure out exactly what that is on #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates which will need that change.

    webchick’s picture

    It seems like we're winding towards a proposed resolution. When we have it we should make sure it's reflected in the issue summary, since this comment stream is rather dense. :)

    tedbow’s picture

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

    @webchick good point!

    update proposed solution.

    the "Near term solution" section is the most fleshed out and what need to get consensus on ASAP.

    catch’s picture

    The proposed solution and

    This module is compatible with Drupal core: 8.8.3 to 8.9.1

    looks good to me.

    I think we should try to get this into 8.8.0 right up until and during rc.

    tedbow’s picture

    Ok some additional complications.

    There 2 things going in on in the "first step" for this issue

    1. Displaying a message

      This module is compatible with Drupal core: 8.8.3 to 8.9.1

      based on core_compatibility from the update xml from Drupal.org

    2. #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates
      which will switch the update from using */8.x/* in the url it used to request updates from drupal.org to */current/*

      This will allow use to do #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. It will also let the update module work in Drupal 9 because there will be no 9.x-* modules on drupal.org.

    The problem is the switch to */current/* also entails switching some other metadata in the drupal.org update xml about project and their releases.
    For instance #3085717: [PP-1] Do not rely on version_* tags. But also recommended_major, supported_majors. This metadata is not really going away in */current/* just changing form. For example from <supported_majors>1</supported_majors> to <supported_branches>8.x-1.</supported_branches>

    For most of this we have zero test coverage for in \Drupal\Tests\update\Functional\UpdateContribTest which our only functional test available updates for contrib.

    So really should create the tests first like in #3094304: Create tests that cover contrib non-full releases and contrib patch versions and after we have test coverage switch to */current/*.

    This seems like a lot to do before 8.8.0(though I am up for trying)

    The other option would be to add core_compatility to the current */8.x/* feed from Drupal.org. And get
    a) from above done for 8.8.0 and then add the tests and switch to */current/* in a patch release like 8.8.1 if possible.

    drumm’s picture

    The other option would be to add core_compatility to the current */8.x/* feed from Drupal.org.

    I deployed this earlier today, #3074998-29: Add explicit information about core compatibility to update data, and all update status XML should finish regenerating in 20 hours or less.

    tedbow’s picture

    I split out #3096078: Display core compatibility ranges for available module updates from #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates

    This is what I hope we can get done before 8.8.0 if #29 get buy in.

    I have patch up but still rough. will work on it more tomorrow to get ready for reviews.

    catch’s picture

    Is this now a duplicate of #3096078: Display core compatibility ranges for available module updates? Or if not is what's remaining here critical?

    tedbow’s picture

    Title: Determine how available updates for modules should be handled if they are not compatible with the current version of Drupal core » [Meta] Determine how available updates for modules should be handled if they are not compatible with the current version of Drupal core
    Issue summary: View changes
    Issue tags: -Drupal 9, -Needs issue summary update +Drupal 9 compatibility

    UPdated the summary.

    Changed this too a meta if we want to leave this open to track steps 2 and 3 or even decide if they are good idea.

    Or we could close this issue

    tedbow’s picture

    Issue summary: View changes

    I updated the remaining tasks with issues that need to be ported to 8.8.x

    tedbow’s picture

    Issue summary: View changes
    tedbow’s picture

    dww’s picture

    The backport party for step 1 is now complete! 🎉 Removed all that from remaining tasks.

    Fixed some spelling errors, grammar errors, and other minor updates to reflect current reality.

    I don't believe this plan still needs to be critical. The critical pieces are either already done, or there's an existing critical issue open (e.g. #2991207: Drupal core should inform the user of the security coverage for the site's installed minor version including final 8.x LTS releases which is now RTBC). Downgrading to major for now.

    Thanks,
    -Derek

    xjm’s picture

    tedbow’s picture

    Issue summary: View changes

    Updated the summary to mark step 1 as completed. I think step 2 & 3 are things that still need to be decided if actually want to do them.

    for step 3)

    Determine if there is a way to display the update compatibility in a way that considers not just core compatibility but also other module compatibility (e.g. PHP version, module dependencies, etc) and other composer dependencies

    I know in the automatic updates initiative Drupal session that have talked about running version of composer in the web request. If this was possible then maybe we could use this in the update manager also. It seems like a long term prospect though.

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

    Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

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

    Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

    tedbow’s picture

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

    Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

    Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

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

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

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

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

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

    liam morland’s picture

    Updates that are listed under "Not compatible" on admin/reports/updates/update should not cause the status report to have a "Module and theme update status" "Out of date" warning so long as there is still a supported version installed.

    Version: 11.x-dev » main

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

    Read more in the announcement.