Code Monkey home page Code Monkey logo

Comments (9)

mattbrictson avatar mattbrictson commented on September 22, 2024

Interesting. Thanks for the report! The only thing I can think of is that maybe Airbrussh thinks your console is zero-width and is therefore truncating all output?

Could you post the output of cap production doctor (with sensitive information redacted) to help me troubleshoot?

Also, could you try setting this option to see if it helps?

set :format_options, truncate: false

from airbrussh.

evserykh avatar evserykh commented on September 22, 2024

set :format_options, truncate: false didn't help.
Now print looks like
p fetch(:format_options) # => {:truncate=>false}
but nothing has changed.

Here is "filtered" output of suggested command:

$ bundle exec cap production doctor
                                        
Environment                                                   

    Ruby     ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin16]
    Rubygems 2.5.2
    Bundler  1.14.6
    Command  /Users/user/.rbenv/versions/2.3.4/bin/cap production doctor

Gems                                                                                                                                                                                                       [13/110]

    capistrano         3.8.1
    airbrussh          1.2.0
    rake               12.0.0
    sshkit             1.13.1
    net-ssh            4.1.0
    capistrano-bundler 1.2.0
    capistrano-rbenv   2.1.1
    capistrano-sidekiq 0.10.0

Variables                                                                                                                                                                                                   [2/110]

    :application                 FILTERED
    :branch                       "master"
    :bundle_bins               ["gem", "rake", "rails", "sidekiq", "sidekiqctl"]
    :bundle_flags              "--deployment --quiet"
    :bundle_jobs               10
    :bundle_path               FILTERED
    :bundle_roles                :all
    :bundle_servers           FILTERED
    :bundle_without            "development test"
    :chruby_map_bins        ["sidekiq", "sidekiqctl"]
    :default_env                  FILTERED
    :deploy_to                     FILTERED
    :format                        :airbrussh
    :git_environmental_variables FILTERED
    :git_shallow_clone           false
    :git_wrapper_path            FILTERED
    :keep_releases               5
    :linked_dirs                 ["log", "tmp/pids", "tmp/cache", "tmp/sockets", "vendor/bundle"]
    :linked_files                ["config/unicorn.yml"]
    :local_user                  FILTERED
    :log_level                   :debug
    :pty                             false
    :rbenv_map_bins              ["rake", "gem", "bundle", "ruby", "rails", "sidekiq", "sidekiqctl"]
    :rbenv_path                  "$HOME/.rbenv"
    :rbenv_prefix                "$HOME/.rbenv/bin/rbenv exec"
    :rbenv_roles                 :all
    :rbenv_ruby                  "2.3.4"
    :rbenv_ruby_dir              "$HOME/.rbenv/versions/2.3.4"
    :repo_url                       FILTERED
    :rvm_map_bins                ["sidekiq", "sidekiqctl"]
    :sidekiq_default_hooks       true
    :sidekiq_env                 :production
    :sidekiq_log                 FILTERED
    :sidekiq_options_per_process nil
    :sidekiq_pid                 FILTERED
    :sidekiq_processes           1
    :sidekiq_role                :app
    :sidekiq_timeout             10
    :sidekiq_user                nil
    :stage                       :production
    :tmp_dir                     "/tmp"

    :bundle_jobs is not a recognized Capistrano setting (/Users/user/.rbenv/versions/2.3.4/lib/ruby/2.3.0/delegate.rb:83)

Servers (1)

    FILTERED [:web, :app, :sidekiq]

from airbrussh.

mattbrictson avatar mattbrictson commented on September 22, 2024

Sorry, I am stumped. I don't see anything obvious in your config that might cause a problem like this.

Just to be clear, when you run cap production deploy:check, you get no output whatsoever? It just looks like this?

$ cap production deploy:check
$

Here are some things I would try, running cap production deploy:check after each experiment to see if it fixes the output:

  1. If you have any custom tasks defined, comment them out.
  2. Comment out third-party gems (e.g. require "capistrano/sidekiq") from your Capfile one at a time.
  3. Remove airbrussh from the equation by adding set :format, :pretty to deploy.rb.

from airbrussh.

evserykh avatar evserykh commented on September 22, 2024

You know, actually I didn't try deploy:check before. I have tried rbenv:validate and bundler:install only and it led me to this issue.

deploy:check with default settings gives me output, but rbenv:validate and bundler:install commands are silent. However, I can see their output if I use set :format, :pretty.

Maybe it's a problem of capistrano-bundler and capistrano-rbenv gems?

from airbrussh.

mattbrictson avatar mattbrictson commented on September 22, 2024

I still am unclear by what you mean by the "commands are silent". Can you paste exactly what you are seeing? Also post the corresponding :pretty output of the same command so I can better understand the difference. Thanks.

from airbrussh.

evserykh avatar evserykh commented on September 22, 2024

Here is output for default settings (this is what I mean by "silent", sorry for my stupid English):

$ bundle exec cap production bundler:install
$

Here is output with set :format, :pretty:

$ bundle exec cap production bundler:install
 DEBUG [c642accb] Running [ -d $HOME/.rbenv/versions/2.3.4 ] as user@server
 DEBUG [c642accb] Command: [ -d $HOME/.rbenv/versions/2.3.4 ]
 DEBUG [c642accb] Finished in 4.586 seconds with exit status 0 (successful).
 DEBUG [61690e64] Running if test ! -d /app/current; then echo "Directory does not exist '/app/current'" 1>&2; false; fi as user@server
 DEBUG [61690e64] Command: if test ! -d /app/current; then echo "Directory does not exist '/app/current'" 1>&2; false; fi
 DEBUG [61690e64] Finished in 0.596 seconds with exit status 0 (successful).
 DEBUG [15ed7e3c] Running $HOME/.rbenv/bin/rbenv exec bundle check --path /app/shared/bundle as user@server
 DEBUG [15ed7e3c] Command: cd /app/current && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.4" ; $HOME/.rbenv/bin/rbenv exec bundle check --path /app/shared/bundle )
 DEBUG [15ed7e3c]       The Gemfile's dependencies are satisfied
 DEBUG [15ed7e3c] Finished in 1.165 seconds with exit status 0 (successful).
$

from airbrussh.

mattbrictson avatar mattbrictson commented on September 22, 2024

Thanks for sharing the output! Can you also post your Capfile?

from airbrussh.

evserykh avatar evserykh commented on September 22, 2024

Of course. Here it is:

require 'rubygems'                                                                                                         
require 'bundler'                                                                                                          
                                                                                                                           
require 'capistrano/setup'                                                                                                 
require 'capistrano/deploy'                                                                                                
                                                                                                                           
require "capistrano/scm/git"                                                                                               
require 'capistrano/bundler'                                                                                               
require 'capistrano/rbenv'                                                                                                 
# require 'capistrano/sidekiq'                                                                                               
# require 'slackistrano/capistrano'                                                                                        
                                                                                                                           
install_plugin Capistrano::SCM::Git                                                                                        
                                                                                                                           
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } # actually here aren't any custom tasks    

from airbrussh.

mattbrictson avatar mattbrictson commented on September 22, 2024

cap production bundler:install should not produce any output if your Gemfile has not changed and all gems are already installed.

Airbrussh only outputs commands that are run via execute. In the case of bundle:install, Capistrano is using test (not execute) to run bundle check to see if the Gemfile is satisfied. If this command succeeds, there is no step to execute, and thus no output is printed.

This is explained in the README under the "what's not displayed" section here: https://github.com/mattbrictson/airbrussh#whats-not-displayed

If you'd like to see every individual action that Capistrano is performing, including tests, then I would suggest using the :pretty formatter instead of Airbrussh.

from airbrussh.

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.