2019-10-02 14:00:33
|
<wm-bot>
|
Technical Advice IRC meeting starting in 60 minutes in channel #wikimedia-tech, hosts: - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting
|
2019-10-02 14:50:17
|
<wm-bot>
|
Technical Advice IRC meeting starting in 10 minutes in channel #wikimedia-tech, hosts: @Lucas_WMDE & @James_F - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting
|
2019-10-02 14:50:29
|
<James_F>
|
waves.
|
2019-10-02 14:51:39
|
<Lucas_WMDE>
|
waves back
|
2019-10-02 15:00:11
|
<James_F>
|
Okie-dokie, that's the time.
|
2019-10-02 15:00:21
|
<James_F>
|
Welcome all to the weekly Technical Advice meeting.
|
2019-10-02 15:00:36
|
<James_F>
|
Lucas_WMDE and are here and happy to answer any questions you might have.
|
2019-10-02 15:00:49
|
<Lucas_WMDE>
|
o/
|
2019-10-02 15:15:52
|
<apergos>
|
sure is a quiet session today
|
2019-10-02 15:15:59
|
<James_F>
|
Indeed.
|
2019-10-02 15:17:02
|
<apergos>
|
well, since no one else is asking anything, here's a question for you (for some vague value of "you"): why can I not via the mw api export all revisions of some set of pages, but only the current ones?
|
2019-10-02 15:17:20
|
<apergos>
|
you would think that if special:export lets me do it from the browser, I ought to be able to do it from the api, but no.
|
2019-10-02 15:17:29
|
<James_F>
|
I think that's for performance reasons.
|
2019-10-02 15:17:38
|
<James_F>
|
Special:Export is very locked-down.
|
2019-10-02 15:17:55
|
<James_F>
|
But a rights-restricted API would be fine.
|
2019-10-02 15:18:00
|
<apergos>
|
well, presumably you can only get x number of revisions per request, you pass in a continue param, etc like all the batched api queries
|
2019-10-02 15:18:24
|
<James_F>
|
The "and transcluded content" flag expands the scope a great deal.
|
2019-10-02 15:18:32
|
<James_F>
|
And makes batching hard.
|
2019-10-02 15:18:43
|
<apergos>
|
ugh transcluded
|
2019-10-02 15:18:44
|
<James_F>
|
But yeah, we could do that.
|
2019-10-02 15:19:01
|
<apergos>
|
but we could ("we", i.e. $someone)
|
2019-10-02 15:19:14
|
<apergos>
|
...could do it for a stright up list of pages, no transclusions
|
2019-10-02 15:19:15
|
<James_F>
|
Transcluded is the only valuable flag. "Get me this template and all its documentation, templatestyles, Scribunto modules, and sub-templates".
|
2019-10-02 15:19:32
|
<James_F>
|
Sure, but would that be significantly useful?
|
2019-10-02 15:19:49
|
<James_F>
|
(I don't use the API for content access, so I'm not the best judge of utility.)
|
2019-10-02 15:19:55
|
<apergos>
|
it could save people the headache of digging out 10 pages from a 200gb dump set
|
2019-10-02 15:20:40
|
<apergos>
|
just a 'nice to have'
|
2019-10-02 15:20:55
|
<James_F>
|
Yes, but do they definitely want plain content without transclusions?
|
2019-10-02 15:20:57
|
<James_F>
|
nods.
|
2019-10-02 15:21:00
|
<Lucas_WMDE>
|
not sure how continuation would work here… would users have to “glue” the XML together themselves?
|
2019-10-02 15:21:21
|
<ankry>
|
I have a question about processing templates provided to LUA function via frame:getParent().args
|
2019-10-02 15:21:21
|
<apergos>
|
each xml file would have to have the full mediawiki, siteinfo, and page/title tags
|
2019-10-02 15:21:30
|
<apergos>
|
then a set of revisions
|
2019-10-02 15:21:36
|
<apergos>
|
oooh a question! woo
|
2019-10-02 15:22:31
|
<James_F>
|
This is related to T40669 but AFAICT not the same, right?
|
2019-10-02 15:22:32
|
<stashbot>
|
T40669: API export action does not support exporting specific revisions - https://phabricator.wikimedia.org/T40669
|
2019-10-02 15:22:56
|
<ankry>
|
if a template calling LUA code is transcluded, the templates provided inside arguments are sometimes processed in wrong context (namespace)
|
2019-10-02 15:22:56
|
<apergos>
|
James_F: yep, but I'm going to defer in favor of ankry's question, I can follow up at any time
|
2019-10-02 15:23:07
|
<ankry>
|
any hint ow to avoid this?
|
2019-10-02 15:23:07
|
<James_F>
|
Sure.
|
2019-10-02 15:23:17
|
<James_F>
|
Lucas_WMDE: Do you know Lua enough to help ankry?
|
2019-10-02 15:23:33
|
<Lucas_WMDE>
|
probably not :/
|
2019-10-02 15:23:37
|
<ankry>
|
:(
|
2019-10-02 15:23:40
|
<Lucas_WMDE>
|
ankry: do you have an example somewhere?
|
2019-10-02 15:24:30
|
<ankry>
|
I have the templates, but not an example calling them
|
2019-10-02 15:25:01
|
<ankry>
|
If I need to construct an example, then mabe till next meeting?
|
2019-10-02 15:26:31
|
<Lucas_WMDE>
|
I have no idea who will be at the next meeting, tbh
|
2019-10-02 15:26:36
|
<Lucas_WMDE>
|
but an example would probably help in general
|
2019-10-02 15:26:49
|
<Lucas_WMDE>
|
are any Lua experts online at the moment who could help out?
|
2019-10-02 15:30:55
|
<ankry>
|
Lucas_WMDE: If I do not use the templates in arguments, but replace them with their code ("substitute" them), everything works fine
|
2019-10-02 15:33:04
|
<ankry>
|
looks like templates were processed in some context, their result cached some way and then the cached data used in another context. Unsure if this is a bug or feature
|
2019-10-02 15:43:50
|
<Lucas_WMDE>
|
as far as I’m aware, Lua invocations are generally supposed to be pretty independent of each other
|
2019-10-02 15:43:57
|
<Lucas_WMDE>
|
unless you opt into some sharing with mw.loadData()
|
2019-10-02 15:44:23
|
<Lucas_WMDE>
|
so to me that sounds more like a potential bug
|
2019-10-02 15:45:37
|
<Lucas_WMDE>
|
but multi-level substitution can also be terribly confusing – there’s some safesubst thing that I don’t understand at all
|
2019-10-02 15:48:43
|
<James_F>
|
No-one does.
|
2019-10-02 15:56:43
|
<apergos>
|
are there debugging tips you can provide for wading through the multiple levels of substitution? even that could help
|
2019-10-02 15:57:56
|
<James_F>
|
With MW template craziness, generally I recommend simplifying as a way to avoid unexpected issues.
|
2019-10-02 15:58:07
|
<James_F>
|
So instead of four levels of template indirection, try to do it in one or two.
|
2019-10-02 15:58:08
|
<James_F>
|
Etc.
|
2019-10-02 15:58:27
|
<James_F>
|
Each Lua call multiplies up the "bug surface" of things that can wrong.
|
2019-10-02 15:58:42
|
<James_F>
|
ankry: Good luck. :-(
|
2019-10-02 16:01:38
|
<Lucas_WMDE>
|
yeah, I don’t have any tips for this, sorry :/
|
2019-10-02 16:01:48
|
<Lucas_WMDE>
|
guess that concludes the Technical Advice IRC Meeting…
|
2019-10-02 16:01:52
|
<James_F>
|
OK, that's us at time.
|
2019-10-02 16:02:03
|
<Lucas_WMDE>
|
you could try asking at https://discourse-mediawiki.wmflabs.org/
|
2019-10-02 19:37:11
|
<domas>
|
hi!
|