Coder Social home page Coder Social logo

dkdeploy-core's People

Contributors

dkd-ebert avatar goldi42 avatar kaiharder avatar ncreuschling avatar nicolasleger avatar websi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dkdeploy-core's Issues

The task "assets:add_default_content" crashes with error

Adding the default content from ./config/preseed/ with task assets:add_default_content crashes with the following error:

(Backtrace restricted to imported tasks)
cap aborted!
TypeError: can't dump IO

Tasks: TOP => file_access:set_custom_access
(See full trace by running task with --trace)

deployment fails with error "TypeError: no _dump_data is defined for class Thread::Mutex" by using sshkit 1.11+

deployment fails with Error "TypeError: no _dump_data is defined for class Thread::Mutex" by using sshkit versions 1.11-11.15.

cap aborted!
TypeError: no _dump_data is defined for class Thread::Mutex

Tasks: TOP => deploy:set_current_revision
(See full trace by running task with --trace)
The deploy has failed with an error: no _dump_data is defined for class Thread::Mutex
00:47 deploy:failed
      ERROR Error occurred at deployment. Rollback to old release
/Users/dimitriebert/.rvm/gems/ruby-2.3.5/gems/capistrano-3.9.1/lib/capistrano/dsl.rb:70:in 'dump': no _dump_data is defined for class Thread::Mutex (TypeError)

Related to this commit capistrano/sshkit@27b88ca

It results Thread::Mutex data in release_roles and can not be serialized by capistrano

deploy:cleanup task is skipped

We should investigate this:

02:33 deploy:cleanup
      WARN  Skipping cleanup of invalid releases on $SERVERNAME; unexpected foldername found (should be timestamp)

task `remove_unlesss_symlinked` doesn't work when `current` is a directory

This should solve the problem: (Also it renames the function and fixes the typo in its name! Careful, this is breaking!)

diff --git a/lib/dkdeploy/tasks/current_folder.rake b/lib/dkdeploy/tasks/current_folder.rake
index 1cc9306..ea7e3f0 100644
--- a/lib/dkdeploy/tasks/current_folder.rake
+++ b/lib/dkdeploy/tasks/current_folder.rake
@@ -6,7 +6,7 @@ namespace :current_folder do
   desc "Delete current folder unless it's a symlink"
   task :remove_unless_symlinked do
     on release_roles :all do
-      if test "[[ -d #{current_path} && ! -L #{current_path} ]]"
+      if test "[ -d #{current_path} ] && [ ! -L #{current_path} ]"
         execute :rm, '-rf', current_path
       else
         info I18n.t('info.ignoring_current_folder', scope: :dkdeploy)

Task for creating temp directory

The gem is littered with code that creates the local temp directory (FileUtils.mkdir_p 'temp')

This directory creation should be outsourced in a specific rake task that is invoked from other tasks.

Useless task "db:dump_tables"

The task "db:dump_tables" generates an empty sql file

These task should generate a db dump of specific database tables.
It use the binary mysqldump with options --no-data and --no-create-info which generate an empty sql file.

cap dev assets:add_default_content breaks with IO error

      03 rm -f fileadmin.tar.gz
    โœ” 03 user@machine 0.056s
** Invoke file_access:set_custom_access (first_time)
** Execute file_access:set_custom_access
cap aborted!
TypeError: can't dump IO
s:in `dump'
/User/.rvm/gems/ruby-2.3.3/gems/capistrano-3.5.0/lib/capistrano/dsl.rb:53:in `on'
/User/.rvm/gems/ruby-2.3.3/gems/dkdeploy-core-7.0.2/lib/dkdeploy/tasks/file_access.rake:51:in `block (3 levels) in <top (required)>'
/User/.rvm/gems/ruby-2.3.3/gems/dkdeploy-core-7.0.2/lib/dkdeploy/tasks/file_access.rake:50:in `each'
/User/.rvm/gems/ruby-2.3.3/gems/dkdeploy-core-7.0.2/lib/dkdeploy/tasks/file_access.rake:50:in `block (2 levels) in <top (required)>'
Tasks: TOP => file_access:set_custom_access

Rollback not properly work

At rollback the following message occur:

deploy:revert_release
      Invoking task 'deploy:symlink:release' for server 'example.com'
Skipping task `deploy:symlink:release'.
Capistrano tasks may only be invoked once. Since task `deploy:symlink:release' was previously invoked, invoke("deploy:symlink:release") at dkdeploy-typo3-cms-8.0.0/lib/dkdeploy/typo3/cms/dsl.rb:18 will be skipped.
If you really meant to run this task again, use invoke!("deploy:symlink:release")
THIS BEHAVIOR MAY CHANGE IN A FUTURE VERSION OF CAPISTRANO. Please join the conversation here if this affects you.
https://github.com/capistrano/capistrano/issues/1686

Erroneous cleanup of remove archive path

In copy.rake, L65 we erroneously delete remote_tmp_dir when we should only delete remote_archive_path (as stated in the info output).

      info I18n.t('file.remove', path: remote_archive_path, scope: :dkdeploy)
      execute :rm, '-rf', remote_tmp_dir

Fixing this issue improves parallel deployments.

Unable to create a mysql dump after security fix

After a security fix for mysql 5.7 and above, it is not able to create a mysql dump with tasks like download_content or download_structure

From Changelog:

Incompatible Change: Access to the INFORMATION_SCHEMA.FILES table now requires the PROCESS privilege.

This change affects users of the mysqldump command, which accesses tablespace information in the FILES table, and thus now requires the PROCESS privilege as well. Users who do not need to dump tablespace information can work around this requirement by invoking mysqldump with the --no-tablespaces option. (Bug #30350829)

see https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-31.html

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.