Page MenuHomePhabricator

Warning: JsonConfig: Invalid $wgJsonConfigModels['JsonConfig.Dashiki'] array value, 'class' not found
Closed, ResolvedPublic5 Estimated Story PointsPRODUCTION ERROR

Description

Started seeing this in the logs today

[Warning: JsonConfig: Invalid $wgJsonConfigModels['JsonConfig.Dashiki'] array value, 'class' not found Called from JsonConfig\JCSingleton::getContentClass in /srv/mediawiki/php-1.30.0-wmf.2/extensions/JsonConfig/includes/JCSingleton.php at line 403] in /srv/mediawiki/php-1.30.0-wmf.2/includes/debug/MWDebug.php on line 309

Event Timeline

Restricted Application added a project: Analytics. · View Herald TranscriptMay 25 2017, 7:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Nuria triaged this task as Low priority.May 29 2017, 3:30 PM
Nuria moved this task from Incoming to Dashiki on the Analytics board.
Milimetric raised the priority of this task from Low to Medium.
Milimetric edited projects, added Analytics-Kanban; removed Analytics.
Milimetric moved this task from Next Up to In Progress on the Analytics-Kanban board.

From analyzing logstash (just searching for "Dashiki"), it seems the problem happens only when the API attempts to return the contents of the page. So somehow the way the extension is written means the page renders and edits fine but makes the API blow up. Further testing needed, can use https://en.wikipedia.beta.wmflabs.org/wiki/Config:Dashiki:Test to test.

Change 358079 had a related patch set uploaded (by Milimetric; owner: Milimetric):
[mediawiki/extensions/Dashiki@master] Fix warning thrown when api gets Dashiki pages

https://gerrit.wikimedia.org/r/358079

Change 358079 merged by jenkins-bot:
[mediawiki/extensions/Dashiki@master] Fix warning thrown when api gets Dashiki pages

https://gerrit.wikimedia.org/r/358079

This broke things:

PHP Fatal Error: Cannot instantiate abstract class JsonConfig\JCObjContent

which kind of makes sense. I will revert and try to figure out how to make it know about that class.

@MaxSem: I tested this in Vagrant and I can't get it to throw that "Cannot instantiate abstract class JsonConfig\JCObjContent" error. I used both the API and the normal interface to hit the test pages I made, and I don't see anything in the logs or interface. There must be something different about beta, or how JsonConfig is set up there. Any ideas?

demon raised the priority of this task from Medium to High.Jul 19 2017, 7:41 PM
demon added a subscriber: demon.

This really really needs fixing by someone who owns the extension. This has been going on for ~2 months now.

I couldn't replicate in vagrant or beta, though I tried. I'm all up for sitting with someone who knows mediawiki better to try and debug. This extension itself is about as simple as an extension can get, it's basically a Hello World using JsonConfig classes.

demon added a comment.Jul 19 2017, 9:08 PM

Well perhaps the issue is in the underlying JsonConfig that this is based on (which also has its share of issues filed....)

Does anyone else on your team have experience with this area of the code? I find it mildly problematic that we have code that nobody can support in production :-\

No, I wrote this extension. I know this code inside and out, because it's like five lines, and there's no problem in the code itself as far as we can tell, just in how JsonConfig expects it to provide something in extension.json. I couldn't replicate the problem we see in production, so I don't know how to fix it except for the "test in production" advice I got above - which definitely freaks me out.

greg added a subscriber: greg.Jul 19 2017, 9:47 PM

@Milimetric I believe he is speaking about the dependency, JsonConfig. That extension is one that essentially no one has any experience with yet it is a dependency of many things in production. Then we have issues like this, where a long standing issue is unresolvable because of an issue with that dependency. This is not a long term stable position to be in.

Oh, gotcha. Agreed. Am I right in guessing that the Structured Data work would make JsonConfig obsolete and we can migrate to that once it's ready? Or is that just enabling multiple types of content, and not necessarily solving the problem of storing Json specifically? If so, then maybe we have to learn JsonConfig. It doesn't seem too terribly complicated, maybe we I can pair with someone and the two of us can be responsible for it.

Change 366491 had a related patch set uploaded (by Milimetric; owner: Milimetric):
[mediawiki/extensions/Dashiki@master] Fix warning thrown when api gets Dashiki pages

https://gerrit.wikimedia.org/r/366491

Change 366491 merged by Milimetric:
[mediawiki/extensions/Dashiki@master] Fix warning thrown when api gets Dashiki pages

https://gerrit.wikimedia.org/r/366491

greg added a comment.Jul 21 2017, 10:29 PM

btw: per this task I made this edit to the Developers/Maintainers page on mw.org:
https://www.mediawiki.org/w/index.php?title=Developers%2FMaintainers&type=revision&diff=2518725&oldid=2515827

I did it during a meeting so I didn't also go looking for other Analytics things that aren't owned, so take a look when you have time. Thanks!

Thanks @greg, added info for EventBus. This is a good resource to keep updated.

Nuria moved this task from Ready to Deploy to Done on the Analytics-Kanban board.Jul 26 2017, 3:05 PM
Nuria set the point value for this task to 5.Jul 26 2017, 3:08 PM
Nuria closed this task as Resolved.Aug 2 2017, 12:33 AM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM