• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

d00rman / restbase / 1047 / 6
84%
master: 84%

Build:
Build:
LAST BUILD BRANCH: parsoidproxy/mirror-html2html
DEFAULT BRANCH: master
Ran 13 Oct 2019 12:24PM UTC
Files 35
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Oct 2019 12:17PM UTC coverage: 83.644% (-0.06%) from 83.7%
CASSANDRA_VERSION=3.11.4 TEST_TARGET=sqlite TEST_MODE=fefs

push

travis-ci

d00rman
Parsoid: Add the variant proxy

The proxy allows directing requests to either variant. It loads both
variants' modules internally and uses their operations to complete
requests. It is designed in such a way so as to allow an easy transition
between fully using JS to fully using PHP with no config changes. When
first introduced, its defaults emulate the JS-only scenario. Once the
switch is fully achieved, then simply changing `sys/parsoid.js` for
`sys/parsoid-php.js` in `projects/sys/default.wmf.yaml` with no config
change results in having a fully-functional Parsoid/PHP module. The
proxy can. thus, function properly with only one of variant modules
loaded and configured.

In order to support the transition period, the proxy has three modes of
operation: single, mirror and split. In single mode, only one variant is
used, defined by the `default_variant` configuration value, defaulting
to `js`. This allows us to start using the proxy with no config changes.
In the final stages of the transition (before we remove the proxy), it
can be changed to `php` to only use the PHP variant. The mirror mode is
used to asynchronously mirror traffic to the PHP variant. Requests are
issued to both variants, but only the JS one is returned. The amount of
traffic to be mirrored can be tuned with the `percentage` configuration
parameter. The imporant caveat here is that only requests for
`/page/{format}` end points are mirrored - we cannot do so reliably for
transforms since they rely on stashed content, which is likely not to be
available for the PHP variant. Furthermore, when the proxy is configured
in mirror mode, dependency update events are emitted only for the JS
variant, so as to avoid duplicates. Finally, the split mode is used to
split the traffic between the two variants based on the request domain.
If one of the patterns given in the `pattern` configuration parameter is
matched, then the variant not defined in `default_variant` is used,
otherwise the default on... (continued)

794 of 1115 branches covered (71.21%)

1483 of 1773 relevant lines covered (83.64%)

121.94 hits per line

Source Files on job 1047.6 (CASSANDRA_VERSION=3.11.4 TEST_TARGET=sqlite TEST_MODE=fefs)
  • Tree
  • List 0
  • Changed 3
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 941
  • Travis Job 1047.6
  • a30948dc on github
  • Prev Job for CASSANDRA_VERSION=3.11.4 TEST_TARGET=sqlite TEST_MODE=fefs on parsoid/php (#1043.5)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc