Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Crawler: Handle repositories with non-working clone URL #407

Open
imphil opened this issue Aug 18, 2019 · 0 comments
Open

Crawler: Handle repositories with non-working clone URL #407

imphil opened this issue Aug 18, 2019 · 0 comments
Labels

Comments

@imphil
Copy link
Contributor

imphil commented Aug 18, 2019

We need to figure out a way to react to crawler failures when the source repository isn't available any more.

Currently, we have a couple problems:

  • The repository crawling is immediately retried, so it's stuck in a loop.
  • We have no way of informing the user about this problem.
  • We somehow also need to convey to users of the site that the information is potentially outdated.

Plan:

  • We also need to re-try crawling a couple times if crawling failes, in increasing time intervals.
  • We probably should mark repositories as "stale" if the repository association doesn't work any more after crawling failed for multiple times.
  • In both cases, the user should be informed about crawling failures using the new notification system.
[2019-08-18 18:55:27] app.INFO: Updating project XXX/YYY [] []
[2019-08-18 18:55:27] app.DEBUG: Cloning repository https://github.com/XXX for XXX/YYY [] []
[2019-08-18 18:55:27] app.DEBUG: Executing 'git' 'clone' 'https://github.com/XXX' '/tmp/lc-gitrepocrawler-xZ20C3Xumv' in / [] []
[2019-08-18 18:55:28] app.ERROR: Processing of repository resulted in an Symfony\Component\Process\Exception\ProcessFailedException [] []
[2019-08-18 18:55:28] app.ERROR: Message: The command "'git' 'clone' 'https://github.com/XXX' '/tmp/lc-gitrepocrawler-xZ20C3Xumv'" failed.  Exit Code: 128(Invalid exit argument)  Working directory: /  Output: ================   Error Output: ================ Cloning into '/tmp/lc-gitrepocrawler-xZ20C3Xumv'... remote: Not Found fatal: repository 'https://github.com/XXX/' not found  [] []
[2019-08-18 18:55:28] app.ERROR: Trace: 
#0 /var/www/lc/site/src/RepoCrawler/GitRepoCrawler.php(623): Symfony\Component\Process\Process->mustRun() 
#1 /var/www/lc/site/src/RepoCrawler/GitRepoCrawler.php(529): App\RepoCrawler\GitRepoCrawler->mustExecuteProcess(Object(Symfony\Component\Process\Process)) 
#2 /var/www/lc/site/src/RepoCrawler/GitRepoCrawler.php(182): App\RepoCrawler\GitRepoCrawler->cloneRepo(Object(App\Entity\GitSourceRepo)) 
#3 /var/www/lc/site/src/Consumer/UpdateProjectInformation.php(75): App\RepoCrawler\GitRepoCrawler->update(Object(App\Entity\Project)) 
#4 /var/www/lc/site/src/Consumer/AbstractProjectUpdateConsumer.php(72): App\Consumer\UpdateProjectInformation->processProject(Object(App\Entity\Project)) 
#5 [internal function]: App\Consumer\AbstractProjectUpdateConsumer->execute(Object(PhpAmqpLib\Message\AMQPMessage)) 
#6 /var/www/lc/site/vendor/php-amqplib/rabbitmq-bundle/RabbitMq/Consumer.php(133): call_user_func(Array, Object(PhpAmqpLib\Message\AMQPMessage)) 
#7 /var/www/lc/site/vendor/php-amqplib/rabbitmq-bundle/RabbitMq/Consumer.php(179): OldSound\RabbitMqBundle\RabbitMq\Consumer->processMessageQueueCallback(Object(PhpAmqpLib\Message\AMQPMessage), 'update-project-...', Array) 
#8 [internal function]: OldSound\RabbitMqBundle\RabbitMq\Consumer->processMessage(Object(PhpAmqpLib\Message\AMQPMessage)) 
#9 /var/www/lc/site/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php(1040): call_user_func(Array, Object(PhpAmqpLib\Message\AMQPMessage)) 
#10 [internal function]: PhpAmqpLib\Channel\AMQPChannel->basic_deliver(Object(PhpAmqpLib\Wire\AMQPReader), Object(PhpAmqpLib\Message\AMQPMessage)) 
#11 /var/www/lc/site/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(218): call_user_func(Array, Object(PhpAmqpLib\Wire\AMQPReader), Object(PhpAmqpLib\Message\AMQPMessage)) 
#12 /var/www/lc/site/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(373): PhpAmqpLib\Channel\AbstractChannel->dispatch('60,60', '!PHPPROCESS_ip-...', Object(PhpAmqpLib\Message\AMQPMessage)) 
#13 /var/www/lc/site/vendor/php-amqplib/rabbitmq-bundle/RabbitMq/Consumer.php(88): PhpAmqpLib\Channel\AbstractChannel->wait(NULL, false, 0) 
#14 /var/www/lc/site/vendor/php-amqplib/rabbitmq-bundle/Command/BaseConsumerCommand.php(90): OldSound\RabbitMqBundle\RabbitMq\Consumer->consume('250') 
#15 /var/www/lc/site/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php(255): OldSound\RabbitMqBundle\Command\BaseConsumerCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#16 /var/www/lc/site/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(987): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#17 /var/www/lc/site/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(86): Symfony\Component\Console\Application->doRunCommand(Object(OldSound\RabbitMqBundle\Command\ConsumerCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#18 /var/www/lc/site/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(255): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(OldSound\RabbitMqBundle\Command\ConsumerCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#19 /var/www/lc/site/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(74): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#20 /var/www/lc/site/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(148): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
#21 /var/www/lc/site/bin/console(26): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput)) 
#22 {main} [] []
@imphil imphil added the bug label Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant