Giter VIP home page Giter VIP logo

Comments (4)

davidalger avatar davidalger commented on May 30, 2024

@grafikchaos Thanks for the detailed error report! To work on this, I'm going to need some more information if you're able to get it for me.

Can you tell me what OS you're running on the target machine, what version of php you're using, what version of ruby is running on the machine you're deploying from and also send me the contents of log/capistrano.log around the version call?

Also, can you run the following command on the same machine you are deploying from and tell me what it outputs?

ruby -e 'puts Gem::Version::new("2.1.5")'

I can't reproduce the issue, and haven't seen it on any of our deployments, so I'm hoping this will help me get somewhere. I'm also a bit perplexed with the regex \e\[(\d+)m as it is matching on a shell escape sequence, but it's not accounting for the period in the version number, which means the version number it returns is going to be inaccurate. So I need to figure out first how to reproduce the issue so I can verify a solution.

from capistrano-magento2.

grafikchaos avatar grafikchaos commented on May 30, 2024

The only thing that seems to make sense is a hidden character that formats the version number in yellow (see screenshot). Every time I tried debugging the version number in a ruby shell I never had a problem, only when it was dynamically captured with colored output.

screen shot 2017-03-29 at 2 30 49 pm

Also, can you run the following command on the same machine you are deploying from and tell me what it outputs?

ruby -e 'puts Gem::Version::new("2.1.5")'
2.1.5

Remote target environment:

  • os: CentOS release 6.8 (Final)
  • php: PHP 7.0.15
  • shell: bash
PHP 7.0.15 (cli) (built: Jan 23 2017 15:57:44) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.15, Copyright (c) 1999-2017, by Zend Technologies

Local machine for deployments:

  • os: macOS Sierra 10.12.3
  • ruby: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin16.0] (installed via rbenv)
  • shell: zsh

Local Gems

Gemfile

# frozen_string_literal: true
source "https://rubygems.org"

gem 'capistrano-magento2', "0.6.0"# github: 'augustash/capistrano-magento2', branch: "hotfix/pr64-fix-version-comparison"
gem "airbrussh", :require => false

Installed gems

gem list -d airbrussh                                                                                         develop

*** LOCAL GEMS ***

airbrussh (1.1.2, 1.1.1, 1.0.0, 0.8.0)
    Author: Matt Brictson
    Homepage: https://github.com/mattbrictson/airbrussh
    License: MIT
    Installed at (1.1.2): /usr/local/opt/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0
                 (1.1.1): /usr/local/opt/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0
                 (1.0.0): /usr/local/opt/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0
                 (0.8.0): /usr/local/opt/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0

    Airbrussh pretties up your SSHKit and Capistrano output

capistrano.log

screen shot 2017-03-29 at 2 53 16 pm

** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:


 DEBUG [db1deae7] Running /usr/bin/env php -f /home/mastersu/master-supplements.com/staging/releases/20170329195018/bin/magento -- -V as [email protected]

 DEBUG [db1deae7] Command: cd /home/mastersu/master-supplements.com/staging/releases/20170329195018 && ( export PATH="/opt/nexcess/php70u/root/usr/bin/:$PATH" ; /usr/bin/env php -f /home/mastersu/master-supplements.com/staging/releases/20170329195018/bin/magento -- -V )

 DEBUG [db1deae7] 	Magento CLI version 2.1.5

from capistrano-magento2.

davidalger avatar davidalger commented on May 30, 2024

Thank you so much for the completeness of your response!

The only thing that seems to make sense is a hidden character that formats the version number in yellow (see screenshot).

You are spot on with this! Crazy thing is, ansi output shouldn't turn up in non-interactive shells, but I'm pretty sure that's what's causing this.

I've pushed a commit to develop which should solve this. In short, I added --no-ansi to the bin/magento call. You can see the difference it makes:
current ssh www-stage stage pksafety com bash 127x45 2017-03-30 12-26-04

If you can test this fix and confirm that it solves the issue, I'll tag a new release and push it up ASAP.

from capistrano-magento2.

davidalger avatar davidalger commented on May 30, 2024

I went ahead and released version 0.6.1 which has my fix. If the issue persists, feel free to re-open the task so we can get a better solution in place. Thanks again for the report!

from capistrano-magento2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.