Giter VIP home page Giter VIP logo

Comments (10)

davidalger avatar davidalger commented on May 31, 2024 3

@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.

davidalger avatar davidalger commented on May 31, 2024 2

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:

  1. Magento CLI must report "All modules are up to date" in the setup:db:status output.

  2. 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.

michael811 avatar michael811 commented on May 31, 2024

When will you integrate this enhancement to deploy.rake?

from capistrano-magento2.

PascalBrouwers avatar PascalBrouwers commented on May 31, 2024

@davidalger care to look another look at this feature? Would really love to see it.

from capistrano-magento2.

alinalexandru avatar alinalexandru commented on May 31, 2024

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.

adamj88 avatar adamj88 commented on May 31, 2024

@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.

alinalexandru avatar alinalexandru commented on May 31, 2024

I saw that the output is checked. So there is a way to check if is needed or not

from capistrano-magento2.

davidalger avatar davidalger commented on May 31, 2024

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.

davidalger avatar davidalger commented on May 31, 2024

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.

dverkade avatar dverkade commented on May 31, 2024

@davidalger awesome feature! Thank you very much, this helps us a lot.

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.