Commit graph

17 commits

Author SHA1 Message Date
Evan Morikawa
1d254a7aaa [*] Add basic babel toolchain
Summary:
Adds babel to K2
Creates a simple build script so it'll run on prod.

Test Plan: manual

Reviewers: jackie, halla, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3527
2016-12-16 13:08:21 -05:00
Juan Tejada
b79488ae43 [local-sync, cloud-api, cloud-workers] Fix msg id collision, tracking and sending issues, some refactoring
Summary:
This diff solves a few separate issues from T7313, T7316, T7282, and it refactors
the send code a little bit.

Initially, the problem that led to this diff was generating message ids that
wouldn't collide (which was causing errors in the message-processor). Collisions
in ids were being caused by messages that contained the exact same participants,
subject and date (most likely due bots or scripts sending emails in quick
succession)

To prevent collisions this commit adds the `message-id` header as part of the
database message id, and ensures that we set it correctly before sending, and
that it remains consistent through send, multi-send, and the sync loop.

During the refactor and review, I removed some code that assumed that we were
syncing drafts (which we aren't), and also fixes a few other known and
unknown issues around sending, message creation, and tracking, like assigning
the correct date header (we were previously assigning the draft creation date
from within N1), fixing the tracking regex, among other smaller bugs/typos.

Will address inline TODOs in a separate diff

Test Plan: TODO!!! I will add tests in another diff

Reviewers: evan, halla, jackie, khamidou

Reviewed By: halla, jackie

Differential Revision: https://phab.nylas.com/D3507
2016-12-14 19:35:48 -08:00
Karim Hamidou
28f792558d trying to work around eb cli bugs. 2016-12-14 17:22:12 -08:00
Karim Hamidou
04b1763965 [fix] Fix transaction creation for contacts
Summary:
Fixes T7283. We weren't creating deltas for contacts because we were inserting contacts using `UPSERT`, which requires us to add another sequelize hook.  Unfortunately, support for this hook is only available on sequelize 4.x.

I didn't want to upgrade our sequelize version right now and cause of bunch of mysterious failures, so I've simply changed the `UPSERT` to be either an `INSERT`or `UPDATE`. We didn't really need it anyway.

Test Plan: Checked that N1 was receiving contact deltas.

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T7283

Differential Revision: https://phab.nylas.com/D3481
2016-12-05 15:37:17 -08:00
Ben Gotow
30c8bedd7a [local-sync] fix(specs): run npm test in local-sync dir 2016-12-05 12:16:53 -08:00
Evan Morikawa
40791028d5 [cloud-api] Update cloud-api readme & remove unused files
[cloud-api] move Dockerfile and pm2 files into cloud-api

[*] additions to .gitignore

[cloud-workers]: move pm2 file into cloud-workers

updates to readme

Revert "[cloud-workers]: move pm2 file into cloud-workers"

This reverts commit 952292124b6e8dfa304c5fbd945c0b00f427e154.

Revert "[cloud-api] move Dockerfile and pm2 files into cloud-api"

This reverts commit aa92f691bf991848a51c00a2d01a5848f20a35a2.

Update deploy readme
2016-12-02 13:28:05 -05:00
Karim Hamidou
0c5dd6ded7 Flesh out skeleton. 2016-11-22 12:25:27 -08:00
Evan Morikawa
84815ce2fa Add file watching to restart server 2016-07-11 12:00:20 -07:00
Evan Morikawa
3068fbbf20 Upgrade lerna 2016-07-06 13:51:17 -07:00
Evan Morikawa
ed2e184728 Add Elastic Beanstalk to gitignore 2016-07-05 13:21:27 -07:00
Ben Gotow
94cd088dd7 Commit .env to fix dev environment 2016-06-27 13:29:13 -07:00
Evan Morikawa
54599a21c0 Ignore storage folder 2016-06-22 12:19:17 -07:00
Evan Morikawa
135f16f8d6 Add initial observable based delta stream endpoint 2016-06-22 12:16:41 -07:00
Evan Morikawa
e75d0ea16b Add procfile.dev with external redis launcher 2016-06-21 17:45:25 -07:00
Evan Morikawa
7602620742 Add Procfile and heroku readiness 2016-06-21 17:11:31 -07:00
Ben Gotow
de8e09d6b5 Unify operations, fix a few bugs, logging issues 2016-06-20 14:44:07 -07:00
Ben Gotow
25270c0b75 Initial commit 2016-06-19 03:02:32 -07:00