[Wikitech-l] API breakage a few hours ago

2009-02-18 Thread Robert Ullmann
The API return in XML for queries with no result elements was broken a
few hours ago. I believe the culprit is r46845
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/46845 which does
say it is a breaking change, but the break intended is that
applications may see query-continue earlier than expected (i.e.
earlier than the limit the app set), which applications should usually
handle anyway.

However it changes the XML structure for no results; if I query for
(say) recentchanges in the last few hours, and there are none, it
should (and did) return (in part):

  queryrecentchanges //query

now it returns

  query recentchanges=

which is not the same thing. Application code looking for the
recentchanges element will see the return as missing, incomplete, or
some error, rather than an empty element.

For RC, the code diff is
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiQueryRecentChanges.php?pathrev=46845r1=46844r2=46845

given the way setIndexedTagName_internal apparently works.

I think (but haven't tested) this breaks null returns for everything,
and thus a lot of applications may have trouble. Can we get it backed
out and re-committed when it generates the correct XML? (I will patch
a couple of my things for now.)

Best regards,
Robert

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] API breakage a few hours ago

2009-02-18 Thread Tim Starling
Robert Ullmann wrote:
[...]
 now it returns
 
   query recentchanges=

Filed in Bugzilla at https://bugzilla.wikimedia.org/show_bug.cgi?id=17552

-- Tim Starling


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] API breakage a few hours ago

2009-02-18 Thread Nicolas Dumazet
(Did you read http://thread.gmane.org/gmane.org.wikimedia.mediawiki.api/911 ? )

And for future reference, mediawiki-api mailing list might be more
convenient to flag api-related issues ;)

Cheers,

2009/2/18 Tim Starling tstarl...@wikimedia.org:
 Robert Ullmann wrote:
 [...]
 now it returns

   query recentchanges=

 Filed in Bugzilla at https://bugzilla.wikimedia.org/show_bug.cgi?id=17552

 -- Tim Starling


 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l




-- 
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l