-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[For 10.4] Set 599 HTTP code on error #36413
Conversation
Codecov Report
@@ Coverage Diff @@
## master #36413 +/- ##
============================================
- Coverage 64.68% 64.66% -0.03%
+ Complexity 19023 19022 -1
============================================
Files 1268 1268
Lines 74362 74386 +24
Branches 1309 1309
============================================
Hits 48100 48100
- Misses 25876 25900 +24
Partials 386 386
Continue to review full report at Codecov.
|
Summing up the changes:
Notes on the error handling: The request processing goes as follows:
This new crash log file will be generated in the configured data directory, unless the |
250228d
to
d84eafc
Compare
0dc63cf
to
4eed679
Compare
I checked the code list from mozilla, and the 599 didn't appear... it might not be the best code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested. But code wise looks ok to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a changelog item
This could happen if the server crashes using the web UI. The browser sends a request to the /favicon.ico URL instead of /core/img/favicon.ico, which is configured in the ownCloud's web pages. Without this fix, the server responds with a 500 instead of a 200 or 404
It was causing an additional DBALException when there is no DB connection. The logger was trying to access to the DB during the shutdown process, causing an unhandled exception to appear in apache
The endpoints will return a 599 HTTP status to distinguish app failures, which shouldn't break ownCloud and can still be reported through normal means. It will use a different file to log what happened without messing with the owncloud.log file and without bothering the web server's log Include new configuration option in config.sample.php file
f79ca51
to
3674fa0
Compare
@micbar should this be added to 10.4.0 project? |
@phil-davis 10.4 is ok. |
Someone needs to decide what to do about the codecov result. |
@micbar the rest is too low-level for unit tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accepted the PR, Needs a manual Release test during QA phase.
@davitol Please post an example of the crashlog contents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - as in the discussion, automated tests are not realistic.
Someone with privs needs to override the codecov result and merge.
Description
web page shows a 200 status instead of a 500 (or similar) in case of error
Related Issue
#36072
Motivation and Context
How Has This Been Tested?
Load any ownCloud web page without having connection to the DB (ownCloud was installed but the DB connection was cut later)
Screenshots (if appropriate):
Types of changes
Checklist: