dokuwiki / translate.dokuwiki.org

Web based tool to create and update translation patches for DokuWiki and DokuWiki plugins.
MIT License
8 stars 2 forks source link

ckgedit plugin crashed the import #67

Closed splitbrain closed 7 years ago

splitbrain commented 10 years ago

As described in https://forum.dokuwiki.org/thread/10897 (#53 somewhat related), the ckgedit plugin crashed the importer cronjob leaving a lockfile behind.

Neither setting the error count to 3 nor setting the state to inactive made the importer skip the defective plugin. This seems to be because the error was caused within a pending language update?

I have no idea what happened, but here is all the info I have.

The whole data of the plugin was copied to the inspect folder in the translation tool's home directory.

This is what we got in the error log:

[2014-02-22 12:40:36] app.ERROR: error during repository update (org\dokuwiki\translatorBundle\Services\Git\GitCloneException: Failed to clone /var/www/translate/data/plugin/ckgedit/
repository/ to /var/www/translate/data/plugin/ckgedit/tmp/34/ in 
Path: /var/www/translate/data/plugin/ckgedit/tmp/34/
Command: /usr/bin/git 'clone' '/var/www/translate/data/plugin/ckgedit/repository/' '/var/www/translate/data/plugin/ckgedit/tmp/34/'
Return : 128
STDOUT : 
STDERR : fatal: repository '/var/www/translate/data/plugin/ckgedit/repository/' does not exist
) [] []
[2014-02-22 12:40:36] app.DEBUG: #0 /var/www/translate/htdocs/src/org/dokuwiki/translatorBundle/Services/Git/GitService.php(38): org\dokuwiki\translatorBundle\Services\Git\GitReposit
ory->cloneFrom('/var/www/transl...', '/var/www/transl...')
#1 /var/www/translate/htdocs/src/org/dokuwiki/translatorBundle/Services/Repository/Repository.php(321): org\dokuwiki\translatorBundle\Services\Git\GitService->createRepositoryFromRem
ote('/var/www/transl...', '/var/www/transl...')
#2 /var/www/translate/htdocs/src/org/dokuwiki/translatorBundle/Services/Repository/Repository.php(307): org\dokuwiki\translatorBundle\Services\Repository\Repository->createAndSendPat
chWithException(Object(org\dokuwiki\translatorBundle\Entity\TranslationUpdateEntity), '/var/www/transl...')
#3 /var/www/translate/htdocs/src/org/dokuwiki/translatorBundle/Command/UpdateCommand.php(75): org\dokuwiki\translatorBundle\Services\Repository\Repository->createAndSendPatch(Object(
org\dokuwiki\translatorBundle\Entity\TranslationUpdateEntity))
#4 /var/www/translate/htdocs/src/org/dokuwiki/translatorBundle/Command/UpdateCommand.php(38): org\dokuwiki\translatorBundle\Command\UpdateCommand->processPendingTranslations()
#5 /var/www/translate/htdocs/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php(238): org\dokuwiki\translatorBundle\Command\UpdateCommand->execute(Object(Symfon
y\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/translate/htdocs/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(199): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Consol
e\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/translate/htdocs/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(78): Symfony\Component\Console\Application->doRun(Object(Symfony\Compon
ent\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/translate/htdocs/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(105): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Compo
nent\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/translate/htdocs/app/console(22): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
#10 {main} [] []

This is what the cronjob had as output (was sent via mail to me)

  [Symfony\Component\Filesystem\Exception\IOException]
  Failed to chmod file /var/www/translate/data/plugin/ckgedit/tmp/34/
dokuwiki:updateGit

This was the entry for the pending update:

+----+---------------+---------------------------+-----------------------+------------+--------+----------+
| id | repository_id | author                    | email                 | updated    | state  | language |
+----+---------------+---------------------------+-----------------------+------------+--------+----------+
| 34 |            64 | Robert Bogenschneider     | ****@***.***          | 1391961017 | undone | eo       |

This was actual entry for the plugin:

*************************** 1. row ***************************
           id: 64
          url: https://github.com/turnermm/ckgedit.git
       branch: master
   lastUpdate: 1391960412
         name: ckgedit
   popularity: 213
  displayName: ckgedit Plugin
        email: mturner@room535.org
       author: Myron Turner
  description: WYSIWYG editor upgrades fckgLite from FCKEditor to CKEditor
         tags: editing, editor, wysiwyg
         type: plugin
        state: active
     errorMsg: Message-ID: <1389327672.52cf753894b8d@swift.generated>
Date: Fri, 10 Jan 2014 05:21:12 +0100
Subject: Error during import of ckgedit Plugin
From: translate@dokuwiki.org
To: mturner@****
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-
   errorCount: 3
activationKey:
1 row in set (0.00 sec)
turnermm commented 10 years ago

Before this failure ckgedit had several successful language updates from the translation tool. I've tried to track down what might have changed between the successful ones and this failure but nothing stands out, and there's no problem cloning the plugin either from github or from repository to repository locally.

Klap-in commented 9 years ago

@turnermm, looking at your merged pull requests I got the impression that this issue is fixed?

@splitbrain or are there still points of attention left?

turnermm commented 9 years ago

Yes, the issue was fixed. ckgedit has been receiving regular translation updates for at least (or about) one year. The latest was Japanese: https://github.com/turnermm/ckgedit/pull/104.

Klap-in commented 8 years ago

Errorcounter is only triggered for recognized errors:

/src/org/dokuwiki/translatorBundle/Services/Repository/RepositoryErrorReporter.php:

        if ($template !== '' && $repo->isFunctional()) {
            $repo->getEntity()->setErrorCount($repo->getEntity()->getErrorCount() + 1);

            $this->emailService->sendEmail(
                $repo->getEntity()->getEmail(),
                'Error during import of ' . $repo->getEntity()->getDisplayName(),
                $template,
                $this->data
            );
            return $this->emailService->getLastMessage();
        } else {
            return 'Unknown error:' .get_class($e);
        }

RepositoryErrorReporter is used in update() and createAndSendPatch(), see https://github.com/dokufreaks/dokuwiki-translation/blob/master/src/org/dokuwiki/translatorBundle/Services/Repository/Repository.php#L103

turnermm commented 8 years ago

Does this mean that ckgedit has crashed the translation tool? I had a Hungarian translation update as recently as May 15th. And no errors have been reported, to me, at least. I just tested and cloned a copy without any issues.

turnermm commented 8 years ago

And I just further tested by syncing an old fork of ckgedit, that I keep on a test github account, with the current ckgedit repository. It merged without any issues.

Klap-in commented 7 years ago

With the information up to now and checking of some logs I don't recognize something that is (still) broken.