Skip to content

[Forwardport] Log when Magento is in maintenance mode#17049

Merged
magento-engcom-team merged 4 commits into
magento:2.3-developfrom
torhoehn:2.3-develop-PR-port-16840
Jul 25, 2018
Merged

[Forwardport] Log when Magento is in maintenance mode#17049
magento-engcom-team merged 4 commits into
magento:2.3-developfrom
torhoehn:2.3-develop-PR-port-16840

Conversation

@torhoehn
Copy link
Copy Markdown
Contributor

@torhoehn torhoehn commented Jul 23, 2018

Original Pull Request

#16840

Description

Logging when Magento is in maintenance mode.

Not sure if I'm the only one that fell for this, but I've (embarrassingly) spent hours trying figuring out why Magento was throwing a 500 error; only to find that it was just in maintenance mode...

Logging this will save developers some time, and eliminate some of the guess work involved with troubleshooting obscure errors.

This is usually applicable when a deployment goes a little haywire.

==> var/log/system.log <==
[2018-07-15 19:38:12] main.ERROR: Unable to proceed: the maintenance mode is enabled.

As a "side-affect" we'd also be logging errors coming from the launch process, which I don't think is that much of an issue.

Manual testing scenarios

  1. Enable maintenance mode
  2. Run tail -f var/log/system.log
  3. Expect "Unable to proceed: the maintenance mode is enabled"

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @torhoehn. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @torhoehn. Thank you for your contribution.
We will aim to release these changes as part of 2.3.0.
Please check the release notes for final confirmation.

@torhoehn torhoehn deleted the 2.3-develop-PR-port-16840 branch July 25, 2018 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants