I released http://drupal.org/project/aggregation_block as 6.x-1.0 on Friday and believe I followed all the steps in the handbook, but when I try to download it from drush, I get the message that it has no recommended release. I do see version 1 as a recommended release on the "Releases" tab for the project, and do have "Enable releases" checked.
I don't see anything about it being a recommended release on the main project page, but do see it marked as recommended when I go to http://drupalmodules.com/module/aggregation-block
I'm confused as to why it isn't listed as a recommended release on the project page and by drush. Is there a part of the handbook dealing with this that I might have missed?
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | 877988-30.disemvowel-admin-releases.png | 57.18 KB | dww |
| Snap1.jpg | 67.02 KB | pglatz |
Comments
Comment #1
avpadernoVersion 6.x-1.0 is marked as recommended in http://drupal.org/node/876150/edit/releases. It rather seems a problem with drush.module that thinks the version is not the recommended one.
Comment #2
pglatz commentedthanks; I'll report this to the drush project
Comment #3
greg.1.anderson commentedI'm not sure this is a drush issue, but neither do I see what pglatz might have done wrong.
Here's the info in $project; no $project['recommended_major'] element is present.
Drush gets $project['recommended_major'] from the xpath element /project/recommended_major. The xml document for aggregation_block is:
http://updates.drupal.org/release-history/aggregation_block/6.x :
There is no
<recommended_major>1</recommended_major>element in there.It seems to me that since aggregation-block doesn't have any "extra" components in the version number, and the 1.0 branch is supported, and the 1.0 branch is marked "recommended" as shown above, that d.o should be inserting the recommended major element inside the project element.
@pglatz: Could you please look into this again, and either let me know what drush should be checking, if not recommended_major, or what aggregation-block should do differently to get the recommended_major element?
Comment #4
pglatz commentedSorry Greg, I'm not sure what the problem is, or why the "recommended" information would be missing from the xml. I agree that this probably isn't a drush issue, but something about the release packaging process, which is sort of a black box to me. It seems that since I do have a recommended version indicated, it should appear in the xml. I don't think there is anything more I can do from the project side of things. I spent a couple of hours in the Handbook and on Google trying to figure out what I might have omitted, but think I entered all the information that I possibly can.
I apologize if this is not the case, but am suspecting the packaging mechanism to be the problem here.
Comment #5
greg.1.anderson commented@kiamlaluno: Could you please look into this again, and either let me know what drush should be checking, if not recommended_major, or what aggregation-block should do differently to get the recommended_major element?
@pglatz: Sorry, I directed my comment in #3 above at the wrong person. As I said above, I can't see anything that you did wrong, and the "recommended" tag is missing from the XML, but it is a mystery to me why other pages show your project with a recommended release and drush does not. I was tempted to set your 'recommended' release to 'none' and check the XML again, but I didn't want to mess with someone else's project, so I'm leaving well enough alone.
Comment #6
pglatz commentedNo problem, Greg; you're welcome to edit the project if that would help, just set it back to recommended when you're done.
Comment #7
greg.1.anderson commentedThe xml did not change when I unchecked 'supported' (which set recommended to 'none'), so I'm guessing that the xml is only generated occasionally, e.g. in a cron task. I didn't want to interfere with any investigation of this issue, so I put the status back to supported, with version 1 recommended, just as it was.
Comment #8
pglatz commentedThanks for trying. I waited 14 hours before giving up on the cron theory; other changes to the project seem to get updated every 10 or 15 minutes.
Comment #9
avpadernoI am not sure if this is the wanted behavior, but it seems the recommended_major tag is present when there are more than one release. I am looking for a project with just a release; so far, I have not found one.
Comment #10
greg.1.anderson commentedThanks. If that is the way it works, then we can adjust drush to match.
Comment #11
dave reidCorrect. There is no recommended_major value for modules with one branch only.
@see http://updates.drupal.org/release-history/disemvowel/6.x
Moving to the Drush queue.
Comment #12
pglatz commentedHere's a module I release a few months ago that does have only one branch, but does download correctly from drush with no "missing recommended version" warning: http://drupal.org/project/nodedump
So maybe there is more to this issue.
Comment #13
greg.1.anderson commentedI hate to say it, with 3.2 and 3.3 just released, but this issue is going to warrant a 3.4. We can probably afford to wait a little while, but shouldn't let it go for too long.
I'll have a patch ready shortly.
Comment #14
moshe weitzman commentedI can't immediately see why nodedump has recommended_release and aggregation_block doesn't. I think we need to consult the project_release? code which generates the XML.
Comment #15
greg.1.anderson commentedI didn't notice the comment from pglatz at first, because I was still editing #13 when he saved it. I agree with you; I see no reason why nodedump should have a recommended release, and the others should not.
I'll take a look at the appropriate project_* code when I have a chance.
Comment #16
dave reidArg, the module I used to test against didn't have a stable release. I tested against the password.module which has only one branch and an official release, and it does in fact have
<recommended_major>1</recommended_major>.So for some reason http://updates.drupal.org/release-history/aggregation_block/6.x does not. Moving to the packaging system queue instead of Drush.
Comment #17
dwwSee #313827: make it possible to not have *any* branch recommended for why this is by design as far as project_release is concerned. Drush shouldn't be assuming there's a recommended branch.
Comment #18
greg.1.anderson commented@dww: You can download projects that have no recommended release with drush; you just need to specify a version number.
The problem we have here is that aggregation_block appears to have a recommended release in the d.o UI, but there is no recommended release element in the XML from updates.drupal.org.
We can change drush if it is indeed expected that this element should be missing even when there is a recommended release, but I want to make sure that this is the expected behaviour first.
Comment #19
dwwgreg.1.anderson: Sorry, that wasn't clear from the title of the issue... I need to run to class right now, but I can try to look into this tomorrow.
Comment #20
pglatz commentedI just released an update to aggregation_block; it now has two tagged versions, and also now has a recommended version. I think the problem is with the packaging script; drush is correctly reporting no recommended version if none exists in the xml, so I don't think drush is the culprit here. Other programs that rely on the missing recommended field will also be broken if this is not fixed, so modifying drush for this special circumstance isn't the ultimate resolution.
Comment #21
dwwhttp://updates.drupal.org/release-history/aggregation_block/6.x
contains:
This was probably just a case where the project UI on d.o was misconfigured for a while. You finally changed it and then expected the XML feed to instantaneously be updated. Although the feeds are updated whenever the packaging script runs, they're only updated every 12 hours or so for other random changes to the project meta data.
From the packaging/infrastructure side, this is a "by design" support request. Feel free to turn this issue back into something else if there's still a bug somewhere in drush or something. Sorry, I don't have time to read the whole issue and figure out if there's still work that needs to be done somewhere. But it's certainly not an infra bug at this point.
Cheers,
-Derek
Comment #22
dwwI should clarify this:
I really meant:
"Although the feeds for a given project are updated whenever a new release package is built for that project by the packaging script..."
Comment #23
greg.1.anderson commentedI think that pglatz had the settings correct for several days; it's possible that there is a bug in the packaging script involving modules with only one release. A good test for this would be to just make a new project, give it one release and make it recommended, and see if the tag shows up.
I'm not going to reopen this issue on account of that, though; if there is in fact a bug in the packaging script, someone will find it again sooner or later. Since this only affects projects whose very first release is recommended, I'm setting the priority to minor (if that matters for a closed issue...).
Comment #24
avpadernohttp://updates.drupal.org/release-history/user_restrictions/7.x doesn't include
<recommended_major>too; anyway it seems redundant, in this case, as the only available version is reported to be supported, and to be the default one (plus, it is also active).I tend to agree with dww.
<recommended_major>seems to be a quick way to retrieve the recommended version when more than a release are listed.Comment #25
greg.1.anderson commentedShould drush ignore the recommended version tag, then? That is, is it by spec that it is allowed to be missing for projects with one release? Note that
drush dl modulenamewill only download stable releases if used without an explicit version number. Currently, drush assumes that if there is no recommended version tag, then the project maintainer is recommending that no version is recommended (which drush interprets in the same way as when no release is marked as stable). If this is not correct, please move this bug to the drush queue with a description of the correct policy.If this is correct (that modules with no recommended_major tag have no stable release), then this is a minor bug in the packaging script, as confirmed by #24.
Comment #26
manarth commentedI'd like to add my experiences of this issue to the thread.
Firstly, the issue came up for me when I tried to use drush to download a project - drush said:
Trying to resolve the problem showed some anomalies.
My module-releases admin page showed one release, with a ticked checkbox for 'supported', and the same major version for 'recommended'. To me, this looks like I've done what's required. However, the update-xml for the module lists the release, but doesn't have a <recommended_major> tag. This appears contradictory - the UI is telling me that I've "recommended" a version, but the system's output doesn't reflect this.
I saved the page - repeatedly, over several days - in a vague hope of triggering whatever cronjob would rebuild the xml. Naturally, this didn't work. At this point I was still confused on whether this was user-error or a bug.
rfay suggested that creating another branch may resolve it. I created a branch, and at the same time added a dev-release, so I'm not sure which of these (or both together) solved the problem, but the <recommended_major> tag now appears in the xml, and Drush behaves.
So, my conclusions?
If you're a module developer looking for a quick-fix, adding a CVS branch and/or adding a dev-release may fix the symptoms.Edit: so it turns out this behaviour is a bug - no need to create an extraneous CVS branch. As commented by dww below, please do not create unnecessary CVS branches!Possible solutions?
I'm happy to help with any/all of these solutions, but I'm sure I don't understand the problem / the implications of the changes well enough to know the best approach. Any comments/guidance is welcomed, as is an indication of which of the solutions you'd prefer to see implemented!
Comment #27
dwwI'd love to see a live example of a module that the admin releases page says there's a recommended release and the release history XML file doesn't have
<recommended_major>. http://updates.drupal.org/release-history/user_restrictions/7.x has recommended major now. It's entirely possible there's a bug in the script generating the release history files (which isn't the packaging script, btw). But unless I can see it in action, it's a *lot* harder to debug.That said, drush needs to support situations where there's no recommended_major, since (as I've already linked) #313827: make it possible to not have *any* branch recommended means this tag *is* optional in the release history feed.
Comment #28
dwwp.s. Just making another branch to work-around this problem isn't a great solution. Please don't suggest/document that anywhere. ;)
Comment #29
dave reid@dww: http://updates.drupal.org/release-history/disemvowel/6.x
Comment #30
greg.1.anderson commentedDrush does handle the case where there is no recommended release, but it handles it by forcing you to specify the exact version that you want to download. This stops people from carelessly downloading a project that has no recommended release -- so you know that you're getting something unstable.
For now I'm going to presume that eventually this bug (project w/ a recommended release has no recommended release tag) will be fixed, and the current drush behavior is okay. Please put up an issue in the drush queue if you think the behavior of drush should change. Thanks.
Comment #31
dwwYay, thanks Dave!
So, that suspicion can be ruled out. {project_release_supported_versions} is right in this case (as it should be). The http://drupal.org/node/568576/edit/releases page is showing the right thing:
And the release history feed is definitely missing the tag:
So, I think it's pretty safe to assume this is a bug in project-release-create-history.php when a project only has a single release. Should be possible to debug this now.
Comment #32
dwwMore accurate title for the bug (as we currently understand it).
Comment #33
avpadernoI checked http://updates.drupal.org/release-history/disemvowel/6.x and I see the recommended version tag.
Is it enough to wait, and the tag is added to every XML project feeds?
Comment #34
dww@kiamlaluno: Argh. So this must be a transient bug. Fun. Just waiting doesn't seem to matter, since clearly the feed was broken when I wrote comment #32, but it's fixed now. However, there's only been one release of that module for ages, so I can't believe it *just* now corrected itself. There must be something intermittent going on that's causing the troubles. Ugh. I bet if we look again in a few hours (or something) the feed will again be broken.
Anyway, the next step is to carefully review project-release-create-history.php looking very closely at any line of code that deals with the recommended_major tag and see if there's anything fragile/suspicious about it.
Comment #35
avpadernoI thought I was going to give good news. :-)
I looked at project-release-create-history.php; as the feed contains
<supported_majors>, then the following code is executed.The only reason I can find for the tag
<recommended_major>not being present is that the query returns 0 for {project_release_supported_versions}.recommended when the code is executed. Does that mean the table has not been yet updated when the code was executed the first time?Comment #36
avpadernoI have marked #943832: I can't set my release to recommended as duplicate of this report.
Comment #37
willieseabrook commentedSubscribe, this is occuring with drupal.org/project/menu_minipanels.
Same missing recommended_major from xml.
Comment #38
longwaveThis is also occurring with the recently created http://drupal.org/project/uc_checkout_tweaks
Comment #39
pglatz commentedI released http://drupal.org/project/dev_banner yesterday, and although it has a recommended release on the Administer Releases page, drush still reports no recommended release. It has been almost 24 hours, so there should have been a release cycle, and I'm assuming this is still an issue.
Discussing this with dman today, he said: Apparently this is still a known bug on the very first release of a new project. I believe it can be fixed by adding an updated release (eg version +.1) over top of your existing one.
I will do this if it is the only workaround available, but feel it is wrong to do , because it wouldn't really be a new release, as nothing has changed on the project. I'd prefer it if someone could resolve this by manually tweaking the database, until a more permanent fix is found.
Comment #40
avpadernoThe link to the XML file is http://updates.drupal.org/release-history/dev_banner/6.x.
Comment #41
greg.1.anderson commentedWell, this bug will at least get a little less annoying once #983222: Suggest releases to download when there is no recommended release; use pm-releases without bootstrapping Drupal is committed; drush will ask you which release you want to download when there is no recommended release. If there is only one release, then your choice will be an easy one. :)
This bug should still be fixed, though; drush should only download without prompting when there is a recommended release.
Comment #42
drummI’m not aware of this happening recently / the drush workaround was a good idea. I don’t think there is anything else we need to do here now.