The old bucket was versioned and didn't allow deletes. This was
great for paranoia, but not so great for being able to delete old
backups.
(imported from commit be79b5c582ca5ee466cdfea6d3093b6d5ba0e23d)
I hadn't changed it previously out of paranoia in the case we had a
faulty failover and had two masters both uploading to the same place.
However, I now don't think this can happen, as recovery completion
will cause Postgres to start a new timeline.
(imported from commit d58f1aa306eff4f6fd950664ff658539c1249bdf)
Some browsers don't support desktop notifications. Some people haven't allowed permissions
for humbug to have desktop notifications. This is a poor man's attempt at desktop notifications.
We are adding the bootstrap-notify package (http://nijikokun.github.io/bootstrap-notify/)
Resolves Trac #1336.
(imported from commit 6a54f7d1875e765dabd32d94ada8ebe4474a3d71)
We haven't been using this for months and not removing it before was
just an oversight.
(imported from commit d95c1911765a04a0c8713cc6c0dd346c123c97a3)
I noticed in our server logs that some users were sending
update_onboarding_steps requests to the server every time they sent a
message -- because they hadn't finished the onboarding process.
(imported from commit 8e1751a3344149f386022d96e7893e687d6631e8)
This reverts commit fec64815c879f9704847795cc163e2b517b4190d.
We've decided this experiment didn't work out.
(imported from commit 04f38e15c8ef19fbaa022a06bbcca3b0c67ec5ad)
This reverts commit 74fb298c711e61ae98c210d0ed11c875ce6ba591.
We've decided this experiment didn't work out.
(imported from commit 8acd3a030b692f9397155a20a9f89e63ed6a6cf7)
We had a few bugs where we were using a raw Django database query to
get a UserProfile object. This might seem OK, but going through
memcached is more efficient, and also guarantees that we get back the
.select_related() version of the object, so that if we later access
related fields like user_profile.realm.domain, we don't end up doing a
second database query as well.
Fixing these should in practice save a substantial number of database
queries on handling update_status_list requests, which happen very
often and access user_profile.realm.domain.
(imported from commit 0a2027da1b5bbc7a4f6c6927aca498530d7a4977)
Instead of calling test(result), we emulate the behavior of
calling SimpleTestCase.__call__, minus the results protocol.
(imported from commit e12e3d5caa8726c050a2a7cfa583ca4d571d6cbb)
There were a few things the W3C validator complained about that I
didn't bother fixing (like img tags without alt attributes and
obsolete tags). There also a few pages that were slightly more
annoying to get my local instance to render (like the 404 and 500
error pages), so I checked those by eye.
This does not cover the actual app at all.
(imported from commit 1cbe1ec11067e96718814ec23eaf5a8b4b68ef19)
Displaying the badge gets us a bunch of free mixpanel data points/month.
We only display the badge on the login page (which `/` redirects to)
and not on other portico pages.
(imported from commit 75871173a10ae888fdb7c92fe8e20586ce60c6bf)
The refactoring to use the cache_get() method incorrectly didn't
remove the addition of KEY_PREFIX inside cache_with_key. The result
was that the KEY_PREFIX was being added twice, once by cache_with_key
and again inside cache_get.
This had the impact of causing pointer saves to not take effect,
because our attempts to update the memcached cache when we save the
UserProfile object were using the correct cache key, but the actual
code reading values out of the caceh wasn't.
(imported from commit dcea000833f00622bdc0249488de3b186a7417b2)
The test_emoji test makes sure that we build the correct image
tag for all of our emojis. It's the same underlying algorithm
for all 800+ images, so we now test it in O(1) times instead
of O(N) time. Randomly sampling the emojis makes the tests
slightly non-determinisitic in a theoretical sense, but not in
a practical sense.
(imported from commit c78b50072953f2c081fca0272b9ecf762a4802db)
(We don't need the fixtures code once we override Django's
run_suite() method not to clobber our test database, since
all our tests use the same data anyway, and since Django
runs all the tests in a transaction and rolls back their
changes.)
(imported from commit d9daf09be3967de2de30934173b882d3d6b9ea27)
In tools/test-backend, we build the test database before calling
"manage.py test, so there is no reason for Django to wipe it
clean.
(imported from commit 7b09e9cc1a9259900ec1cc4f9ebbcacab1efb265)
(We now have a full replacement for TestResult, but we don't
support the full API of TestResult. If folks were to add new
tests that caused TestCase to call our class with an unsupported
method, this diff will provide hopefully a more clear error
message.)
(imported from commit 92033b12a1a901bd649ecb03e08779aa76bfef7a)
We use a simplified version of run_suite in our subclass of
DjangoTestSuiteRunner so that we can have more control over failing
fast and indicating progress. This change also speeds up the tests
by taking roughly 200 lines unittest/Django code out of the picture.
(We basically reinvent a simpler TextTestRunner and TextTestResult.)
(imported from commit 5216b6b582b071bd7c9e923c9886c3bc61faf581)
(This commit will probably be squashed, but it makes the subsequent
diffs more clear with respect to how we remove functionality from
run_tests.)
(imported from commit 9d0edcd5282a0f90ebd38e0ac229ef874dc00504)
Otherwise code paths that use those keys, like get_old_messages, will
incorrectly use the prefix-included keys.
This bug in our KEY_PREFIX system results in our memcached caching for
get_old_messages always missing.
(imported from commit 506c13e06d6f266596ead0b381c324c256e576c3)