Properly set snippet and subject/subjectdate on threads.
Fail more informatively if the inbox package isn't installed.
retry_with_logging(), retry_and_report_killed() take optional retry_classes + fail_classes arguments;
it doesn't make sense for retry() to do so otherwise.

Summary: As above.

Test Plan: Test added in tests/general/test_logging.py

Reviewers: emfree

Differential Revision: https://review.inboxapp.com/D225
Support for inbox.util.eas in the /inbox-eas repo; this is where EAS-specific util code would live.

Summary: As above.

Test Plan: Sync runs as before.

Reviewers: spang

Differential Revision: https://review.inboxapp.com/D226
Fixes T120: resume 'killed' syncs on restart. Also consolidates account sync_state updates.

Summary: As above.

Test Plan: Killed, stopped syncs + restarted server.

Reviewers: emfree

Differential Revision: https://review.inboxapp.com/D227
Log auth errors.
arc land onto branch 'dev' by default.

Note that you can also do `arc land --onto <branch>`.
Actually configure arcanist correctly.
Use a gevent pool for actions syncback instead of Redis-plus-workers.

Summary:
This is much simpler, and we were probably going to change this eventually
anyways. The immediate reason for doing it right now is that the rq module
reconfigures the root logger, which is really annoying when you are trying to
actually configure it yourself.

Also, start the SyncbackService as a simple greenlet instead of a ZeroRPC
service (which it isn't really).

Test Plan: Unit tests updated, end-to-end syncback behavior manually verified.

Reviewers: spang

Reviewed By: spang

Differential Revision: https://review.inboxapp.com/D229
Fix default limit for API resource requests.
[inbox/vault] Move refresh token storage to a local vault.

Summary: Moves the storage of refresh_tokens to use the prototype vault API.

Test Plan: Run regression

Reviewers: emfree

Reviewed By: emfree

Maniphest Tasks: T117

Differential Revision: https://review.inboxapp.com/D228
Fix default limit for API resource requests.
Deduplicate a thread's participants by email address.
Detect misconfigured Gmail accounts.

Summary:
We require the 'all mail' folder to be enabled via Gmail IMAP. This
commit hard-aborts syncs for accounts that are misconfigured, and
directs the user to fix their account settings.

Test Plan: runtests, manual testing with setting disabled

Reviewers: kav-ya

Reviewed By: kav-ya

Differential Revision: https://review.inboxapp.com/D230
Use a less aggressive participant deduplication strategy.

Fixes T123.
Make bin/clear-db also keep 'secret' table if --with-users isn't specified.

Needed now that auth credentials are stored in that table.
Always use ignore_soft_deletes=False in sync backends.

We do this because otherwise the sync logic becomes horrendously complex.
There were just a couple spots where we'd made this mistake.
* Update _process_log() for drafts.

* Test drafts reconciliation without a sync.
We now do this via two tests:
test_drafts_syncback.test_remote_save_draft() and test_reconcile_message.py,
which each test a separate chunk of that logic.
Always use ignore_soft_deletes=False in sync backends.

We do this because otherwise the sync logic becomes horrendously complex.
There were just a couple spots where we'd made this mistake.
Detect misconfigured Gmail accounts.

Summary:
We require the 'all mail' folder to be enabled via Gmail IMAP. This
commit hard-aborts syncs for accounts that are misconfigured, and
directs the user to fix their account settings.

Test Plan: runtests, manual testing with setting disabled

Reviewers: kav-ya

Reviewed By: kav-ya

Differential Revision: https://review.inboxapp.com/D230