Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in cassandra driver v2 for testing #201

Merged
merged 16 commits into from
Mar 4, 2015

Conversation

gwicke
Copy link
Member

@gwicke gwicke commented Feb 28, 2015

Don't merge until we have tested this a bit on the test cluster.

@gwicke gwicke changed the title Cassandra driver v2 Pull in cassandra driver v2 for testing Feb 28, 2015
@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.63% when pulling f3edf50 on gwicke:cassandra_driver_v2 into aeab429 on wikimedia:master.

Lets pull in the git branch for testing of the v2 driver in this branch. Can
then release that & switch to the release after testing.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.63% when pulling 0fd2039 on gwicke:cassandra_driver_v2 into aeab429 on wikimedia:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.63% when pulling 0fd2039 on gwicke:cassandra_driver_v2 into aeab429 on wikimedia:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.63% when pulling 0fd2039 on gwicke:cassandra_driver_v2 into aeab429 on wikimedia:master.

@d00rman
Copy link
Contributor

d00rman commented Mar 1, 2015

Hm, I see a new cassandra_driver_v2 branch in this repo, but this PR does not use it al all. A typo? IMHO, it should be better/easier to test if these commits were made in wikimedia/restbase/cassandra_driver_v2 than gwicke/restbase/cassandra_driver_v2.

@gwicke
Copy link
Member Author

gwicke commented Mar 1, 2015

@d00rman, I had the same thought, but then realized that it actually matters more how we push this into the deploy repo. I already used this code for wiki creation testing yesterday, where the v2 driver proved reliable.

This is a left-over from past days.
Node 0.10 has a nextTick recursion limit of 500, which we hit when processing
800 domains without any async operations in between (perfect caching & sharing
of CFs). This patch adds a `.delay(0)` (which works out to a `setTimeout(0)`
to break the cycles.
This allows a more natural top-down style, where helpers are defined after the
main entry points.
.group actually looks like a TLD:
http://www.instra.com/en/domain-names/newgtld/group-domain-registration/group

.local on the other hand is dedicated to local use, so won't clash with glocal
domains.

Also fix up the cleandb script to clear the test domains.
Page title and revision listings don't currently work with domain
multiplexing. They are also low priority features, so it's okay to disable
these for now.
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling f9c0b3c on gwicke:cassandra_driver_v2 into * on wikimedia:master*.

The unconditional catch handler in parsoid.js triggered content generation on
*any* errors, not just 404s. This led to a large number of revisions to be
stored on some pages I was using for benchmarking.

It also covered up a bug in the handling of requests for 'latest' revisions.
The frontend code (and a test) was creating internal requests with 'latest' as
the revision, but the revision parsing code in key_rev_value did not consider
that a valid revision. Combined with the earlier bug this meant that each
request for an existing version was causing a new revision to be parsed &
saved.

This patch solves both problems by

- only generating content on 404, and re-raising any other errors, and

- dropping the `/latest` pseudo-revision in favor of a straight request for
  the title.
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 882f01a on gwicke:cassandra_driver_v2 into * on wikimedia:master*.

The unconditional catch handler in parsoid.js triggered content generation on
*any* errors, not just 404s. This led to a large number of revisions to be
stored on some pages I was using for benchmarking.

It also covered up a bug in the handling of requests for 'latest' revisions.
The frontend code (and a test) was creating internal requests with 'latest' as
the revision, but the revision parsing code in key_rev_value did not consider
that a valid revision. Combined with the earlier bug this meant that each
request for an existing version was causing a new revision to be parsed &
saved.

This patch solves both problems by

- only generating content on 404, and re-raising any other errors, and

- dropping the `/latest` pseudo-revision in favor of a straight request for
  the title.
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.16%) to 86.46% when pulling b6ed3d4 on gwicke:cassandra_driver_v2 into c730797 on wikimedia:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.16%) to 86.46% when pulling 32382f8 on gwicke:cassandra_driver_v2 into c730797 on wikimedia:master.

The previous commit to remove the 'latest' request was not complete. We
evidently don't have good tests for the timple /page/html/{title} case.

TODO: Properly test that area.
Sub-requests that don't directly throw errors (primarily cassandra at this
point) don't get very good error reporting right now, as much of the
information is lost while being wrapped into an HTTPError. This patch improves
this slightly by preserving more information.
This reverts commit 0dc4cf8.

Several unrelated WIP changes had snuck into that commit, so undo them here.

Conflicts:
	lib/restbase.js
gwicke added a commit that referenced this pull request Mar 4, 2015
Pull in cassandra driver v2 for testing
@gwicke gwicke merged commit 522e014 into wikimedia:master Mar 4, 2015
@gwicke
Copy link
Member Author

gwicke commented Mar 4, 2015

Merging without waiting for travis after triple-checking the tests locally. Travis seems to be down right now.

@gwicke gwicke deleted the cassandra_driver_v2 branch March 4, 2015 22:23
@gwicke
Copy link
Member Author

gwicke commented Mar 4, 2015

The travis run was actually fine, only the reporting failed apparently: https://travis-ci.org/wikimedia/restbase/builds/53063025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants