webcreate / conveyor

Build and deploy tool for PHP projects
http://conveyordeploy.com
MIT License
11 stars 3 forks source link

Update phpseclib to 2.0.0 #54

Closed oldskool closed 8 years ago

oldskool commented 8 years ago

Update phpseclib dependency to 2.0.

Fixes these SSH errors while deploying:

PHP Warning:  include(System/SSH_Agent.php): failed to open stream: No such file or directory in ./conveyor/src/Webcreate/Conveyor/Transporter/SftpTransporter.php on line 22

Warning: include(System/SSH_Agent.php): failed to open stream: No such file or directory in ./conveyor/src/Webcreate/Conveyor/Transporter/SftpTransporter.php on line 22
PHP Warning:  include(): Failed opening 'System/SSH_Agent.php' for inclusion (include_path='...') in ./conveyor/src/Webcreate/Conveyor/Transporter/SftpTransporter.php on line 22

Warning: include(): Failed opening 'System/SSH_Agent.php' for inclusion (include_path='...') in ./conveyor/src/Webcreate/Conveyor/Transporter/SftpTransporter.php on line 22
pkruithof commented 8 years ago

I think the version constraint also should be updated to ~2.0. Also could you wait until a patch release for this issue is out, and update after that?

fieg commented 8 years ago

:+1:

Waiting for patch release...

fieg commented 8 years ago

Running with this code I run into various issues when deploying a complex system. I can't really pinpoint the cause, but a lot of ssh tasks fail, which otherwise run perfectly. More testing is required before proceeding with this PR.

oldskool commented 8 years ago

Version 2.0.1 has been released and is now added to composer.lock. @fieg Could you elaborate on the errors you're getting some more? Perhaps some stack traces? I assume there might be some outdated constants/methods still used in some places.

pkruithof commented 8 years ago

The only thing I've run into so far is what looks like a timeout on a SSH task. For instance, on a new deployment, where a composer install is run on a fresh install (meaning every dependency has to be downloaded, which takes a while):

[app]  - Executing task Webcreate\Conveyor\Task\SshTask
[app]    Executing: cd /path/to/release && SYMFONY_ENV=prod composer install --optimize-autoloader --no-dev
[app]    
[app]    
[app]    > Loading composer repositories with package information
[app]    > Installing dependencies from lock file

# bunch of composer output
[...] 

[app]    >   - Installing symfony/symfony (v2.6.6)
[app]    >     Downloading: Connecting...
[app]    
[app]  
[app]  - Executing task Webcreate\Conveyor\Task\SshTask
[app]    Executing: cd /path/to/release && php app/console assets:install --env=prod

  [RuntimeException]      
  Unable to open channel  

Exception trace:
 () at /Users/peter/projects/conveyor/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:3255

Now, the composer install actually completed (although the output indicates otherwise), but for the next task, the connection is dropped, it looks like.

pkruithof commented 8 years ago

@oldskool just came across another error:

https://github.com/webcreate/conveyor/pull/54/files#diff-b8e2ba8dbe396dbdc26419e2ad45c46eR103

This method has changed from loadKey to load.