dkdeploy / dkdeploy-core Goto Github PK
View Code? Open in Web Editor NEWCapistrano extension for advanced deployments
License: MIT License
Capistrano extension for advanced deployments
License: MIT License
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 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
Compatibility with Ruby v2.7 needs to be tested.
We should investigate this:
02:33 deploy:cleanup
WARN Skipping cleanup of invalid releases on $SERVERNAME; unexpected foldername found (should be timestamp)
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)
The dependency to sshkit
version 1.10.0 should be removed.
See https://github.com/dkdeploy/dkdeploy-core/blob/v8.0.0/dkdeploy-core.gemspec#L32
We must update the capistrano dependency to version 3.8.x.
See https://github.com/capistrano/capistrano/releases/tag/v3.8.0
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.
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.
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
At the task maintenance:disable
the maintenance file was deleted with rm -f
.
This hide the errors, if the file can not deleted.
The scm copy
only deploy the release to the release roles app
.
This is not correct. The release should deploy to all release roles.
See https://github.com/dkdeploy/dkdeploy-core/blob/v8.0.0/lib/dkdeploy/copy.rb#L80
See server option no_release
for that. http://capistranorb.com/documentation/advanced-features/property-filtering/
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
At dkdeploy-core
the TYPO3 specific configuration should be removed.
For example the default database ignore tables.
See https://github.com/dkdeploy/dkdeploy-core/blob/v8.0.0/lib/dkdeploy/constants.rb#L68
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.
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
We must update the capistrano dependency to version 3.9.x.
See https://github.com/capistrano/capistrano/releases/tag/v3.9.1
The file test at lib/dkdeploy/tasks/current_folder.rake depend on the bash shell.
This should be removed.
Manual for command "test": http://manpages.ubuntu.com/manpages/trusty/man1/test.1posix.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.