Comments (10)
@michael811 Unfortunately it's still a work-in-progress and I have no ETA, but I hope to have it complete in the next couple of weeks. Been working on it a good bit over the last few days, and am making progress though! :)
from capistrano-magento2.
Alright everybody, @roman204 sent in PR #104 which got me started on this more in earnest. I'm polishing it up and it'll be out soon as v0.8.0! Once it's done, you'll see something like the following in a deployment:
04:13 magento:maintenance:check
Checking database status...
All modules are up to date. No database updates should occur during this release.
<release_path>/app/etc/config.php hash: 46441a938bf279b86f5cf23ca07d0244
<current_path>/app/etc/config.php hash: 46441a938bf279b86f5cf23ca07d0244
Disabling use of maintenance mode for a zero-down deployment.
Maintenance mode disablement is going to work by setting :magento_deploy_maintenance to false when the checks indicates maintenance mode is not required. Both of the following will need to pass for this to happen:
-
Magento CLI must report "All modules are up to date" in the
setup:db:status
output. -
The md5sum hash of the
app/etc/config.php
must match between the new and current release (if they differ, the app:config:import is necessary and cause for maintenance mode).
from capistrano-magento2.
When will you integrate this enhancement to deploy.rake?
from capistrano-magento2.
@davidalger care to look another look at this feature? Would really love to see it.
from capistrano-magento2.
At this moment setup:db-schema:upgrade
and setup:db-data:upgrade
are executed at each deploy, even though it is not necessary.
Some how the setup:db:status
is not executed to check if it's still necessary to do db changes.
from capistrano-magento2.
@alinalexandru - it's mentioned in the original issue why this is the case.
setup:db:status
- returns a successful exit code every time it's ran, regardless if the DB requires upgrading.
It's not possible to know programatically if the upgrade commands are needed or not, so they will run every time to ensure the database is upgraded when needed.
from capistrano-magento2.
I saw that the output is checked. So there is a way to check if is needed or not
from capistrano-magento2.
And an example of where the config.php has not changed, but some modules are requiring db updates:
04:17 magento:maintenance:check
Checking database status...
The module code base doesn't match the DB schema and data.
Magento_Directory schema: 2.0.1 -> 2.0.2
Magento_Directory data: 2.0.1 -> 2.0.2
Magento_Customer schema: 2.0.12 -> 2.0.13
Magento_Customer data: 2.0.12 -> 2.0.13
Magento_Catalog schema: 2.2.3 -> 2.2.4
Magento_Catalog data: 2.2.3 -> 2.2.4
Magento_Quote schema: 2.0.6 -> 2.0.7
Magento_Quote data: 2.0.6 -> 2.0.7
Magento_Sales schema: 2.0.7 -> 2.0.9
Magento_Sales data: 2.0.7 -> 2.0.9
Magento_Newsletter schema: 2.0.0 -> 2.0.1
Magento_Newsletter data: 2.0.0 -> 2.0.1
Magento_Vault schema: 2.0.2 -> 2.0.3
Magento_Vault data: 2.0.2 -> 2.0.3
<release_path>/app/etc/config.php hash: 46441a938bf279b86f5cf23ca07d0244
<current_path>/app/etc/config.php hash: 46441a938bf279b86f5cf23ca07d0244
Maintenance mode usage will be enforced per :magento_deploy_maintenance (enabled by default)
from capistrano-magento2.
Finally the test output when db changes are not made, but the config.php file differs:
04:11 magento:maintenance:check
Checking database status...
All modules are up to date. No database updates should occur during this release.
<release_path>/app/etc/config.php hash: 46441a938bf279b86f5cf23ca07d0244
<current_path>/app/etc/config.php hash: 136ab0193d460e18c19b26a6c8ebf446
Configuration hashes do not match. Maintenance mode will be used by default.
Maintenance mode usage will be enforced per :magento_deploy_maintenance (enabled by default)
from capistrano-magento2.
@davidalger awesome feature! Thank you very much, this helps us a lot.
from capistrano-magento2.
Related Issues (20)
- Do not run show pending updates when capistrano is outside magento git repo HOT 1
- var/reports HOT 2
- Can't install 'capistrano/magento2/cachetool' HOT 2
- [enhancement] Deploy on multiple fronts without recompiling everything on each machine HOT 2
- Catalog product images in production mode delete after deploy HOT 1
- Cached data from current release causes new release to fail with redis caching HOT 6
- Change default path of Composer HOT 2
- Magento still has issues with /pub in sitemap HOT 1
- Change deployment order of DI compile and schema upgrade HOT 2
- Problem with deploy after updated module with SFTP error in setup:di:compile step HOT 5
- Doesn't work with PHP 7.4 and Magento 2..42 HOT 4
- When execute command cap staging deploy
- Issue: Cached metadata/generated files HOT 7
- How to handle initial setup:install HOT 1
- How can I flush cache file on multi server HOT 1
- touch: cannot touch '/var/www/html/releases/20220809134142/pub/static/deployed_version.txt' No such file or directory HOT 1
- Suggestion: Add arbitrary composer_flags or option to run composer with --no-plugins HOT 1
- Capistrano version
- Support for Quality Patches Tool
- When upgrading PHP version, mainenance:enable runs against old codebase, using new php version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capistrano-magento2.