Commit graph

173 commits

Author SHA1 Message Date
Henry Oswald
c0e23df82b break getDoc into multiple helpers, stop passing filters though from other calls 2017-03-15 22:09:56 +00:00
Henry Oswald
c2b96c7e1e Merge pull request #17 from sharelatex/ho-always-check-s3
Always get inS3 when getting doc
2017-03-10 10:36:59 +00:00
Henry Oswald
f067c039fe always search for inS3 when getting a doc 2017-03-09 18:51:54 +00:00
Henry Oswald
d6146b2970 got failing acceptence test 2017-03-09 18:18:50 +00:00
Henry Oswald
dbfe5ac712 error if doc lines are not array when unarchiving 2017-03-09 17:34:33 +00:00
Shane Kilkelly
d09a4cb275 Lengthen sleep for acceptance tests 2017-03-06 15:11:04 +00:00
Shane Kilkelly
929ffbd83a Don't npm rebuild inside container 2017-02-20 10:07:30 +00:00
James Allen
fb39bb0442 Validate that ranges are present in a set document request 2017-01-19 12:15:14 +01:00
James Allen
5e730b33b2 Support new comment op format 2016-12-16 16:44:08 +00:00
James Allen
0174495f75 Add an end point to get all the ranges in a project 2016-12-09 14:37:24 +00:00
James Allen
6fa8b89154 Be explicit about the data we return from mongo 2016-12-05 17:27:31 +00:00
James Allen
a6ec672d84 Merge branch 'ja-delete-refactor' into ja-track-changes
Conflicts:
	test/acceptance/coffee/ArchiveDocsTests.coffee
2016-12-05 16:58:29 +00:00
James Allen
3d195de3e9 Improve testing of archiving and be explicit about include_deleted parameter 2016-12-05 16:48:01 +00:00
James Allen
7717625534 Include deleted docs when archiving 2016-12-05 16:31:51 +00:00
James Allen
2985cb587a Add tests for RangeManager 2016-12-05 15:38:38 +00:00
James Allen
b8a97731e4 Merge branch 'master' into ja-track-changes
Conflicts:
	test/acceptance/coffee/GettingAllDocsTests.coffee
2016-12-05 14:58:57 +00:00
James Allen
bd5086c054 Don't return deleted docs with all project docs 2016-12-05 14:37:44 +00:00
James Allen
0a65a5eabf Set and get ranges along with lines 2016-12-05 14:21:49 +00:00
James Allen
ca96d168dd Make attributes that can be set in mongo flexible 2016-12-02 15:22:08 +00:00
James Allen
144bae3a55 Add an error guard around the version being present 2016-12-02 15:17:38 +00:00
James Allen
ab527c3c5d remove code left over from migration 2016-12-02 15:02:54 +00:00
James Allen
8b95a04a36 Don't look up version in mongo if not needed 2016-11-30 15:08:56 +00:00
James Allen
7ede096903 Merge branch 'master' into ja-set-version-in-docstore 2016-11-29 17:24:53 +00:00
James Allen
50f2983912 Log out version when updating doc 2016-11-29 16:49:35 +00:00
James Allen
10008fa9c4 Don't add colours in automated test script 2016-11-29 14:41:12 +00:00
James Allen
7204c08fb2 Rebuild npm modules as part of acceptance test docker run 2016-11-29 14:29:51 +00:00
James Allen
f7ba554658 set up acceptance tests to run via docker 2016-11-28 16:51:43 +00:00
James Allen
eb9a3b314a Set/get version in docOps via docstore HTTP API 2016-11-28 14:55:16 +00:00
Brian Gough
7a28fb58e7 clean up mongo query 2016-09-05 11:14:41 +01:00
Henry Oswald
9cfa4b3f84 Don't put docs which are already in s3 through archive job
This fixes the bug we saw with 'RangeError: Maximum call stack size exceeded'
if lots of docs are already in s3 cb() gets called synchronously multiple times quickly
which can cause the execption. I am not sure where the recursion is, maybe inside async.

doing setImmediate(cb) also fixes the issue as I beilve it gives the
process chance to clear the stack. Similar to process.nextTick
2015-09-07 14:11:02 +01:00
Henry Oswald
ae75b855b4 added failing test for trying to archive load of docs which are already
in s3
2015-09-07 14:06:20 +01:00
Henry Oswald
aaa2a099f1 change acceptance test to use big naught list of strings 2015-09-01 16:51:10 +01:00
Henry Oswald
192b0af15a added utf-8 char which fails the archive option 2015-09-01 15:47:16 +01:00
Henry Oswald
5dd33ea313 changed back to standard /archive /unarchive 2015-08-18 14:10:53 +01:00
Henry Oswald
5765b59e0c added /deactivate and /reactivate endpoints as web will call those
also fixed acceptence test
2015-08-18 13:31:26 +01:00
Henry Oswald
cf07e2fec5 improve archve doc acceptence tests 2015-08-13 22:48:17 +01:00
Henry Oswald
ef4e437c3f improve doc manager so it calls get doc recursivly 2015-08-13 22:47:33 +01:00
Henry Oswald
ddf4692f0d added acceptance test for large doc ~1mb 2015-08-13 13:59:40 +01:00
Henry Oswald
859e8a0e57 - deal with calling archive twice on same project
- clean up unit tests
- change s3 keys
- use err not error
2015-08-13 13:00:09 +01:00
Henrique Dias
42f2afc4dd remove unarchived docs from s3 2015-06-03 20:05:15 -03:00
Henrique Dias
9a68bfb393 fix unit tests 2015-06-03 12:00:08 -03:00
Henrique Dias
5ba14522da handling error 2015-06-02 20:08:50 -03:00
Henrique Dias
a26320013d more acceptance tests 2015-06-02 19:24:45 -03:00
Henrique Dias
0cd2120430 more unit tests for archive feature 2015-06-02 18:13:16 -03:00
Henrique Dias
6add9a0da7 init unit tests 2015-06-02 17:12:11 -03:00
Henrique Dias
5c31e80062 more refactoring 2015-06-02 16:29:32 -03:00
Henrique Dias
7c7ff64904 retrieving all docs from s3 2015-06-01 19:36:26 -03:00
Henrique Dias
7f5204f0f7 initial version for archive docs in S3 2015-06-01 18:24:40 -03:00
Henry Oswald
d59fb0d590 Merge branch 'master' into doc-collection-only
Conflicts:
	app/coffee/DocManager.coffee
2015-02-27 14:58:38 +00:00
Henry Oswald
53480153e3 if the doc has no lines then it is new and needs to be written 2015-02-27 14:50:08 +00:00
Henry Oswald
32829f0e6e remove old rev, not needed any more 2015-02-27 14:06:06 +00:00
Henry Oswald
a73dc90b00 change mongomangers upsert to use an inc
this is tested and does work with new documents
2015-02-26 16:01:10 +00:00
Henry Oswald
7242119532 simplified DocManager.updateDoc so it calls mongomanager.findDoc
makes the logic for dealing new documents that are not in mongo yet
much simpler
2015-02-26 16:00:28 +00:00
Henry Oswald
5861231548 docstore now only touches doc collection
- need to run migration 1 before using this for this to work
- added acceptence test so new documents updated should be upserted, not return 404
2015-02-26 14:54:08 +00:00
Henry Oswald
daf7c4f68e log out when a doc from the project collection is used 2015-02-22 18:45:21 +00:00
Henry Oswald
a0832c79e6 return 404 if doc is deleted and include_deleted is not set to true 2015-02-03 14:05:08 +00:00
Henry Oswald
7fe25fe28f improved docstore acceptence tests to deal with changing docs on get all docs 2015-01-27 17:05:07 +00:00
Henry Oswald
5d2c09bf75 read docs from doc collection first
- removes include deleted flag as it is irrelivant now
2015-01-22 15:05:48 +00:00
Henry Oswald
704bf53fe5 Write docs to do collection and project collection
- docs are written to project collection then doc collection

- deletes used to insert into doc collection, now its the same upsert
with deleted = true

- does not set delted = false for new docs as it is not needed, save space

- changed delete to be seperate update on mongo
2015-01-21 11:52:39 +00:00
James Allen
6d24c69e96 Don't return deleted docs by default, make it a flag 2014-06-06 12:37:42 +01:00
James Allen
4818ae8131 Use flag to only get deleted doc when appropriate 2014-06-05 14:10:44 +01:00
James Allen
7870b4fb55 Return deleted docs 2014-06-05 13:29:50 +01:00
Henry Oswald
973d9b8643 added raw endpoint to docstore 2014-05-20 13:04:33 +01:00
James Allen
7cca4f0368 Don't store and send version data 2014-05-16 13:06:35 +01:00
James Allen
79457227e1 Support up to 2mb requests 2014-05-13 12:54:58 +01:00
James Allen
0dda75c2d5 Pass through version and revision information 2014-05-08 15:43:08 +01:00
James Allen
0adcf3c140 Log out errors when null docs are encountered 2014-05-07 16:38:10 +01:00
James Allen
fa049ff4eb Add endpoint for getting all docs 2014-04-30 13:06:12 +01:00
James Allen
984999ec61 Add in HTTP end point for deleting docs 2014-04-29 16:36:10 +01:00
James Allen
885d5de191 Add in DocManager.deleteDoc method 2014-04-29 15:07:22 +01:00
James Allen
2e8582874f Add POST end point for updating doc lines 2014-04-29 11:49:09 +01:00
James Allen
94b25055fc Add in DocManager.updateDoc method 2014-04-28 17:43:19 +01:00
James Allen
6eb328e788 Create a GET endpoint for getting doc lines 2014-04-28 16:45:59 +01:00