Winston Li
25a988daa3
Add JavaDoc, minor refactor
2016-10-09 21:13:11 +01:00
Winston Li
d3eb737120
Ignore .gitignore files on git.overleaf.com repos ( fix #1281 )
2016-10-08 16:12:20 +01:00
Winston Li
fe058e8695
Use df equivalent as default for calculating used space
2016-09-19 10:01:07 +01:00
Winston Li
9a0f18e516
Increase postback timeout to 60s
2016-09-19 09:34:45 +01:00
Winston Li
e9ffcfe19e
Remove extra comma
2016-09-12 15:42:18 +01:00
Winston Li
9b78138314
Remove duplicate call to create the last_accessed index
2016-09-12 15:13:55 +01:00
Winston Li
a8c743cb9c
Schedule next swap job after previous job finishes
2016-09-12 15:11:56 +01:00
Winston Li
95a7cb2b8b
Add check for last_accessed column in case adding failed due to an error rather than because it already exists
2016-09-06 09:13:20 +01:00
Winston Li
ea803b53d8
Remove swap table and put last_accessed column in projects
2016-09-06 09:11:53 +01:00
Winston Li
eb77d166e2
Add checkDB to upgrade the DB
2016-09-06 09:11:32 +01:00
Winston Li
52e5d2921f
Sanitise s3 info and fix for s3
2016-09-06 09:11:32 +01:00
Winston Li
9936fbe3c9
Implement and test the swap job, and add integration test
2016-09-06 09:11:32 +01:00
Winston Li
dd5694104d
Delete the SnapshotRepositoryBuilder and WLBridgedProject abominations. Set accessed time after update and push.
2016-09-06 09:11:32 +01:00
Winston Li
c459cd57af
Implement and test SwapJobImpl
2016-09-06 09:11:32 +01:00
Winston Li
a595acd0a6
Add and test GetNumProjects
2016-09-06 09:11:32 +01:00
Winston Li
4b014826d3
Add and test InMemorySwapStore
2016-09-06 09:11:32 +01:00
Winston Li
f036ff2c8b
Add and test an SQL update for only setting a project's last_accessed if it's missing
2016-09-06 09:11:32 +01:00
Winston Li
9d19cdd261
Implement and test DBStore swap_table functionality
2016-09-06 09:11:32 +01:00
Winston Li
d2b628d904
Move stuff to bridge package
2016-09-06 09:11:32 +01:00
Winston Li
f3eb32e2ec
Catch more exceptions in db init
2016-09-06 09:11:32 +01:00
Winston Li
cfc02bbcc8
Remove DB fluff layer
2016-09-06 09:11:32 +01:00
Winston Li
c3609803c0
Change DBStore to target a file
2016-09-06 09:11:32 +01:00
Winston Li
25fea8ef58
Implement bz2 support and test
2016-09-06 09:11:32 +01:00
Winston Li
8c0937511e
Add implementations, implement S3SwapStore (with only tars), FSRepoStore, Tar and File utils, add tests
2016-09-06 09:11:32 +01:00
Winston Li
692b979098
Large refactor of parts into distinct components / interfaces
2016-09-05 15:45:57 +01:00
Winston Li
5b810b64ba
Decouple jgit's Repository class from the Bridge
2016-09-05 15:45:57 +01:00
Winston Li
598ea8a6fb
Ugrade jgit and jgit.http.server to 4.4.1.201607150455-r and fix tests
2016-08-20 13:22:07 +01:00
Winston Li
3389615ef6
Use better error message for problems building repo ( #1576 )
2016-08-20 12:15:34 +01:00
Marc Egea i Sala
d143baf489
Add more logging to commit action ( #16 )
2016-06-09 10:26:22 +01:00
Marc Egea i Sala
cb2e12d3b0
Merge pull request #15 from overleaf/handler-refactor
...
Put API handlers into their own namespace
2016-06-07 07:57:07 +01:00
John Lees-Miller
4fb9cbdf19
Restore a removed logging statement
2016-06-03 16:45:16 +01:00
John Lees-Miller
42d1236063
Check for missing project before checking key
2016-06-03 16:11:31 +01:00
John Lees-Miller
1ac07526dc
Reorganise postbacks and files under /api
2016-06-03 16:11:02 +01:00
Marc Egea i Sala
2a87513603
Merge pull request #14 from overleaf/performance-improvements
...
Build RepositoryObjectTreeWalker only once per commit
2016-06-03 15:46:32 +01:00
Marc Egea i Sala
f4d4ce0da1
Build RepositoryObjectTreeWalker only once per commit
2016-06-03 15:40:48 +01:00
John Lees-Miller
64b49904e4
Use logback so we can use two log streams
...
We want all logs on stdout, for debugging, and warnings and errors
on stderr, for remote monitoring. The SLF4J SimpleLogger can't seem
to do this, but logback does, and we can still use the same SLF4J
interface.
2016-06-03 11:47:25 +01:00
John Lees-Miller
1edaf5fe77
Upgrade to jetty 9.3.9
2016-06-02 11:57:04 +01:00
Winston Li
d582e3e1cf
Remove and replace Util.sout and .serr
2016-04-18 11:03:55 +01:00
Winston Li
a409a15f07
Fix #1384 , possibly #1174 too
2016-04-05 20:39:36 +01:00
Winston Li
08f3497a9e
Improve logging around main operations.
...
PostbackManager.java: check for actual postback promise before waiting.
2016-04-03 12:17:06 +01:00
Winston Li
ab09d044a8
Improve logging for catching #1174 , and fix tests.
2016-04-01 05:23:59 +01:00
Winston Li
a4df78c73d
Improve logging.
...
- Add sanitised Config and test
- Fix issue with file permissions
2016-03-31 06:35:09 +01:00
Winston Li
559b32a22f
Integrate slf4j simple logger and change some messages. Declare some exceptions in tests
2016-03-11 09:46:03 +00:00
Marc Egea i Sala
7048032463
Exception to handle files too big to be processed
2016-02-04 10:22:18 +00:00
Marc Egea i Sala
b3e140ed40
Provide custom message on 401 errors
2016-01-19 10:44:03 +00:00
Winston Li
850cbcf0c6
Merge bug fixes with oauth2 skipping
2016-01-04 04:34:26 +00:00
Winston Li
53d3033b5c
Implement auth skipping on non-protected projects
2016-01-04 04:14:50 +00:00
Marc Egea i Sala
dfb4835cc1
Merge pull request #6 from overleaf/version-update
...
Update local version after processing snapshots
2015-11-30 11:00:41 +00:00
John Lees-Miller
e2574ab163
fix whitespace
2015-11-24 12:06:05 +00:00
Marc Egea i Sala
937d9c82b4
Update local version after processing snapshots
2015-11-23 16:24:22 +00:00
Marc Egea i Sala
229ed1c09d
Try to download file if it's not in the git tree
2015-11-23 09:36:24 +00:00
Marc Egea i Sala
18bb534f96
Handle 401 errors as ptorected projects
2015-11-19 10:40:07 +00:00
Winston Li
1872eba223
Implementation of OAuth2
2015-10-25 13:44:38 +00:00
Winston Li
c3db415ce7
Implement config changes and tests
2015-10-25 11:19:02 +00:00
Marc Egea i Sala
6ae47e8821
Bugfix: using statusElement and not codeElement again
2015-10-02 15:22:55 +01:00
Marc Egea i Sala
3970fb146c
Handle response errors through Util.getCodeFromResponse
...
Centralizing the exceptions to provide more details on fail.
2015-09-30 10:45:58 +01:00
Marc Egea i Sala
8648f8bde7
Use WLUser to provide default name and email
2015-09-29 11:36:10 +01:00
Marc Egea i Sala
61a5c5870c
Support for anonymous saved versions
...
This fixes a case when de API sends a version without user. There was a
bug allowing to create anonymous versions in the application and we
have to support the old data.
The problem here is that SnapshotInfo classes are inflated from json
via Gson. This method does not call any constructor and, since the json
does not include the ‘user’ key, the bridge crashes because we’re not
expecting null users.
I’m not happy with this fix, but is the minimum solution that does not
affect anything else.
2015-09-25 16:15:37 +01:00
Marc Egea i Sala
78c92e62b6
Loggin API response in order to figure out the use case for errors
2015-09-24 12:33:51 +01:00
Winston Li
70c963c38f
Fix issue with pulling 2 new identical binary files with known name
2015-08-05 19:41:27 +01:00
Winston Li
4fbd6eaabe
Fix issue with cloning multiple identical files and add test
2015-08-04 21:14:13 +01:00
Winston Li
f2701568f6
Fix issue with pulling a file identical to an existing file
2015-08-04 20:06:06 +01:00
John Lees-Miller
3ac0b0c2de
avoid NPE if project directory does not exist; fixes #10
2015-04-26 21:00:28 -04:00
Winston Li
d697f75c77
pushFailsOnUnexpectedError integration test.
2015-03-10 12:14:10 +00:00
Winston Li
a0eb4b0946
pushFailsOnInvalidProject integration test.
2015-03-10 12:02:41 +00:00
Winston Li
c36a1de7c3
pushFailsOnInvalidFiles integration test.
2015-03-10 11:49:31 +00:00
Winston Li
9245037abf
pushFailsOnFirstStageOutOfDate integration test.
2015-03-09 23:56:16 +00:00
Winston Li
5a00c84359
Refactor with deletion and tests.
2015-03-09 22:41:55 +00:00
Winston Li
8993702f69
Initial large refactor.
2015-03-09 22:41:55 +00:00
Winston Li
79307923ad
Allow null directories in directory deletion methods.
2015-03-09 22:35:40 +00:00
Winston Li
83db4e6a10
Joda-Time for ISO6801 timestamps.
2015-03-09 21:38:53 +00:00
Winston Li
e7c1b29008
Change timestamp parsing to include milliseconds.
2015-03-09 21:29:03 +00:00
Winston Li
e6bdbe8f17
Fix the rest of the tests
2015-03-05 15:39:05 +00:00
Winston Li
3d53226853
Use shared instance of AsyncHttpClient and close Stream in ResourceFetcher.
2015-02-24 10:30:39 +00:00
Winston Li
77c4576b59
Fix SQL injection.
2015-02-23 11:00:34 +00:00
Winston Li
4561409450
Fix url index bug with renaming.
2015-02-22 10:56:47 +00:00
Winston Li
ad7c7a4ba5
Fix bug with Overleaf commits swapping name and email.
2015-02-22 10:41:21 +00:00
Winston Li
6e5163c186
Fix project atts directory deletion to delete base directory too.
2015-02-22 10:20:30 +00:00
Winston Li
ec0c70c622
Delete project atts directory after push.
2015-02-22 10:09:35 +00:00
Winston Li
59001735b1
Remove loading messages.
2015-02-22 02:59:50 +00:00
Winston Li
52f2190346
Fix ResourceFetcher log message.
2015-02-22 02:35:03 +00:00
Winston Li
b01ec908e1
Delete url indexes on successful push.
2015-02-22 02:35:03 +00:00
Winston Li
70d9c0e31d
Fix url index lookups for same commit and add log messages.
2015-02-22 02:35:03 +00:00
Winston Li
be806d293c
Delete un-needed files from mem builds.
2015-02-22 02:35:03 +00:00
Winston Li
0c0da41bb9
Fix equals bug in ServletFile diff.
2015-02-22 02:35:03 +00:00
Winston Li
4a396c2c17
Set latest seen version after non empty snapshot fetch.
2015-02-22 02:35:02 +00:00
Winston Li
680c7fabf7
Add stack trace prints and remove bugged git config.
2015-02-22 02:35:02 +00:00
Winston Li
a91390dd37
Add IF NOT EXISTS to index creation sql statement.
2015-02-22 02:35:02 +00:00
Winston Li
fee792f5ee
In-place diffs during push snapshot creation.
2015-02-22 02:35:02 +00:00
Winston Li
ec13e184b7
Implement no_mem git-uploads.
2015-02-22 02:35:02 +00:00
Winston Li
4110dcc2a9
Redesigned SQL interface.
2015-02-22 02:35:02 +00:00
Winston Li
30521b988b
Graceful kill with write lock and per project read locks.
2015-02-21 00:52:20 +00:00
Winston Li
ac50c26aef
( fix #8 ) Add better error message for 403 protected projects with integration test and support.
2015-02-20 12:42:04 +00:00
Winston Li
682a7e93ad
Added stack trace print.
2015-01-15 23:03:12 +00:00
Winston Li
70808b14b5
Added try-catch-finally block for remaining instances of lock releasing.
2015-01-15 23:00:32 +00:00
Winston Li
4eda2a81ba
Restored broken images and removed print statements.
2015-01-11 17:36:51 +00:00
Winston Li
e124a74c2f
Fixed bug with git not adding deleted files.
2015-01-11 17:23:49 +00:00
Winston Li
d4613864c0
Changed a string containing writelatex.
2015-01-11 16:24:42 +00:00
Winston Li
984969b155
Added canCloneMultipleRepositories integration test.
2015-01-11 15:21:11 +00:00
Winston Li
dd6c38dd5b
Changed the name of the directory from git to repo.
2015-01-11 12:38:17 +00:00