Commit graph

453 commits

Author SHA1 Message Date
Jakob Ackermann
159eff2097 Merge pull request #5700 from overleaf/jpa-re-generate-build-scripts
[misc] set mongo version in build_script templates and re-generate files

GitOrigin-RevId: 3338084025374f451b1208109407c688ddb68f0a
2021-11-08 09:03:20 +00:00
Jakob Ackermann
638fbd5510 Merge pull request #5573 from overleaf/jpa-prefer-regex-literals
[misc] fix eslint violations for prefer-regex-literals

GitOrigin-RevId: 216288af22b9eeb18cddace7ec285e0a8046f94a
2021-10-28 08:03:41 +00:00
Jakob Ackermann
f6795a324a Merge pull request #5572 from overleaf/jpa-no-path-concat
[misc] fix eslint violations for node/no-path-concat

GitOrigin-RevId: 5122826fb9ae23c373e8c5a6802ebb35eb20314f
2021-10-28 08:03:37 +00:00
Jakob Ackermann
669606f797 Merge pull request #5568 from overleaf/jpa-node-no-callback-literal
[misc] fix eslint violations for node/no-callback-literal

GitOrigin-RevId: af5aace52e1476b1b0ee48cc8be2aabbe04efac6
2021-10-28 08:03:33 +00:00
Jakob Ackermann
489df8360e Merge pull request #5523 from overleaf/jpa-no-loss-of-precision
[misc] fix eslint violations for no-loss-of-precision

GitOrigin-RevId: 06ecbeb5f10569933e99a472a92fd3efbe546278
2021-10-28 08:03:30 +00:00
Jakob Ackermann
7f9fd00bda Merge pull request #5367 from overleaf/jpa-node-handle-callback-err
[misc] fix eslint violations for node/handle-callback-err

GitOrigin-RevId: 83a4900e8861010df1917bff49382bd9c93375bd
2021-10-28 08:03:26 +00:00
Brian Gough
4688cb7b54 Merge pull request #5575 from overleaf/bg-improve-undelete-doc-admin-page
add deletedAt timestamp to undelete doc admin page

GitOrigin-RevId: 46893aae35290e42886320731a5f68811fb3ed46
2021-10-27 08:03:29 +00:00
Jakob Ackermann
5862359ff0 Merge pull request #5518 from overleaf/jpa-no-empty
[misc] fix eslint violations for no-empty

GitOrigin-RevId: 8fc1688ac28ccf29b830ba43cd6091e64b5e3b07
2021-10-27 08:03:14 +00:00
Jakob Ackermann
4cefebec5d Merge pull request #5517 from overleaf/jpa-no-dupe-else-if
[misc] fix eslint violations for no-dupe-else-if

GitOrigin-RevId: 5f72eb1d033322b2d419c1dbad29ea378ee776f5
2021-10-27 08:03:09 +00:00
Jakob Ackermann
0f529df1e4 Merge pull request #5360 from overleaf/jpa-array-callback-return
[misc] fix eslint violations for array-callback-return

GitOrigin-RevId: 4104342239f4da32c541855d6fc7032c4c96004f
2021-10-27 08:03:05 +00:00
Jakob Ackermann
a6f05109a3 Merge pull request #5352 from overleaf/jpa-no-var
[misc] fix eslint violations for `no-var`

GitOrigin-RevId: c52e82f3a8a993b8662cc5aa56e7b95ca3c55832
2021-10-27 08:03:00 +00:00
Brian Gough
43c381e4d5 Merge pull request #5552 from overleaf/bg-node-upgrade-other
upgrade node to v12.22.7 (other services)

GitOrigin-RevId: 889cf9a77173119fec8f200eeef9ddeefca0720b
2021-10-26 08:03:13 +00:00
Henry Oswald
8197411cdf Merge pull request #4891 from overleaf/ho-web-mongo-4-2
bump mongo to 4.2.15

GitOrigin-RevId: 1ac2057f264bd6dbe042d8f999a4ab1054c9edf5
2021-09-15 08:03:54 +00:00
Jakob Ackermann
69e39e04f1 Merge pull request #4794 from overleaf/jpa-object-persistor-npm
[misc] re-install @overleaf/object-persistor from npm

GitOrigin-RevId: 7ecbc050b9037c7930aa09fe561b99dd36eb59dd
2021-08-20 08:03:01 +00:00
Brian Gough
9c50a2488f remove decaff headers, fix camelcase 2021-08-03 10:12:16 +01:00
Brian Gough
9a14d01517 remove decaff headers 2021-08-03 10:12:00 +01:00
Brian Gough
43cab1fddc remove unnecessary returns and callbacks 2021-08-03 10:08:17 +01:00
Brian Gough
8c791b2938 remove default callback 2021-08-03 10:07:00 +01:00
Brian Gough
942feb3011 move process.env.BACKEND to setup.js 2021-08-03 10:00:44 +01:00
Brian Gough
04ea24dfbc remove decaf header and fix lint issues 2021-08-03 09:39:24 +01:00
Brian Gough
8afdc8cbd4 add unit test for withRevCheck method 2021-08-02 11:36:43 +01:00
Brian Gough
7b904d9a9d fix case of WithRevCheck method 2021-08-02 11:02:12 +01:00
Brian Gough
50fa9609a3 add test of archive status 2021-08-02 11:01:30 +01:00
Brian Gough
dd082ad345 return a 409 for DocModified errors 2021-08-02 10:25:18 +01:00
Brian Gough
69339aeb9d return the origin of peeked docs 2021-08-02 10:25:03 +01:00
Brian Gough
6ce28271eb peek at docs without unarchiving 2021-07-30 16:06:16 +01:00
Brian Gough
0095a381b0 refactor unarchiveDoc to use a separate getDoc helper 2021-07-30 16:03:43 +01:00
Jakob Ackermann
886d32ef43 [misc] upgrade node version to latest v12 LTS version 12.22.3 2021-07-13 12:26:35 +01:00
Jakob Ackermann
22a5d5bd80 [misc] temporary override a few new/changed eslint rules 2021-07-13 12:24:42 +01:00
Jakob Ackermann
540b52c128 [misc] run format_fix and lint:fix 2021-07-13 12:04:48 +01:00
Jakob Ackermann
679ea1616c [misc] upgrade build scripts to version 3.11.0 and cleanup packages
```
npm uninstall prettier-eslint-cli eslint-plugin-standard eslint-plugin-jsx-a11y eslint-plugin-react eslint-config-standard-jsx eslint-config-standard-react babel-eslint
npm dedupe
```
2021-07-13 11:55:18 +01:00
Jakob Ackermann
c4cfb0bd78 [misc] goodbye coffee-script 2021-07-13 10:07:04 +01:00
Jakob Ackermann
74f049fc4a [misc] run npm dedupe 2021-07-12 17:51:06 +01:00
Jakob Ackermann
2c35adaf48 [misc] switch from settings-sharelatex to @overleaf/settings 2021-07-12 17:47:20 +01:00
Jakob Ackermann
5239f6c327 [misc] install bunyan as production dependency
```
Error: Cannot find module 'bunyan'
Require stack:
- .../node_modules/@google-cloud/logging-bunyan/build/src/middleware/express.js
- .../node_modules/@google-cloud/logging-bunyan/build/src/index.js
- .../node_modules/logger-sharelatex/logging-manager.js
- .../node_modules/logger-sharelatex/index.js
- .../app.js
```
2021-07-12 17:35:50 +01:00
dependabot[bot]
302576b386 Bump glob-parent from 5.1.1 to 5.1.2
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-10 09:11:02 +00:00
Jakob Ackermann
d69c29e4dc [misc] apply review feedback on naming functions and parameters
Co-Authored-By: Simon Detheridge <s@sd.ai>
2021-06-08 19:29:10 +01:00
Jakob Ackermann
4996f8bbcd [DocArchiveManager] (un-)archive docs in batches and let db filter docs
Also drop the broken 404 logic after switching to db-side filtering.
2021-06-08 12:59:13 +01:00
nate stemen
cee6c0aad9 Merge pull request #105 from overleaf/dependabot-npm_and_yarn-underscore-1.13.1
Bump underscore from 1.10.2 to 1.13.1
2021-05-27 11:53:50 -04:00
nate stemen
081201f796 Merge pull request #103 from overleaf/jpa-retry-archive-deletion
[DocArchiveManager] retry the deletion of doc archives three times
2021-05-27 11:45:53 -04:00
nate stemen
3bbc9156cd Merge pull request #108 from overleaf/ae-decaffeinate-config
Finish decaffeinating settings.default.js
2021-05-27 11:45:13 -04:00
nate stemen
64e201283b Merge pull request #107 from overleaf/dependabot-npm_and_yarn-hosted-git-info-2.8.9
Bump hosted-git-info from 2.8.5 to 2.8.9
2021-05-27 11:45:00 -04:00
nate stemen
fcf0e026c3 Merge pull request #106 from overleaf/dependabot-npm_and_yarn-lodash-4.17.21
Bump lodash from 4.17.19 to 4.17.21
2021-05-27 11:44:52 -04:00
dependabot[bot]
91c19e1f88 Bump underscore from 1.10.2 to 1.13.1
Bumps [underscore](https://github.com/jashkenas/underscore) from 1.10.2 to 1.13.1.
- [Release notes](https://github.com/jashkenas/underscore/releases)
- [Commits](https://github.com/jashkenas/underscore/compare/1.10.2...1.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 15:43:37 +00:00
nate stemen
d0d9cec7e2 Merge pull request #102 from overleaf/jpa-explicit-dependencies
[misc] add linting for missing explicit dependencies and fix any errors
2021-05-27 11:43:04 -04:00
nate stemen
20f70b120a Merge pull request #97 from overleaf/dependabot-npm_and_yarn-y18n-4.0.1
Bump y18n from 4.0.0 to 4.0.1
2021-05-27 11:42:43 -04:00
Alf Eaton
acbf8b5898 Tidy and format 2021-05-19 20:22:02 +01:00
dependabot[bot]
eb8a3118d8 Bump hosted-git-info from 2.8.5 to 2.8.9
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.5 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 13:04:24 +00:00
dependabot[bot]
847ff87ce3 Bump lodash from 4.17.19 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 04:33:05 +00:00
Jakob Ackermann
9ba8237850 [DocArchiveManager] retry the deletion of doc archives three times 2021-05-05 10:58:33 +01:00
Jakob Ackermann
7e583c1bcd [misc] drop request from devDependencies
Co-Authored-By: Alf Eaton <alf.eaton@overleaf.com>
2021-04-30 09:44:26 +01:00
Jakob Ackermann
f5274e52c1 [misc] add linting for missing explicit dependencies and fix any errors 2021-04-29 16:20:31 +01:00
Jakob Ackermann
54c6cce902 Merge pull request #100 from overleaf/jpa-drop-name-filter
[MongoManager] drop name filter from getProjectsDeletedDocs
2021-04-21 14:38:40 +02:00
Jakob Ackermann
74aaa73ad2 Merge pull request #101 from overleaf/jpa-destroy-in-small-batches
[DocArchiveManager] destroy in small batches
2021-04-16 11:24:04 +02:00
Jakob Ackermann
3f94dd4dbf [DocArchiveManager] destroy in small batches
Also add settings options for PARALLEL_JOBS and DESTROY_BATCH_SIZE.
2021-04-16 09:51:41 +01:00
Jakob Ackermann
5bcd142b6f [MongoManager] drop name filter from getProjectsDeletedDocs
All the doc names we had in the projects collection are back-filled now.
A few docs will get dummy values back-filled.
2021-04-12 17:31:26 +01:00
Jakob Ackermann
e80d013268 [misc] drop the deleteDoc endpoint -- use patchDoc instead 2021-04-12 17:31:18 +01:00
dependabot[bot]
a21a6a2e72 Bump y18n from 4.0.0 to 4.0.1
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 15:23:12 +00:00
Eric Mc Sween
71470d3410 Upgrade to Node 12 2021-03-16 08:41:46 -04:00
Eric Mc Sween
5efae3bee6 Add a global test setup file
Configure chai and SandboxedModule globally instead of in every test
file. Also add globals that are required for SandboxedModule to work in
Node 12.
2021-03-16 08:41:46 -04:00
Jakob Ackermann
8915e1d026 [misc] add a new endpoint for getting deleted docs 2021-02-18 10:10:14 +00:00
Jakob Ackermann
c97afede90 Merge pull request #94 from overleaf/jpa-metrics-module-3-5-1
[misc] bump the version of the metrics module to 3.5.1
2021-02-18 09:36:41 +00:00
Jakob Ackermann
99287c2537 Merge pull request #93 from overleaf/jpa-delete-via-patch
[misc] add a new endpoint for changing a docs meta data -- incl. deleted
2021-02-18 09:36:29 +00:00
Jakob Ackermann
0c169cb242 [HttpController] double down on request validation 2021-02-17 11:31:27 +00:00
Jakob Ackermann
26bc074098 [DocstoreManager] patchDoc: allow updates after deletion 2021-02-17 11:31:01 +00:00
Jakob Ackermann
f6ab3a33af [misc] bump the version of the metrics module to 3.5.1 2021-02-16 15:15:52 +00:00
Jakob Ackermann
dd4f4057f4 [misc] add a new endpoint for changing a docs meta data -- incl. deleted
- Validate the request payload with joi -- includes acceptance tests.
- Reject updates to docs that have been deleted.
2021-02-15 13:13:48 +00:00
Christopher Hoskin
21d0b05dff Update README as Credentials are no longer required for acceptance tests 2021-02-09 12:45:57 +00:00
Jakob Ackermann
12bef53645 [DocArchiveManager] optionally do not un-archive soft deleted docs 2021-02-09 11:20:26 +00:00
Jakob Ackermann
708bdfd197 [DocManager] optionally flush docs out of mongo when deleting them 2021-02-09 11:17:46 +00:00
Jakob Ackermann
915fa4ca67 Merge pull request #82 from overleaf/dependabot-npm_and_yarn-ini-1.3.8
Bump ini from 1.3.5 to 1.3.8
2021-02-09 11:14:39 +00:00
Jakob Ackermann
2cf9ff7b41 Merge pull request #89 from overleaf/jpa-is-doc-deleted
[misc] add a new endpoint for querying the deleted status of a doc
2021-02-09 11:14:28 +00:00
Jakob Ackermann
3ef1f91f47 Merge pull request #86 from overleaf/jpa-drop-expensive-default
[misc] MongoManager: drop unused, potentially expensive default options
2021-02-09 11:14:02 +00:00
Jakob Ackermann
ae453d463d Merge pull request #84 from overleaf/jpa-offload-deleted-items
[app] add a new route for archiving a single doc
2021-02-09 11:10:12 +00:00
Jakob Ackermann
28b1ad3243 [misc] add a new endpoint for querying the deleted status of a doc
`/project/:project_id/doc/:doc_id/deleted` responds with:

- 404: the doc does not exist
- 200 and body `{"deleted":true}`: doc exists and is deleted
- 200 and body `{"deleted":false}`: doc exists and is not deleted
2021-01-15 14:49:27 +00:00
Christopher Hoskin
ad45f295ef Merge branch 'master' into csh-issue-3895-node-10-23-1 2021-01-07 08:20:37 +00:00
Christopher Hoskin
fa101a44f7 Update Node to 10.23.1 2021-01-06 09:57:08 +00:00
Jakob Ackermann
1edc628454 [misc] MongoManager: drop unused, potentially expensive default options
All call-sites specify an options object.
2021-01-04 16:07:14 +00:00
Jakob Ackermann
9298f486ad [app] add a new route for archiving a single doc
There is a minor opportunity for optimizing the mongo call(s) for
 archiving: we should include `{ inS3: false }` in the queries instead
 of filtering locally. It's been like that for years now, so it can
 stay a little longer.
2021-01-04 13:47:55 +00:00
Jakob Ackermann
bbcc47a2c4 [misc] fix ci -- pin fake-gcs to a compatible version 2021-01-04 11:57:35 +00:00
dependabot[bot]
2d69ba69c3 Bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-13 07:35:09 +00:00
Jakob Ackermann
9d633c5fa7 [misc] install @overleaf/object-persistor from tar-ball 2020-12-02 12:39:01 +00:00
Eric Mc Sween
fe39cf053d Merge pull request #79 from overleaf/em-docker-compose-healthchecks
Upgrade build-scripts to 3.4.0
2020-11-26 10:54:40 -05:00
Jakob Ackermann
1e4bc43e08 [misc] bump metrics module to 3.4.1
- renamed package from `metrics-sharelatex` to `@overleaf/metrics`
- drop support for statsd backend
- decaffeinate
- compress `/metrics` response using gzip
- bump debugging agents to latest versions
- expose prometheus interfaces for custom metrics (custom tags)
- cleanup of open sockets metrics
- fix deprecation warnings for header access
2020-11-25 11:57:23 +00:00
Eric Mc Sween
f472594819 Upgrade build-scripts to 3.4.0
This version fixes docker-compose health checks for dependent services. See
https://github.com/overleaf/dev-environment/pull/409 for details.
2020-11-24 08:03:29 -05:00
Simon Detheridge
31c757cce2 Don't throw 404 errors when unarchiving, if the doc is already unarchived 2020-09-25 09:17:01 +01:00
Simon Detheridge
0386b871ee Merge pull request #67 from overleaf/jpa-mongodb-shared-db
[misc] simplify mongodb collection access using a shared db construct
2020-09-17 15:42:02 +01:00
Simon Detheridge
867a145843 Merge pull request #74 from overleaf/dependabot-npm_and_yarn-node-fetch-2.6.1
Bump node-fetch from 2.6.0 to 2.6.1
2020-09-17 15:41:45 +01:00
Jakob Ackermann
3644db6848 [misc] mongodb: use the new db connector by default
mongojs was enabling it by default as well.
2020-09-17 15:40:23 +01:00
Jakob Ackermann
b37e27f023 [misc] run the codemod for moving mongo projections into options 2020-09-17 15:40:20 +01:00
Jakob Ackermann
54a82b8c62 [misc] mongodb: export a helper for adding new collections to db
Co-Authored-By: Eric Mc Sween <eric.mcsween@overleaf.com>
Co-Authored-By: Simon Detheridge <s@sd.ai>
2020-09-17 15:39:46 +01:00
Jakob Ackermann
1e7fa2246d [misc] mongodb: refactor the process of setting up the db construct
Co-Authored-By: John Lees-Miller <jdleesmiller@gmail.com>
2020-09-17 15:39:46 +01:00
Jakob Ackermann
8a8a830ad3 [misc] simplify mongodb collection access using a shared db construct
Resolve the getCollection Promises once and store the result in a shared
 `db` object which can get imported by all the call-sites.

The http server is starting only after a Promise of `waitForDb()`
 resolves. This covers the app code and the acceptance tests.
2020-09-17 15:39:44 +01:00
Simon Detheridge
f90d12ed21 Merge pull request #77 from overleaf/spd-node-upgrade
Upgrade node to 10.22.1
2020-09-17 15:37:59 +01:00
dependabot[bot]
7dd2d95b16 Bump node-fetch from 2.6.0 to 2.6.1
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-17 14:37:55 +00:00
Simon Detheridge
360830d3cd Merge pull request #76 from overleaf/spd-remove-old-scripts
Remove rearchive script
2020-09-17 15:37:48 +01:00
Simon Detheridge
9ec93ca0d6 Merge pull request #75 from overleaf/spd-p-map
Replace tiny-async-pool with p-map
2020-09-17 15:37:37 +01:00
Simon Detheridge
1b73733625 Merge pull request #73 from overleaf/spd-metrics-upgrade
Upgrade metrics to @overleaf/metrics'
2020-09-17 15:37:08 +01:00
Simon Detheridge
2ce0ea7e72 Merge pull request #68 from overleaf/dependabot-npm_and_yarn-bl-2.2.1
Bump bl from 2.2.0 to 2.2.1
2020-09-17 15:36:15 +01:00
Simon Detheridge
465bf473d9 Upgrade node to 10.22.1 2020-09-17 14:30:25 +01:00