After the last git-update this Monday (last one was probably on Friday or Thursday) Parsoid and/or RESTBase is no longer working properly for me in Vagrant.
I ran vagrant git-update --force without success and also ran vagrant provision but no changes were made. After that, I tried to remove /srv/restbase, /srv/parsoid and /etc/parsoid.localsettings.js and re-run vagrant provision and vagrant git-update --force. Still no luck.
logging: level: info name: restbase streams: - path: /vagrant/logs/restbase.log type: file metrics: type: log num_workers: 1 services: - conf: cors: "*" default_page_size: 100 default_project: x-modules: - options: action: apiUriTemplate: "{{'http://localhost:8080/w/api.php'}}" baseUriTemplate: "{{'http://{domain}:7231/{domain}/v1'}}" citoid: host: "http://localhost:1970" events: eventlogging_service: topic: resource_change uri: "http://localhost:8085/v1/events" graphoid: host: "http://localhost:11042" mathoid: cache-control: "s-maxage=864000, max-age=86400" host: "http://localhost:10042" mobileapps: host: "http://localhost:8888" parsoid: host: "http://localhost:8000" related: cache_control: "s-maxage=86400, max-age=86400" table: backend: sqlite dbname: /var/lib/restbase/mw-vagrant.sqlite3 path: projects/wmf_default.yaml mwapi_req: body: "{{ default(request.query, {}) }}" headers: host: "{{request.params.domain}}" user-agent: "{{user-agent}}" method: post uri: "http://{domain}/w/api.php" port: 7231 restbase_req: body: "{{request.body}}" headers: "{{request.headers}}" method: "{{request.method}}" query: "{{ default(request.query, {}) }}" uri: "http://localhost:7231/{{domain}}/v1/{+path}" salt: secret spec: paths: "/{domain:dev.wiki.local.wmftest.net}": x-modules: - options: action: apiUriTemplate: "{{'http://localhost:8080/w/api.php'}}" baseUriTemplate: "{{'http://{domain}:7231/{domain}/v1'}}" citoid: host: "http://localhost:1970" events: eventlogging_service: topic: resource_change uri: "http://localhost:8085/v1/events" graphoid: host: "http://localhost:11042" mathoid: cache-control: "s-maxage=864000, max-age=86400" host: "http://localhost:10042" mobileapps: host: "http://localhost:8888" parsoid: host: "http://localhost:8000" related: cache_control: "s-maxage=86400, max-age=86400" table: backend: sqlite dbname: /var/lib/restbase/mw-vagrant.sqlite3 path: projects/wmf_default.yaml "/{domain:wikimedia.org}": x-modules: - options: action: apiUriTemplate: "{{'http://localhost:8080/w/api.php'}}" baseUriTemplate: "{{'http://{domain}:7231/{domain}/v1'}}" citoid: host: "http://localhost:1970" events: eventlogging_service: topic: resource_change uri: "http://localhost:8085/v1/events" graphoid: host: "http://localhost:11042" mathoid: cache-control: "s-maxage=864000, max-age=86400" host: "http://localhost:10042" mobileapps: host: "http://localhost:8888" pageviews: host: "https://wikimedia.org/api/rest_v1/metrics" parsoid: host: "http://localhost:8000" related: cache_control: "s-maxage=86400, max-age=86400" table: backend: sqlite dbname: /var/lib/restbase/mw-vagrant.sqlite3 path: projects/wikimedia.org.yaml title: "The RESTBase root" x-sub-request-filters: - name: http options: allow: - pattern: "/^https?:\x5c/\x5c//" type: default user_agent: RESTBase/MW-Vagrant wikimedia.org: x-modules: - options: action: apiUriTemplate: "{{'http://localhost:8080/w/api.php'}}" baseUriTemplate: "{{'http://{domain}:7231/{domain}/v1'}}" citoid: host: "http://localhost:1970" events: eventlogging_service: topic: resource_change uri: "http://localhost:8085/v1/events" graphoid: host: "http://localhost:11042" mathoid: cache-control: "s-maxage=864000, max-age=86400" host: "http://localhost:10042" mobileapps: host: "http://localhost:8888" pageviews: host: "https://wikimedia.org/api/rest_v1/metrics" parsoid: host: "http://localhost:8000" related: cache_control: "s-maxage=86400, max-age=86400" table: backend: sqlite dbname: /var/lib/restbase/mw-vagrant.sqlite3 path: projects/wikimedia.org.yaml entrypoint: module: hyperswitch name: restbase worker_heap_limit_mb: 150
logging: level: info name: parsoid streams: - path: /vagrant/logs/parsoid.log type: file metrics: type: log num_workers: 1 services: - conf: cors: "*" localsettings: /etc/parsoid.localsettings.vagrant.js mwapi_req: body: "{{ default(request.query, {}) }}" headers: host: "{{request.params.domain}}" user-agent: "{{user-agent}}" method: post uri: "http://{domain}/w/api.php" port: 8000 restbase_req: body: "{{request.body}}" headers: "{{request.headers}}" method: "{{request.method}}" query: "{{ default(request.query, {}) }}" uri: "http://localhost:7231/{{domain}}/v1/{+path}" user_agent: parsoid/MW-Vagrant entrypoint: apiServiceWorker module: lib/index.js name: parsoid worker_heap_limit_mb: 150
/** * Parsoid web service configuration file. * This file is managed by Puppet. */ exports.setup = function( parsoidConfig ) { parsoidConfig.setMwApi( { prefix: 'localhost', domain: 'dev.wiki.local.wmftest.net', uri: 'http://localhost:8080/w/api.php', } ); parsoidConfig.usePHPPreProcessor = true; parsoidConfig.useSelser = true; parsoidConfig.allowCORS = '*'; };
Using VisualEditor to edit the Main Page; from Chrome Dev Tools:
OPTIONS http://dev.wiki.local.wmftest.net:8080/api/rest_v1/transform/wikitext/to/html/Main_Page/9 404 Not Found {"type":"https://mediawiki.org/wiki/HyperSwitch/errors/not_found#route","title":"Not found.","method":"options","uri":"/dev.wiki.local.wmftest.net/v1/transform/wikitext/to/html/Main_Page/9"}
Accessing http://dev.wiki.local.wmftest.net:8080/api/rest_v1/ the RESTBase docs appear without issue.