Page MenuHomePhabricator

Citoid restbase endpoint not configured correctly in vagrant
Closed, DeclinedPublic0 Estimated 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

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mvolz triaged this task as Medium priority.Dec 15 2016, 11:50 AM
mobrovac subscribed.

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

Should be fixed now. Resolving.

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.

@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.

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).

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 edited projects, added Services; removed Services (done).

@Mvolz is this still an issue?

Just updated everything, and yup :)

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?

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.

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.

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.

Agreed that going through RESTBase is better. We are now doing some major work on RESTBase, and once we are done we'll need to update the Vagrant config for it anyway, so we'll look into it then. In the meantime, it is safe to shortcut this and use Citoid directly (provided we place TODOs there so as not to forget :P)

With both restbase and vagrant being decommed, this is now pointless.