Hrm, here's a case I didn't find when pounding on http://drupal.org/node/197186. I'm not even sure this is a bug, but I wanted to submit it for feedback before I worry about a (relatively trivial) patch for it...

Here's the scenario:

- You've got a project with a 6.x-1.* and 6.x-2.* series, where 6.x-1.2 and 6.x-2.4 are the latest releases.

- Maintainer says both are supported, but 6.x-2.* is recommended (via the new project maintainer UI from http://drupal.org/node/203313).

- A site is running 6.x-1.2.

Currently, update.module tells you:

foo 6.x-1.2            Up to date
Also available:   6.x-2.4

Everything is green/ok, there's no warnings or errors (as expected).

However, it seems like the fact that the maintainer marked the 6.x-2.* series as "recommended" should show up here, too, especially since we already have that info in the .xml files. This case should probably look more like this (still green/ok):

foo 6.x-1.2            Up to date
Recommended version:   6.x-2.4

Do people think this is worth fixing? I'm slightly torn. On the one hand, the maintainer *did* call 6.x-2.* "recommended", so update.module should echo that info. However, it's slightly weird, given the existing update.module UI, for it to say "up to date" but still print out a "Recommended version", since currently, we only print out "Recommended" when the user is some how out of date...

Thoughts?

Thanks,
-Derek

Comments

webernet’s picture

Calling it recommended might be preferable - assuming the current non-recommended branch may be on it's way to being unsupported.

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs work
StatusFileSize
new5.87 KB

Here's a work-in-progress. It mostly works great, without even breaking the string freeze. The good news is that, in the existing UI, if the currently installed version is the recommended release from the "target major", we never print out a "Recommended version:" line in the available updates report. However, internally, the code still expects the 'recommended' version to be from the same major version as the "target major". So, if we hit the case where we're running an older major which is still supported but no longer the recommended version, we can just record the maintainer's recommended version in a new 'maintainer_recommended' field in the project array. Then, when we're generating the available update report, if we see this 'maintainer_recommended' field, we can print that out as the "Recommended version:".

I've tested a bunch of edge cases here, and everything works with 2 important exceptions ('C' and 'G' in the following list):

A) the simple case:
- existing: 6.x-2.0, 6.x-1.2, 6.x-1.1
- recommended major: 2
- supported majors: 2, 1
- current: 6.x-1.2
* Recommended version: 6.x-2.0

B) beta exists for V1:
- existing: 6.x-2.0, 6.x-1.3-beta1, 6.x-1.2, 6.x-1.1
- recommended major: 2
- supported majors: 2, 1
- current: 6.x-1.2
* Latest version: 6.x-1.3-beta1
* Recommended version: 6.x-2.0

C) only a beta for maintainers' recommended major: [TODO: broken]
- existing: 6.x-2.0-beta1, 6.x-1.3-beta1, 6.x-1.2, 6.x-1.1
- recommended major: 2
- supported majors: 2, 1
- current: 6.x-1.2
* Recommended version: nothing // Evil, should recommend 6.x-2.0-beta1
* Latest version: 6.x-1.3-beta1

D) betas for both V1 and V2:
- existing: 6.x-2.0, 6.x-2.0-beta1, 6.x-1.3-beta1, 6.x-1.2, 6.x-1.1
- recommended major: 2
- supported majors: 2, 1
- current: 6.x-1.2
* Latest version: 6.x-1.3-beta1
* Recommended version: 6.x-2.0

E) mix of betas and stable releases for maintainers' recommended major:
- existing: 6.x-2.1-beta1, 6.x-2.0, 6.x-2.0-beta1, 6.x-1.2, 6.x-1.1
- recommended major: 2
- supported majors: 2, 1
- current: 6.x-1.2
* Recommended version: 6.x-2.0
* Latest version: 6.x-1.3-beta1

F) 3 major branches:
- existing: 6.x-3.0-beta1, 6.x-2.1-beta1, 6.x-2.0, 6.x-2.0-beta1, 6.x-1.2, 6.x-1.1
- recommended major: 2
- supported majors: 3, 2, 1
- current: 6.x-1.2
* Recommended version: 6.x-2.0
* Also available: 6.x-3.0-beta1

G) Simple case, out of date: [TODO: broken]
- existing: 6.x-2.0, 6.x-1.2, 6.x-1.1
- recommended major: 2
- supported majors: 2, 1
- current: 6.x-1.1
* Recommended version: 6.x-1.2 // Evil, prints 2 things as "Recommended"
* Recommended version: 6.x-2.0

The solution to (C) is pretty easy, it just means we need to be a little more complicated about if there are only releases with "extra" in their version strings from the recommended branch, that we recommend the most recent release. Note: this is a case that in general should never happen with responsible maintainers, but in practice, it'll happen in contrib.

(G) is more tricky to solve, especially without breaking the string freeze. :( I see the following choices:

G.1) Break the freeze, and in this case, use different labels like "Recommended current release:" vs. "Maintainer's recommended release:".

G.2) Leave it like it is in the patch with 2 "Recommended" versions. This is confusing and lame.

G.3) Leave it like it is in the code right now, and call 6.x-2.0 "Also available" in this case, and leave 6.x-1.2 as "Recommended".

G.4) Call 6.x-1.2 "Also available" and keep 6.x-2.0 as "Recommended" in this case.

G.5) Call 6.x-1.2 the "Latest" release in this case, and keep 6.x-2.0 as "Recommended".

Any opinions on these 5 options for case (G) would be most welcome.

Thanks,
-Derek

p.s. Note: because this is touching the same code, and since I was working on it on the plane home, this patch includes the same fix to the comment I submitted separately over at http://drupal.org/node/210140

webernet’s picture

Maybe use "Latest version (Recommended)" for the latest (non-extra) release on the current (non-recommended) branch, and only use "Recommended" on the recommended branch?

dww’s picture

that'd still break the string freeze, and it also seems more confusing than G1.

webernet’s picture

G1 and G3 are the only reasonable choices in my opinion.

As for option G1... I'm not sure what the best wording is.

gábor hojtsy’s picture

I am not sure "also available" is not right here. We might not want to tell people to upgrade to a "major" new version of a module (as in contrib major versions), but just note that it is available. That might break APIs, etc, right?

alexanderpas’s picture

also, we might not want them to update from 6.x-1.1 to 6.x-1.2-alpha3

dww’s picture

@alexanderpas: it doesn't work like that now, nor would it with my proposed change. We never recommend releases with "extra" (e.g. -alpha, -rc, etc) over official releases without extra. At most we list those as "Also available:". But the fact that we list 6.x-2.1-alpha2 as "Also available" is a good example to illustrate why if the 6.x-2.* series is now recommended by the project maintainer, and a site is running 6.x-1.2, we shouldn't just say: "Also available: 6.x-2.0", it'd be better to tell the site owners that "6.x-2.0" is actually recommended.

@gabor: We wouldn't mark their current release as a warning or error, but if the maintainer has said that "6.x-2.*" is the recommended branch, and a site is currently up to date with the latest 6.x-1.* release, it'd be better if update.module told the site owner that their release is supported and current, but the maintainer is recommending this other version now. Yes, it might break APIs, etc, but the maintainer has now decided the newer version is recommended (and therefore, presumably stable), which is the first step towards dropping support for the older branch entirely (when update.module marks your version as an error and screams you should upgrade ASAP). During that transition period, it'd be nice to give site owners some warning that they're not current with the maintainer's recommended version, and they should start to consider an upgrade. If it just says "Also available: 6.x-2.3" you have no way to know it's not just "Also available", but also "Maintainer recommended".

jhedstrom’s picture

StatusFileSize
new35.64 KB

With the release of CCK 2.0 for 6.x, the issue here is going to become more urgent, as an upgrade from 6.x-2.0-rc10 to 6.x-2.0 causes the update status page to recommend "updating" to 6.x-2.0-rc10, which will forever be pinging site maintainers with incorrect update status warnings.

jhedstrom’s picture

StatusFileSize
new8.23 KB

Also, it isn't prompting to perform the upgrade to CCK 2.0 in the first place.

(Not sure if this issue is the right place for these, but this is the closest to an existing issue I could fine)

webernet’s picture

@jhedstrom: That is a completely different issue -- #184418: update(_status) results stale for up to 6 hours

hass’s picture

2 years with no progress!?

I marked Google Analytics 3.0 as recommended and now I see in update status page that 2.3 is recommended. No wonder why people do not upgrade to 3.0. Additionally I'm currently not "able" to set 2.3 to unsupported as there is no official Ubercart release with Google Analytics 3.0 support available.

Any chance to get this fixed?

chx’s picture

Version: 6.0-rc2 » 6.20
Priority: Minor » Normal

Any chance? No. If we would fix this, the universe would collapse into one black hole. No way.

If you consider the answer silly then maybe contemplate the question which starts with "I have not read all above" -- "all above" happens to include the Drupal 6 core maintainer and the update module maintainer discussing the issue. While their name is synonymous with being amazing contributors and humble servants of the Drupal community, your name is synonymous with obnoxious troll who is not getting banned because he also contributes.

hass’s picture

You are a very negative guy and You have not been asked.

babbage’s picture

Let's be constructive here; seems like this faltered and conversation stopped rather than anything being decided. If a module maintainer marks a branch as "recommended" and another one as "available" it would be extremely helpful to have this information translate through to update.module in my view. Why would we want to have two separate mechanisms for determining recommended vs. available status?

It would also help avoid issues like #1035030: Why is token 6.x-1.16 (or latest DEV) recommended and 7.x-1.0-beta1 required? Answer in #3.

babbage’s picture

Version: 6.20 » 8.x-dev

Presuming we don't take a string-breaking option, I guess this can be corrected in Drupal 7 but I presume it would need to be done in D8 first now...

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

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

ao5357’s picture

Issue tags: +MWDS2016

Reviewed from a local 8.2.x build and confirmed that this is still the current behavior in Drupal 8.

Steps to reproduce (example for this purpose at this time is toolbar_anti_flicker 8.x-1.3)

* Create a Drupal 8 site
* Enable the Update manager
* Download and install the 8.x-1.3 release of toolbar_anti_flicker
* Manually check available updates and visit the available updates admin page

For 1.3 it shows "Update available" with the "Recommended version" as 8.x-1.4 and the "Also available" as 8.x-2.3. The toolbar_anti_flicker project page shows the recommended release as 8.x-2.3 and "other releases" contains 8.x-1.4.

d.o research related issues:

* #237608: "Recommended version" for unsupported branch
* #519470: Distinguish between released versions of the same project when selecting projects to upgrade with Update manager
* #850846: Update will happily downgrade modules unless you are careful

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

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

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

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

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

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

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

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

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

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

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

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.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.

dww’s picture

Heh, whoops. I just searched for issues assigned to myself and found this. ;) Not actively working on it anymore, so un-assigning. ;)

Kinda related to #2990476: If the site is on an insecure version of an old minor and there is a secure version of that old minor available, the update status report should link that release (the title of which is whack, and it's really about showing the latest release from all later major versions of a given project)...

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

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

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

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

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

catch’s picture

Issue tags: +Bug Smash Initiative

I feel like 'recommended' on project pages is for new installs, and not so much for update module - similar to Gabor's concerns above. So would be tempted to mark this 'works as designed'.

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

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

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should 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.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should 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.

catch’s picture

Status: Needs work » Postponed (maintainer needs more info)

It's been nearly 18 months since I posted #28, moving to 'needs more info' and will mark 'works as designed' in a few weeks.

Version: 9.5.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. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

catch’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

That was more than a few weeks, closing as 'works as designed'. To summarise, if you're on an older branch of a contrib module, and there's a newer branch available, update status will show it as 'also available' instead of 'recommended' - but given both branches are supported, that seems fine. Updating to a newer branch may involve extra steps, so it is worth leaving the tiny bit of friction for people to update to the newer release, given that both wordings are correct as far as the specific site is concerned.