ORES is minifying all JSON responses in production. It should have pretty JSON by default.
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Halfak | T157842 Prod deployment of ORES | |||
Resolved | Halfak | T157721 Investigate default JSON minification behavior in production |
Event Timeline
Comment Actions
I've confirmed that:
- I can't reproduce the behavior with HEAD of wiki-ai/ores by running a simple dev server (via ./utility applications.wsgi)
- The current HEAD of wiki-ai/ores is the version of the submodule deployed in production and beta feature
So, still no sense has been made. :/
Comment Actions
OK. So here's my hypothesis. We're only setting the Flask config for prettyprint to False. There's no circumstances under which we set it back to True. So I've made a PR that allows the config to be set back to True for any relevant request. See https://github.com/wiki-ai/ores/pull/185 I'd like to get this merged and deployed to beta for testing there.
Comment Actions
It works! Ready for a deploy in Prod
http://ores-beta.wmflabs.org/v2/scores/enwiki/
{ "scores": { "enwiki": { "damaging": { "version": "0.3.0" }, "draftquality": { "version": "0.0.1" }, "goodfaith": { "version": "0.3.0" }, "reverted": { "version": "0.3.0" }, "wp10": { "version": "0.5.0" } } } }
http://ores-beta.wmflabs.org/v2/scores/enwiki/?format=json
{"scores": {"enwiki": {"damaging": {"version": "0.3.0"}, "draftquality": {"version": "0.0.1"}, "goodfaith": {"version": "0.3.0"}, "reverted": {"version": "0.3.0"}, "wp10": {"version": "0.5.0"}}}}