[Bug 48002] Jenkins: Check for server-side php errors during web request

2013-07-16 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48002

--- Comment #6 from Antoine hashar Musso has...@free.fr ---
Parsing the apache log is a smart idea to catch all issues that happens during
run time and we can't catch using static analysis. But since all QUnit jobs are
hitting the same virtualhost, you will end up with  erros from different
extensions in the apache log.

Instead we could use php auto_prepend_file that would let you inject whatever
PHP at the top of any PHP file being included (such as index.php / api.php ...
) 

http://www.php.net/manual/fr/ini.core.php#ini.auto-prepend-file

That let you write a small PHP File that fetch the Jenkins env variable
override the error_log and have something a bit more robust and easy to tweak.

Will have to make sure the injected code is only executed when PHP require a
MediaWiki entry point.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 48002] Jenkins: Check for server-side php errors during web request

2013-07-16 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48002

--- Comment #7 from Krinkle krinklem...@gmail.com ---
To clarify, we'd change the php init error_log setting to point to a file
inside the env.WORKSPACE directory from Jenkins so that we have the errors on a
per job base.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 48002] Jenkins: Check for server-side php errors during web request

2013-07-16 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48002

--- Comment #8 from Krinkle krinklem...@gmail.com ---
PS2: Depending on when we get to implementation of this, if we have jobs
running in Vagrant we don't need any of that hackery since the VM would be
dedicated to that one job only.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 48002] Jenkins: Check for server-side php errors during web request

2013-06-20 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48002

Antoine hashar Musso has...@free.fr changed:

   What|Removed |Added

   Severity|normal  |enhancement

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 48002] Jenkins: Check for server-side php errors during web request

2013-06-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48002

--- Comment #3 from Krinkle krinklem...@gmail.com ---
HTML is difficult to work with and format from plain bash (or most programming
languages for that matter). Plus we're striving towards getting rid of Jenkins
formatters to only use plain text reporters (with regards to build reports
static caching).

I'd say plain text is more than clear enough. We're all familiar with PHP's
error_log format.

We just need:
* php error log to go to a separate file for the qunit.localhost requests
* Jenkins needs to have permission to truncate this file
* Apache and/or PHP needs to not keep the handle open on this file, so that
when each job truncates the file, it really does truncates it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 48002] Jenkins: Check for server-side php errors during web request

2013-06-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48002

--- Comment #4 from Krinkle krinklem...@gmail.com ---
(In reply to comment #3)
 HTML is difficult to work with and format from plain bash (or most
 programming
 languages for that matter). Plus we're striving towards getting rid of
 Jenkins
 formatters to only use plain text reporters (with regards to build reports
 static caching).
 
 I'd say plain text is more than clear enough. We're all familiar with PHP's
 error_log format.
 
 We just need:
 * php error log to go to a separate file for the qunit.localhost requests
 * Jenkins needs to have permission to truncate this file
 * Apache and/or PHP needs to not keep the handle open on this file, so that
 when each job truncates the file, it really does truncates it.

Also, even if we'd make a custom HTML reporter or something, we still have
these same problems. So let's deal with that first.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 48002] Jenkins: Check for server-side php errors during web request

2013-06-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48002

--- Comment #5 from Antoine hashar Musso has...@free.fr ---
The important part in my reply was using a custom PHP error/exception handler.
It seems to be easier to tweak and more robust.

How would you handle several jobs running QUnit tests in parallel ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 48002] Jenkins: Check for server-side php errors during web request

2013-05-06 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48002

--- Comment #2 from Antoine hashar Musso has...@free.fr ---
Another way would be to override the PHP handler to log all the exceptions,
format them in a nice format (such as HTML?) and then use a post build action
in Jenkins to publish the report.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 48002] Jenkins: Check for server-side php errors during web request

2013-05-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=48002

--- Comment #1 from Krinkle krinklem...@gmail.com ---
Recommended approach:

* Rename mediawiki-core-qunit to mediawiki-core-browsertest
* Build steps:
  - Install MediaWiki
  - curl /wiki/Special:BlankPage (anything not HTTP 200 is error)
  - grunt qunit /wiki/Special:JavaScriptTest/qunit
  - assert apache/php error log is empty or unchanged

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l