Hi,
Yesterday we released photo uploads in mobile (actually moved it from
beta to stable). We're logging errors we get when people try to upload
photos and it seems the most common one is that they're not logged in to
Commons even though they logged in to Wikipedia. It seems to be
happening quite randomly and doesn't seem to depend on any particular
browser.
We're not sure how to debug this. Have any similar issues ever happened
on desktop (people not being logged in to other projects)? Is there
anyone who has a good knowledge of how CentralAuth works and could help us?
Thanks,
Juliusz
Hey all,
As of today, we automatically run our QUnit test suite[4] in MediaWiki
core from Jenkins.
Example:
* https://gerrit.wikimedia.org/r/52177
* https://integration.mediawiki.org/ci/job/mediawiki-core-qunit/3/
* https://integration.mediawiki.org/ci/job/mediawiki-core-qunit/3/console
Today I sprinted to pick up QUnit testing in Jenkins and get it
stabilised and deployed.
It is run by using PhantomJS[2] and we're using
grunt-contrib-qunit[3][4] to abstract the logic:
* starting phantomjs
* pointing it to a url
* hooking into javascript engine to register callbacks to QUnit events
* progress indicator in cli
* return the proper exit code
I won't go in detail about what PhantomJS is, but in short:
It is a "headless" WebKit browser. Meaning, it doesn't render pixels
to a screen on the server side, but it does behave like a fully valid
browser environment as if it were rendering it to a screen (CSS is
being parsed, the DOM is there, stylesheets are active, retrieving
computed styles, ajax requests can be made etc.).
For more information, see [2].
Just to point out the obvious, this doesn't catch issues specific to
certain browsers (e.g. syntax only breaking in older EcmaScript 3
engines, or code that incorrectly relies on HTML5 DOM APIs that exist
in latest WebKit but not in Internet Explorer or Firefox). Those we
will catch once we also run this on multiple operating systems and in
more than 1 browser (which is the next chapter in implementing the
continuous integration workflow[5]).
Things this will catch are basically everything else. Any runtime error
that we can't detect in static analysis but will fail no matter what
browser you're in, such as:
* misspelled identifiers or syntax errors
* issues with ResourceLoader (mw.loader)
* issues with AJAX
* any code failures that result in exceptions
* the obvious (catching failures/regressions in our QUnit tests)
Even code that doesn't have unit tests. The code execution alone
should result an uncaught exception, which we can now get our hands on
since we actually execute the javascript in a real browser. This
includes anything related to ResourceLoader, since we don't just
execute the unit tests in a browser, we load them from MediaWiki's
core/index.php entry point (Special:JavaScriptTest, to be specific).
Similar to how we have the php-checkstyle job currently, the QUnit job
is in non-voting mode. However, unlike php-checkstyle, our QUnit tests
are actually passing, but we're not letting it vote yet to see how it
behaves over the next 24 hours. If it is stable, we'll make it voting
(like phplint, jshint and phpunit are already).
So, next time you read the jenkins-job comment, look for the QUnit job.
Happy testing,
-- Krinkle
[1] https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing
[2] PhantomJS:
http://phantomjs.org/
[3] node-phantomjs (npm wrapper with nom-install hook)
https://github.com/Obvious/phantomjs
[4] grunt-contrib-qunit
https://github.com/gruntjs/grunt-contrib-qunit
[5] https://www.mediawiki.org/wiki/Continuous_integration/Workflow_specification
So I know recently whoever has been pushing toward using php-cs in our
Jenkins system to help enforce better coding style automatically.
Well, recently PHP Analyzer, which is made by the same company as php-cs
and does code logic analysis, was just open sourced. I'm running it on MW
master right now to see what it says, but does anybody else know about this
product? Maybe it'd be useful to try and put it into our build system along
with php-cs? Thoughts...
*--*
*Tyler Romeo*
Stevens Institute of Technology, Class of 2015
Major in Computer Science
www.whizkidztech.com | tylerromeo(a)gmail.com
Can we get the "owner" instead of the "last reviewer" in the text
below, when a change is merged?
---------- Forwarded message ----------
From: jenkins-bot (Code Review) <gerrit(a)wikimedia.org>
(...)
jenkins-bot has submitted this change and it was merged.
(...)
Gerrit-Owner: SomeoneDifferentFromJenkinsBot <mail(a)mail.org>
Do you want to mention node.js in the job posting? It seems to be a
big buzzword :)
On Mon, Mar 4, 2013 at 3:41 PM, Ori Livneh <olivneh(a)wikimedia.org> wrote:
> Apologies for cross-posting. I'm forwarding the note below from Gabriel because I reallllllly think it's so important that this gets circulated widely. The set of skills required for contributing to Parsoid is somewhat more specialized than the set we typically recruit for, so it's really important for this to be distributed far and wide.
>
> --
> Ori Livneh
>
>
> Forwarded message:
>
>> From: Gabriel Wicke <gwicke(a)wikimedia.org>
>> Reply To: Wikitext-l <wikitext-l(a)lists.wikimedia.org>
>> To: Wikitext-l <wikitext-l(a)lists.wikimedia.org>
>> Date: Monday, March 4, 2013 12:01:40 PM
>> Subject: [Wikitext-l] Parsoid blog post & job opening
>>
>> Hi,
>>
>> we just published a blog post about Parsoid at
>>
>> http://blog.wikimedia.org/2013/03/04/parsoid-how-wikipedia-catches-up-with-…
>>
>> We are also looking for somebody to join us in our Parsoid adventure:
>>
>> http://hire.jobvite.com/Jobvite/Job.aspx?j=oIsbXfw2&c=qSa9VfwQ
>>
>> Cheers,
>>
>> Gabriel
>>
>> _______________________________________________
>> Wikitext-l mailing list
>> Wikitext-l(a)lists.wikimedia.org (mailto:Wikitext-l@lists.wikimedia.org)
>> https://lists.wikimedia.org/mailman/listinfo/wikitext-l
>>
>
>
>
>
> _______________________________________________
> Wmfall mailing list
> Wmfall(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wmfall
--
Leslie Carr
Wikimedia Foundation
AS 14907, 43821
http://as14907.peeringdb.com/
Hey,
So I'm working on making an S3 file backend for E:AWS, but I've run into an
issue. FileBackend::doCreateInternal expects an array of options, one of
those options should be an array of headers, e.g., Content-Type. Amazon S3
needs the Content-Type header, otherwise it just shows up as a file
download. From looking at the upload workflow, it seems the headers are
being determined by MediaHandler::getStreamHeaders when it's called from
LocalFile::upload().
However, upon inspecting the code for
MediaHandler::getStreamHeaders.....the entire function body is "return
array()". So, um, was this just never implemented, or am I missing
something.
*--*
*Tyler Romeo*
Stevens Institute of Technology, Class of 2015
Major in Computer Science
www.whizkidztech.com | tylerromeo(a)gmail.com
Hey,
So there's a change (https://gerrit.wikimedia.org/r/48995) that's adding a
new subclass to HTMLForm, so I had a quick question for whoever has more
experience with HTMLForm than I do. The new subclass will always output a
table for the getInputHTML(), even if the parent form is set to div/raw
output. Is this OK, i.e., is the table/div/raw only applicable to the form
itself, or should the subclass make sure to follow that format as well?
Unfortunately, there is no precedent for this because every other field
type only puts out an input tag.
*--*
*Tyler Romeo*
Stevens Institute of Technology, Class of 2015
Major in Computer Science
www.whizkidztech.com | tylerromeo(a)gmail.com