Trying to deploy new code to localize.drupal.org via merging from the vendor branch of l10n_server. Running d.o-cvs-to-svn.php l10n_server DRUPAL-6--1 with my up to date password attempts to run

svn_load_dirs.pl https://svn.drupal.org/drupal -no_user_input -t vendor/l10n_server/DRUPAL-6--1-200911061654 vendor/l10n_server/current l10n_server

which then says

/home/gabor/bin/svn_load_dirs.pl: caught signal PIPE. Quitting now.

on shell.d.o and says

Checking that the base URL is a Subversion repository.
Running /usr/bin/svn log -r HEAD --username ********* --password ****** https://svn.drupal.org/drupal

Finding the root URL of the Subversion repository.
Running /usr/bin/svn log -r HEAD --username ********* --password ****** https://svn.drupal.org

on my local machine (and never returns from after this last item, at least not in the past 30 min).

Is the mistake on my end? Both on my setup on shell.d.o and my local setup? How can we make this work? Since I cannot even pull in vendor code, I'm not at all near to merging that, comitting and then deploying on localize.drupal.org.

Comments

gábor hojtsy’s picture

To reproduce on shell.d.o:

 cd /home/gabor/drupal/vendor/l10n_server/
 /home/gabor/bin/d.o-cvs-to-svn.php l10n_server DRUPAL-6--1

This might still use an svn_load_dirs.pl from a different path, I have /home/gabor/bin on my path so the script would be picked for me from there obviously. You can alter your path or edit that d.o-cvs-to-svn.php script to look at the svn_load_dirs.pl script on my bin directory and not in your path. You should get the PIPE signal error after a while (and some other messages inbetween).

nnewton’s picture

Hi Gabor,

I don't have much experience with the d.o-cvs-svn script, but the error we are hitting is that its using a huge amount of ram. As a test I raised the memory_limit to 900M and it still failed with a php fatal error caused by memory exhaustion. Any thoughts on why it would be using so much for this?

(Note: There is also an entry in the apache error log saying that your user doesn't have access to one part of the repo for some reason, I don't know what causes that but according to strace its not stopping whatever the script is doing)

gábor hojtsy’s picture

@Narayan: I don't know the intricacies of the script, but David needed to increase the memory limit earlier as well. Looks like this script is using an insane amount of memory.

gábor hojtsy’s picture

So this is the log of the running script I'm experiencing:

$ d.o-cvs-to-svn.php l10n_server DRUPAL-6--1
Importing l10n_server from DRUPAL-6--1 into drupal.org's SVN vendor branches.
Using vendor_tag: DRUPAL-6--1-200911101437 for contributions/modules/l10n_server
CVSROOT: pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib
cvs export: Updating l10n_server
cvs export: Updating l10n_server/connectors
cvs export: Updating l10n_server/connectors/l10n_drupalorg
cvs export: Updating l10n_server/connectors/l10n_drupalorg/po
cvs export: Updating l10n_server/connectors/l10n_drupalorg/translations
cvs export: Updating l10n_server/connectors/l10n_localpacks
cvs export: Updating l10n_server/connectors/l10n_localpacks/po
cvs export: Updating l10n_server/connectors/l10n_localpacks/translations
cvs export: Updating l10n_server/connectors/l10n_project
cvs export: Updating l10n_server/docs
cvs export: Updating l10n_server/documentation
cvs export: Updating l10n_server/images
cvs export: Updating l10n_server/img
cvs export: Updating l10n_server/l10n_community
cvs export: Updating l10n_server/l10n_community/images
cvs export: Updating l10n_server/l10n_community/po
cvs export: Updating l10n_server/l10n_community/tests
cvs export: Updating l10n_server/l10n_community/translations
cvs export: Updating l10n_server/l10n_groups
cvs export: Updating l10n_server/l10n_groups/po
cvs export: Updating l10n_server/l10n_groups/translations
cvs export: Updating l10n_server/l10n_packager
cvs export: Updating l10n_server/l10n_remote
cvs export: Updating l10n_server/l10n_remote/translations
cvs export: Updating l10n_server/po
cvs export: Updating l10n_server/translations
Fixing version information in /tmp/svn-import-l10n_server-200911101437/l10n_server/connectors/l10n_drupalorg/l10n_drupalorg.info
Fixing version information in /tmp/svn-import-l10n_server-200911101437/l10n_server/connectors/l10n_localpacks/l10n_localpacks.info
Fixing version information in /tmp/svn-import-l10n_server-200911101437/l10n_server/connectors/l10n_project/l10n_project.info
Fixing version information in /tmp/svn-import-l10n_server-200911101437/l10n_server/l10n_groups/l10n_groups.info
Fixing version information in /tmp/svn-import-l10n_server-200911101437/l10n_server/l10n_remote/l10n_remote.info
Fixing version information in /tmp/svn-import-l10n_server-200911101437/l10n_server/l10n_packager/l10n_packager.info
Fixing version information in /tmp/svn-import-l10n_server-200911101437/l10n_server/l10n_community/l10n_community.info
About to run:

svn_load_dirs.pl https://svn.drupal.org/drupal -t vendor/l10n_server/DRUPAL-6--1-200911101437 vendor/l10n_server/current l10n_server

/home/gabor/bin/svn_load_dirs.pl: caught signal PIPE.  Quitting now.

Looking at the d.o-cvs-to-svn.php script, the place it fails is in the passthru(), inside svn_load_dirs.pl:

$svn_load_dirs = "svn_load_dirs.pl $SVNROOT -no_user_input -t $svn_vendor_tag $svn_target_dir $project";

echo "About to run:\n\n$svn_load_dirs\n\n";

passthru($svn_load_dirs);

chdir('/');
`rm -rf $tmp_dir`;

echo <<<EOF

Successfully imported $project from CVS $cvs_tag into SVN
You should now run svnmerge.py in the appropriate directory to merge
your changes into the right site-specific directory to deploy the code.


EOF;

Given that PHP waits on the feedback of the process from passthru(), and we get the PIPE error from inside the passthru(), I'd think that PHP is not to blame here. Not sure why do you expected PHP is at failure here.

nnewton’s picture

Try tailing /var/log/php.log while running the script.

gábor hojtsy’s picture

Title: deploying code to drupal.org sites impossible » svn_load_dirs.pl can be interactive
Status: Active » Needs review

Ok, as I've said this is not an issue with PHP itself. Running the same deploy script works for potx.module. What I did for l10n_server is that I run the d.o script, and then when it PIPEs, I've run the svn-load-dirs.pl command manually from the given tmp directory (since the checkout is available there still). It had very rich output (unlike potx), and got me two questions:

Directory l10n_server will be tagged as vendor/l10n_server/DRUPAL-6--1-200911110735
Please examine identified tags.  Are they acceptable? (Y/n) Y
The following table lists files and directories that
exist in either the Subversion repository or the
directory to be imported but not both.  You now have
the opportunity to match them up as renames instead
of deletes and adds.  This is a Good Thing as it'll
make the repository take less space.

The left column lists files and directories that
exist in the Subversion repository and do not exist
in the directory being imported.  The right column
lists files and directories that exist in the
directory being imported.  Match up a deleted item
from the left column with an added item from the
right column.  Note the line numbers on the left
which you type into this script to have a rename
performed.

     Deleted            Added
   0 howtolocalize.png_ l10n_community/tests/l10n_community_test.po
   1 howtolocalize.svg_ 
   2 l10n_modules.png__ 
   3 l10n_modules.svg__ 
Enter two indexes for each column to rename, (R)elist, or (F)inish: F

Looks like we could do well with passing -no_user_input on to svn_load_dirs, so that it will not ask such questions. Seems like PHP was having errors with the load dirs script prompting without getting an answer.

I don't have a module to try this on now, given that I've successfully committed potx and l10n_server changes to the SVN repo, so will try next time and close this out if it works.

moshe weitzman’s picture

We are already calling svn_load_dirs.pl with the -no_user_input flag. Thats not the cause of the alleged memory hog.

gábor hojtsy’s picture

Status: Needs review » Closed (works as designed)

Oh, turns out my d.o script copy in /home/gabor on shell.d.o was not up to date. Eh :) I don't have stuff to deploy now, but will reopen this if the next one will not succeed.