Active
Project:
Drupal.org drush
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Jan 2013 at 05:31 UTC
Updated:
4 Jun 2013 at 19:46 UTC
We have a drupal distribution http://drupal.org/node/1890706 that does not show the 'In this package' details. This doesn't appear in commerce_kickstart either
http://drupal.org/node/1899400 but does appear on the spark releases http://drupal.org/node/1901600
Comments
Comment #1
webchickI inspected the project_package_local_release_item table in the DB, and it looks like this is a problem with the table being populated.
Query on a Spark release node:
Query on agov:
Thanks to the sleuthing of Dave Reid: http://drupalcode.org/project/drupalorg.git?a=search&h=refs%2Fheads%2F6....
We know that this is probably a bug in http://drupalcode.org/project/drupalorg.git/blob?f=drupalorg_project/plu.... It's doing some kinda funky thing with Drush and saving package info to a temp dir or... I dunno.
Halp! :)
Comment #2
kim.pepperI just pushed a new release of aGov, and still don't have the package contents info.
It must be some quirk of the make files?
Kim
Comment #3
damien tournoud commentedI looked into this. The problem that we have is that the generated
metadata-contrib.jsonfile contains multiple JSON objects smushed together. For example, a test run on Commerce Kickstart gives us:https://gist.github.com/damz/cc1b78fc7e9f9f66465d
I assume that this is because of recursive runs of Drush Make (ie. the chosen module is checked out, and it contains itself a make file that gets processed separately). I assume this is a Drupal.org drush bug / limitation. Reassigning there.
Comment #4
damien tournoud commentedWe cannot prevent Drush from spawning a new process for recursive processing, so I see two options:
--drupal-org-log-package-metadata. InDrupalorgProjectPackageReleaseDistro, we load all the*.jsonfiles in this directory and recursively merge them.\ncharacter, which is a common framing boundary for multiple JSON data in a stream). In this case, we probably also want to lock the file (with flock) during the write operation, as writes are only guaranteed to be atomic up toPIPE_BUFcharacters. In InDrupalorgProjectPackageReleaseDistro, we decode each JSON object from the stream and recursively merge them.Comment #5
dwwThanks for investigating, DamZ! I've always hated recursive drush make. ;) Yeah, I don't think drupalorg_drush and its communication with the packaging script was designed to properly handle this case. Ugh.
On very quick skim of the issue and based on my spotty memory of how all this crap works, I think the directory and separate files per drush invocation will be cleaner, but probably more work. Trying to get a bunch of concurrent drush makes to lock the same .json file and properly smoosh the output together in a sane way seems like more complication than just letting each drush make write its own file. Although, then the packaging script has to parse all the .json files and merge the results. I dunno.
I can't really justify spending a ton of time cleaning this up right now with the D7 upgrade so far behind. But, I'm now aware of this and will be happy to help answer questions (such as I can) and provide advice if anyone is motivated to work on this in the meanwhile...
Thanks/sorry,
-Derek
Comment #6
dwwp.s.
- Just marked #1794854: Dependencies included with sub make files are not properly shown on D.O duplicate with this -- even though that's older, this issue as more info.
- Also, I'm staring to use a new 'Drupal.org distribution packaging' tag since 'drupal.org distribution blockers' is no longer really a valid name, but it'd be nice to track all issues related to d.o distro packaging across all projects (since some of the problems *are* in drupalorg_drush, some are in drush itself, some are infra, etc).