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
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | cck_update_status.png | 8.23 KB | jhedstrom |
| #9 | cck_update_status.png | 35.64 KB | jhedstrom |
| #2 | update_maintainer_recommended.patch | 5.87 KB | dww |
Comments
Comment #1
webernet commentedCalling it recommended might be preferable - assuming the current non-recommended branch may be on it's way to being unsupported.
Comment #2
dwwHere'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
Comment #3
webernet commentedMaybe use "Latest version (Recommended)" for the latest (non-extra) release on the current (non-recommended) branch, and only use "Recommended" on the recommended branch?
Comment #4
dwwthat'd still break the string freeze, and it also seems more confusing than G1.
Comment #5
webernet commentedG1 and G3 are the only reasonable choices in my opinion.
As for option G1... I'm not sure what the best wording is.
Comment #6
gábor hojtsyI 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?
Comment #7
alexanderpas commentedalso, we might not want them to update from 6.x-1.1 to 6.x-1.2-alpha3
Comment #8
dww@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".
Comment #9
jhedstromWith 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.
Comment #10
jhedstromAlso, 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)
Comment #11
webernet commented@jhedstrom: That is a completely different issue -- #184418: update(_status) results stale for up to 6 hours
Comment #12
hass commented2 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?
Comment #13
chx commentedAny 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.
Comment #14
hass commentedYou are a very negative guy and You have not been asked.
Comment #15
babbage commentedLet'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.
Comment #16
babbage commentedPresuming 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...
Comment #18
ao5357 commentedReviewed 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
Comment #25
dwwHeh, 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)...
Comment #28
catchI 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'.
Comment #32
catchIt's been nearly 18 months since I posted #28, moving to 'needs more info' and will mark 'works as designed' in a few weeks.
Comment #34
catchThat 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.