Page MenuHomePhabricator

Citoid restbase endpoint not configured correctly in vagrant
Open, NormalPublic0 Story Points

Description

Two separate issues:

A request to the end point doesn't work.

For instance, https://en.wikipedia.org/api/rest_v1/data/citation/mediawiki/http%3A%2F%2Fexample.com returns valid data.

However, on my machine (using vagrant)

http://dev.wiki.local.wmftest.net:8080/api/rest_v1/data/citation/mediawiki/http%3A%2F%2Fexample.com

returns

{"type":"https://mediawiki.org/wiki/HyperSwitch/errors/not_found#route","title":"Not found.","method":"get","uri":"/dev.wiki.local.wmftest.net/v1/data/citation/mediawiki/http%3A//example.com"}

This may be related to what happens when you use the GUI to generate the request:

If you select "mediawiki" from the drop down, and put "http://example.com" in the search field, and hit the "Try it out" button, it gives you the following request URL:

http://dev.wiki.local.wmftest.net:8080/dev.wiki.local.wmftest.net/v1/data/citation/mediawiki/http%3A%2F%2Fwww.example.com

Event Timeline

Mvolz created this task.Dec 14 2016, 5:16 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 14 2016, 5:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mvolz moved this task from Backlog to Production on the Citoid board.Dec 15 2016, 9:34 AM
Mvolz edited projects, added RESTBase-API; removed Services.Dec 15 2016, 11:49 AM
Mvolz added a subscriber: Pchelolo.
Mvolz triaged this task as Normal priority.Dec 15 2016, 11:50 AM
mobrovac claimed this task.Dec 15 2016, 2:35 PM
mobrovac added a subscriber: mobrovac.

I'll take this one. The config needs to be updated most likely.

Change 327518 had a related patch set uploaded (by Mobrovac):
RESTBase: Add the Citoid config

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

Change 327518 merged by jenkins-bot:
RESTBase: Add the Citoid config

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

mobrovac closed this task as Resolved.

Should be fixed now. Resolving.

Jdforrester-WMF set the point value for this task to 0.
bd808 moved this task from Backlog to Done on the MediaWiki-Vagrant board.Jan 23 2017, 4:09 PM
Mvolz added a comment.EditedOct 16 2017, 6:20 PM

This issue as originally reported is still ongoing - should I create a separate issue since it seems to be two different issues and it mutated halfway through?

I made a completely fresh install on vagrant on a different machine with a different operating system today (Debian 9 - Other OS was Ubuntu 14.04) and I still have the same issue, where citoid is configured incorrectly, and returns hyperswitch errors, which means that it does not work with Citoid extension in VE in vagrant.

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptOct 16 2017, 6:20 PM
mobrovac reopened this task as Open.Oct 16 2017, 7:16 PM

@Mvolz do you get a 404 regardless of the input?

Hm, ok, If that's the case, that might be an issue with the Apache rewrite rule decoding the URI or some similar magic.

Mvolz added a comment.Oct 19 2017, 6:51 PM

Hm, ok, If that's the case, that might be an issue with the Apache rewrite rule decoding the URI or some similar magic.

I think I might have been slightly misleading because I confused this with another task, but the config issue still exists as well (wrong URL).

Mvolz added a comment.Oct 19 2017, 6:57 PM

So, I think this one actually *was* resolved, it was actually this one where only 1 of the issues was resolved: https://phabricator.wikimedia.org/T162468

So I think it actually think it could be entirely config.

I'm confused @Mvolz :) It is unlikely that the problem is in RESTBase's config if search parameters without a / work, but the ones with it don't. Or am I missing something?

Well, I agree a priori that it seems unusual. But the fix for this bug
before was a config change, and that fixed both problems :).

Mvolz moved this task from Done to Backlog on the MediaWiki-Vagrant board.Jun 25 2018, 2:44 PM
Mvolz edited projects, added Services; removed Services (done).
Mvolz added a comment.Jun 25 2018, 2:47 PM

@Mvolz is this still an issue?

Just updated everything, and yup :)

mobrovac edited projects, added Services (doing); removed Services.Jun 25 2018, 5:35 PM

Well, I agree a priori that it seems unusual. But the fix for this bug
before was a config change, and that fixed both problems :).

Which config change (or which type thereof) are you referring to?

Mvolz added a comment.Jul 9 2018, 12:10 PM

Well, I agree a priori that it seems unusual. But the fix for this bug
before was a config change, and that fixed both problems :).

Which config change (or which type thereof) are you referring to?

I'm assuming https://gerrit.wikimedia.org/r/#/c/mediawiki/vagrant/+/327518/

But I made that comment ages ago so I'm not really sure.

Mvolz added a comment.Jul 9 2018, 12:12 PM

Well, I agree a priori that it seems unusual. But the fix for this bug
before was a config change, and that fixed both problems :).

Which config change (or which type thereof) are you referring to?

I'm assuming https://gerrit.wikimedia.org/r/#/c/mediawiki/vagrant/+/327518/

But I made that comment ages ago so I'm not really sure.

I looks like that config change was pre-restbase so it's not really relevant anymore.

Well, I agree a priori that it seems unusual. But the fix for this bug
before was a config change, and that fixed both problems :).

Which config change (or which type thereof) are you referring to?

I'm assuming https://gerrit.wikimedia.org/r/#/c/mediawiki/vagrant/+/327518/

But I made that comment ages ago so I'm not really sure.

I looks like that config change was pre-restbase so it's not really relevant anymore.

On further examination it looks like there's two instances running: http://localhost:1970/?doc seems to be running fine, but the extension is querying the restbase version, which is broken. I'm not sure whether we want to fix it to just use the working http://localhost:1970 one, or to take that one down and try to correct the restbase one, but the restbase one is what we're running in production so probably copying that behaviour is better.