Commit Graph

708 Commits

Author SHA1 Message Date
Ersun Warncke b1262ff06e pass client ip as url param 2019-11-19 12:08:35 -04:00
Ersun Warncke 5188e7c06a add file limit error 2019-11-12 11:16:54 -04:00
Shane Kilkelly ffcb382f0c Update test to match new setup/teardown pattern 2019-08-02 13:34:43 +01:00
Shane Kilkelly ac4f4082c8 Use 404 code when rejecting invalid project id 2019-08-02 13:31:27 +01:00
Shane Kilkelly 76b349591c Refactor to use new helper to send error response 2019-08-02 13:31:27 +01:00
Shane Kilkelly b0ab2e07c5 Reject requests when the project uri begins with '/project' 2019-08-02 13:31:27 +01:00
Shane Kilkelly abf525f43a Update test to match new setup/teardown pattern 2019-08-01 16:34:49 +01:00
Shane Kilkelly 3fac2cc825 Merge pull request #59 from das7pad/tests/cleanup-resources
[tests] cleanup resources
2019-08-01 16:26:51 +01:00
Shane Kilkelly 88adce3a02 Use UUID in file url, not (encoded) file path.
This fixes a bunch of issues where funny characters in the file path
(spaces, unicode, etc) would cause the file server in this process to
respond with a 404 when asked for the file. The 404 would then cause
the push to fail.

Now we just use a UUID as an opaque and unambiguous identifier for each file.
2019-07-05 11:07:47 +01:00
Shane Kilkelly 11e42ecb6f Point local config to v2 2019-07-03 09:37:11 +01:00
Shane Kilkelly a68afc2e28 Merge pull request #67 from overleaf/sk-dont-catch-throwable-swap-impl
Don't catch `Throwable` in swap-job, catch Exception
2019-06-13 12:11:01 +01:00
Shane Kilkelly 591617f996 Merge pull request #68 from overleaf/sk-fix-unicode-file-paths
Encode file path when building url, allows unicode
2019-06-13 12:10:55 +01:00
Shane Kilkelly 71df1b0a31 Encode file path when building url, allows unicode 2019-06-07 14:17:33 +01:00
Shane Kilkelly 28865e2956 Don't catch Throwable in swap-job, catch Exception 2019-06-07 10:26:55 +01:00
Shane Kilkelly 552e0955da Tell user to remove .git folder 2019-05-29 11:05:53 +01:00
Shane Kilkelly 545a9240d3 Merge pull request #61 from overleaf/spd-colon-passwords
GitBridge: Allow colons in passwords
2019-05-29 10:33:38 +01:00
Shane Kilkelly b1d7a0cf63 Merge pull request #65 from overleaf/sk-handle-409-has-dot-git
Handle a 409 response with code=projectHasDotGit
2019-05-29 10:33:22 +01:00
Shane Kilkelly b6fc48645a Merge pull request #64 from overleaf/sk-skip-failing-projects-in-swap-job
Skip failing projects in swap job, and give up after a certain number
2019-05-29 10:33:06 +01:00
Shane Kilkelly 719f0c3661 Give up on projects that cannot be swapped, rather than spinning the loop forever 2019-05-29 10:20:37 +01:00
Shane Kilkelly 2492c95c0b Handle a 409 response with code=projectHasDotGit 2019-05-29 10:18:49 +01:00
Shane Kilkelly f237efa6d5 Log and trap/ignore gc errors during swap 2019-05-23 11:14:02 +01:00
Shane Kilkelly c7d8c1c6b5 Run GC on a project at start of swap job.
When there is an exception during swap, add project name to log
2019-05-16 11:42:13 +01:00
Simon Detheridge d51f2fecfc Allow colons in passwords
bug: overleaf/issues#1393
2019-05-16 10:03:27 +01:00
Jakob Ackermann f547b6d494 Revert "Add git, make, and curl to docker image"
This reverts commit 02a2c9cd429b26ff44fabb97d3649e791b9edea4

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-05-05 18:34:01 +02:00
Jakob Ackermann 5907172463 Merge remote-tracking branch 'upstream/master' into misc/docker-build
# Conflicts:
#	Dockerfile
2019-05-05 18:32:35 +02:00
Jakob Ackermann 35ac848f43 [docker] install git in the app image
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-04-26 23:59:59 +02:00
Jakob Ackermann a333aabfa9 [WLGitBridgeIntegrationTest] adjust the urls for the individual tests
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-04-26 23:56:54 +02:00
Jakob Ackermann 5040b4d7f0 [WLGitBridgeIntegrationTest] ensure that we stop the started servers
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-04-26 23:56:47 +02:00
Shane Kilkelly c3308e565b Add git, make, and curl to docker image 2019-04-26 15:29:44 +01:00
Jakob Ackermann a517c15053 [docker] include the LICENSE file in the image
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-04-17 23:10:08 +02:00
Jakob Ackermann 2ebae69044 [docker] build the git-bridge in docker
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-04-17 13:45:21 +02:00
Jakob Ackermann 85a8e377fc [docker] use a base image that already contains maven and openjdk
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-04-17 11:21:41 +02:00
Shane Kilkelly 8f72cb89c8 Reject v1 ids earlier in the pipeline 2019-03-08 11:45:31 +00:00
Shane Kilkelly 788fad5ce7 Remove a deprecated method, no longer compatible with JGit 5.2 2019-03-06 11:43:27 +00:00
Shane Kilkelly 600aa8d9cf Do mvn clean before build.
We've had build issues be hidden by caching. So we should build from
clean each time, in immitation of the prod build process.
2019-03-06 11:41:59 +00:00
Shane Kilkelly c1e7969342 Revert "Revert "Upgrade JGit dependency to 5.2.1""
This reverts commit 42b5a32670e43b307ec2b0a34380e373b16be1fe.
2019-03-06 10:59:40 +00:00
Shane Kilkelly 0943248334 Revert "Upgrade JGit dependency to 5.2.1"
This reverts commit c0d9fb961396aa285e7ebf563b707c9fb299776c.
2019-03-06 10:31:07 +00:00
Shane Kilkelly 6d9e8d38e9 Merge pull request #53 from overleaf/sk-refuse-v1-ids
Refuse to process project-ids that look like they come from v1
2019-03-06 10:17:17 +00:00
Shane Kilkelly a517035e2c Refuse to process project-ids that look like they come from v1 2019-03-06 10:16:55 +00:00
Shane Kilkelly 845397639e Upgrade JGit dependency to 5.2.1 2019-03-04 10:15:34 +00:00
Shane Kilkelly 0f130096a2 Increase postback timeout to six minutes, to help users posting large payloads 2019-01-15 10:52:30 +00:00
Shane Kilkelly 4dc140aced Add integration test to cover imported-but-not-changed projects 2019-01-10 10:21:31 +00:00
Shane Kilkelly 4f1168a590 Add comments pointing to github issue 2019-01-09 14:24:04 +00:00
Shane Kilkelly b8d252244c Tolerate case where there is no latest version timestamp in version info 2019-01-09 12:23:26 +00:00
Shane Kilkelly ba8ba001d6 Fetch snapshots in edge-case where version-id is zero 2019-01-09 12:23:00 +00:00
Shane Kilkelly 779778fdb1 Use newUrl if supplied when v1 is deprecated 2019-01-08 09:47:01 +00:00
Shane Kilkelly 0d0c5458dd Handle when v1 is deprecated, print a message instead of an error 2019-01-07 11:54:44 +00:00
Shane Kilkelly 40add6985f Remove override of connect timeout 2018-12-17 09:39:19 +00:00
Shane Kilkelly 2195af88dd Set timeouts on Post requests too 2018-12-14 16:34:48 +00:00
Shane Kilkelly 46904bfe73 Set timeouts on http requests to 3 minutes, up from the default of 20 seconds. 2018-12-14 16:13:58 +00:00