NCIOCPL / cgov-digital-platform

The Cancer.gov Digital Communications Platform
GNU General Public License v2.0
11 stars 33 forks source link

Error when trying to `drush purge cre` #2174

Closed bryanpizzillo closed 11 months ago

bryanpizzillo commented 5 years ago

I was not able to invalidate the nano site.

ncigov@web-3322:~$ ~/bin/nano-drush.sh cre
Invalidating everything will mass-clear potentially thousands of pages, which could temporarily make your site really slow as external caches will have to warm up again.

 Are you really sure? (yes/no) [yes]:
 > 

 [error]  Error: Class 'Drupal\purge_drush\Commands\InvStatesInterface' not found in Drupal\purge_drush\Commands\PurgeDrushInvalidate->invalidate() (line 105 of /mnt/www/html/ncigov01live/docroot/modules/contrib/purge/modules/purge_drush/src/Commands/PurgeDrushInvalidate.php) #0 /mnt/www/html/ncigov01live/docroot/modules/contrib/purge/modules/purge_drush/src/Commands/PurgeDrushInvalidate.php(123): Drupal\purge_drush\Commands\PurgeDrushInvalidate->invalidate('everything', NULL, Array)
#1 [internal function]: Drupal\purge_drush\Commands\PurgeDrushInvalidate->invalidateAll(Array)
#2 /mnt/www/html/ncigov01live/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#3 /mnt/www/html/ncigov01live/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#4 /mnt/www/html/ncigov01live/vendor/consolidation/annotated-command/src/CommandProcessor.php(178): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#5 /mnt/www/html/ncigov01live/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(302): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#6 /mnt/www/html/ncigov01live/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /mnt/www/html/ncigov01live/vendor/symfony/console/Application.php(987): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /mnt/www/html/ncigov01live/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /mnt/www/html/ncigov01live/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /mnt/www/html/ncigov01live/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /mnt/www/html/ncigov01live/vendor/drush/drush/src/Runtime/Runtime.php(49): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /mnt/www/html/ncigov01live/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#13 /mnt/www/html/ncigov01live/vendor/drush/drush/drush(4): require('/mnt/www/html/n...')
#14 {main}. 
Error: Class 'Drupal\purge_drush\Commands\InvStatesInterface' not found in Drupal\purge_drush\Commands\PurgeDrushInvalidate->invalidate() (line 105 of /mnt/www/html/ncigov01live/docroot/modules/contrib/purge/modules/purge_drush/src/Commands/PurgeDrushInvalidate.php).
 [warning] Drush command terminated abnormally. Check for an exit() in your Drupal site.
ncigov@web-3322:~$ 
bryanpizzillo commented 5 years ago

It looks like the commands have been all updated and changed since the patch. I think we need to move to the dev branch.

bryanpizzillo commented 5 years ago

This patch, https://git.drupalcode.org/project/purge/commit/6f84e4ec96044408b5a54ec9e0d0201e7c9f063d.diff, is from the actual commit that was applied to the git repo. (It is very confusing as to what patch was applied in https://www.drupal.org/project/purge/issues/2921309#comment-12908559.

bryanpizzillo commented 5 years ago

That diff applied and the output from commands looks less sketchy. drush pinv everything did not immediately blow up. I did like the older purge: commands instead of p:, but these "new" commands match the docs better.

bryanpizzillo commented 11 months ago

I am going to close this issue as:

  1. We are on a much newer drush/purge, and the purge cre command is not longer in existance.
  2. We don't really ever call drush pinv everything