Commit graph

52 commits

Author SHA1 Message Date
Mathias Jakobsen
36ad15c405 Merge pull request #17859 from overleaf/mj-project-history-ranges-at-version
[overleaf-editor-core+project-history] Add endpoint to fetch ranges from version

GitOrigin-RevId: fbe8e8ef3636b344006375a92057cfc580a74616
2024-04-22 08:04:11 +00:00
Domagoj Kriskovic
c4437c69bc Send operations to project-history when accepting tracked changes (#17599)
* added getHistoryOpForAcceptedChange in RangesManager

* rename adjustHistoryUpdatesMetadata to be treated as public

* handle retain op in UpdateTranslator and updateCompressor

* send op to project-history in acceptChanges

* use promises.queueOps

* use ranges in getHistoryOpForAcceptedChange

* using rangesWithChangeRemoved

* acceptChanges acceptance test

* using change.op.hpos

* Revert "using change.op.hpos"

This reverts commit f53333b5099c840ab8fb8bb08df198ad6cfa2d84.

* use getHistoryOpForAcceptedChanges

* fix historyDocLength

* Revert "rename adjustHistoryUpdatesMetadata to be treated as public"

This reverts commit 2ba9443fd040a5c953828584285887c00dc40ea6.

* fix typescript issues

* sort changes before creating history updates

* fix tests

* sinon spy RangesManager.getHistoryUpdatesForAcceptedChanges

* added unit tests

* sort deletes before inserts

* use getDocLength function

* fix docLength calculation

* fix typo

* allow all retains

* fix lint error

* refactor RangesTests

* fix ts error

* fix history_doc_length calculation in RangesManager

* remove retain tracking check from UpdateCompressor

* use makeRanges() properly in tests

* refactor acceptance tests

GitOrigin-RevId: ab12ec53c5f52c20d44827c6037335e048f2edb0
2024-04-17 08:04:17 +00:00
Mathias Jakobsen
1116f9ea9a [overleaf-editor-core+project-history] Clean up TrackedChangeList api (#17740)
* [overleaf-editor-core+project-history] Mark TC list backing array as private

* [overleaf-editor-core] Add invariant for overlapping comment ranges

* [overleaf-editor-core] Assert that ranges are non-empty

GitOrigin-RevId: e60a3712eba2326e0767a75a3ffc75333311c057
2024-04-17 08:04:13 +00:00
Eric Mc Sween
1c0f5357aa Merge pull request #17843 from overleaf/em-fix-422-resyncs
Change in history 422 error messages

GitOrigin-RevId: 414642c838703c9084058e1204192ec1cbb1e0a3
2024-04-15 08:04:51 +00:00
Eric Mc Sween
ab17eb150d Merge pull request #17745 from overleaf/em-promisify-snapshot-manager
Promisify SnapshotManager

GitOrigin-RevId: 1fa7124da3aa3e0be5db372e68e286d63f496a97
2024-04-15 08:04:46 +00:00
Eric Mc Sween
d12a0b5f07 Merge pull request #17735 from overleaf/em-promisify-web-api-manager
Promisify WebApiManager

GitOrigin-RevId: 95addc9442845252aa51c353676486b2dbce0662
2024-04-12 08:05:39 +00:00
Eric Mc Sween
3b555ac9e6 Merge pull request #17731 from overleaf/em-promisify-error-recorder
Promisify ErrorRecorder

GitOrigin-RevId: 3736567272a09b4e3b9075118460392c1f66f0d7
2024-04-12 08:05:34 +00:00
Eric Mc Sween
f03e3fd51e Merge pull request #17729 from overleaf/em-promisify-sync-manager
Promisify SyncManager

GitOrigin-RevId: 134770d812a493e39410debb370ed4a58ffff4bf
2024-04-12 08:05:29 +00:00
Domagoj Kriskovic
8bde496da4 Send operations to project-history when resolving/unresolving comments (#17540)
* Send operations to project-history when resolving/unresolving comments

* small fixes

* added doc_id in web unit test

* Revert "added doc_id in web unit test"

This reverts commit f0b8251abfce17965d5e1b0e45d8784fcf1d9eed.

* fix mocked dependency in test

* wip: web unit tests

* document updater, reopen test

* document-updater tests

* format fix

* fix typo

* fix callsArgWith

* fix reopenThread calls in doc updater tests

* fix typos

* log error if chat api resolve failes

* log error when reopening thread

* sendStatus calls done() in tests

* using OError instead of logging

* removed timers

* preserve legacy endpoints

* update after merge

* Remove timer check in HttpControllerTest

* prettier

* added "legacy" in log

* remove metrics.timer

* fix promisify issues

* remove unused cb

GitOrigin-RevId: 849538c86996973a065c727835e93028e5429344
2024-04-10 08:04:08 +00:00
Domagoj Kriskovic
1557338775 [project-history] fix convertToDiffUpdates when track delete is moved by previous op (#17681)
* [project-history] fix convertToDiffUpdates

* fix test

* preserve source ranges for applyRetain

* use sourceRanges for applyDelete

* use cursor difference for offset

* move statement to closer to original

* handle deletion before tracked delete

* Revert "handle deletion before tracked delete"

This reverts commit 6f2570f22473bd64516c166b29a34639ec701230.

* using resultCursor and sourceCursor

* refactor, use scanCursor

* skip track delete properly

* prettier

* remove .sort() in applyRetain

* small test fixes

GitOrigin-RevId: 94755c219c90d6fedcdc64284d71137cf56d2442
2024-04-10 08:04:03 +00:00
Mathias Jakobsen
815c29cf82 Merge pull request #17396 from overleaf/mj-version-filtering
[overleaf-editor-core+project-history] Filter tracked changes when fetching files

GitOrigin-RevId: 935e4c4712f31b77070aec545a849fc6fefedcd9
2024-04-08 08:04:17 +00:00
Eric Mc Sween
7a6b03cf7c Merge pull request #17667 from overleaf/em-history-comment-ids
Handle the commentIds property in project-history

GitOrigin-RevId: 39502a88f97e531b436a1b2d4f791c73e31bb401
2024-04-03 08:04:02 +00:00
Eric Mc Sween
59703ef745 Merge pull request #17662 from overleaf/em-handle-tcs-history
Reintroduce tracked changes handling in project-history

GitOrigin-RevId: f6d72fbffc9b2d2328edc35ffb3f328a31d95e6a
2024-03-28 09:04:57 +00:00
Eric Mc Sween
919a83c193 Merge pull request #17649 from overleaf/em-revert-handle-tcs
Revert tracked changes handling in project-history

GitOrigin-RevId: 1671378e12c8e98354cdad28abc9498600f79479
2024-03-27 09:04:30 +00:00
Eric Mc Sween
3ab54b5b14 Merge pull request #17368 from overleaf/em-handle-metadata
Handle tracked changes in project-history

GitOrigin-RevId: 9c790a4dcd874f0d68173fc65cb6823a4da55cc6
2024-03-27 09:04:19 +00:00
Alf Eaton
6cc2db3cdd Merge pull request #17525 from overleaf/ae-upgrade-prettier
Upgrade Prettier to v3

GitOrigin-RevId: 6f1338f196408f3edb4892d5220ad3665ff1a5bc
2024-03-26 09:04:05 +00:00
Mathias Jakobsen
4ef7bc617b Merge pull request #17196 from overleaf/mj-tracked-deletes-filtering
[project-history] Filter tracked deletes from diff views

GitOrigin-RevId: 32c49a740932ef28534b82d390fe00e6500864ca
2024-03-13 09:03:19 +00:00
Domagoj Kriskovic
3e701f1388 Send operations to project-history when deleting comments (#17198) (#17494)
* Make Operation.fromRaw parse AddComment operations

* Send operations to project-history when deleting comments

* remove RedisManager.updateDocument call

* format fix

* Revert "remove RedisManager.updateDocument call"

This reverts commit 5d45f34b5919bf5a85e8475e5a450bcb213d3f82.

* remove versions from deleteComment op

* pass userId to deleteComment operation

* revert userId from chat service

* revert userid from chat tests

* format:fix

* document updater fix tests

* format:fix

* fix web unit test

* deleteThread test fix

* send only if historyRangesSupport is true

* use headers to pass userId

* set historyRangesSupport in tests

* optional headers

* Revert "use headers to pass userId"

This reverts commit e916c469f95b1ac166e30e12e735171eb814af01.

---------

Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com>
GitOrigin-RevId: 14c10669e43d76883dbaaa8ab55e102b5ebadd38
2024-03-12 09:03:55 +00:00
Domagoj Kriskovic
f5b894bc2e Revert "Send operations to project-history when deleting comments (#17198)" (#17476)
This reverts commit 34ab7e4ea6dd1b5fd749f9accaf4a6e16ae1d840.

GitOrigin-RevId: 005de52bcacbacf62d22cd8617d7a765f56bd72e
2024-03-11 09:04:29 +00:00
Domagoj Kriskovic
4a3a0752a4 Send operations to project-history when deleting comments (#17198)
* Make Operation.fromRaw parse AddComment operations

* Send operations to project-history when deleting comments

* remove RedisManager.updateDocument call

* format fix

* Revert "remove RedisManager.updateDocument call"

This reverts commit 5d45f34b5919bf5a85e8475e5a450bcb213d3f82.

* remove versions from deleteComment op

* pass userId to deleteComment operation

* revert userId from chat service

* revert userid from chat tests

* format:fix

* document updater fix tests

* format:fix

* fix web unit test

* deleteThread test fix

* send only if historyRangesSupport is true

* use headers to pass userId

* set historyRangesSupport in tests

* optional headers

* Revert "use headers to pass userId"

This reverts commit e916c469f95b1ac166e30e12e735171eb814af01.

---------

Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com>
GitOrigin-RevId: 34ab7e4ea6dd1b5fd749f9accaf4a6e16ae1d840
2024-03-11 09:04:24 +00:00
David
b59326e96f Merge pull request #16873 from overleaf/dp-mongo-command-monitoring
Use mongo command monitoring to add timing metrics

GitOrigin-RevId: e7e5dd5cca1ba3802c02198ccf81058d4da3f1e7
2024-02-23 09:02:55 +00:00
Thomas
89bc2e0b28 Merge pull request #17251 from overleaf/tm-raise-history-diff-max-chunks
Raise MAX_CHUNK_REQUESTS to 10 in DiffManager

GitOrigin-RevId: e88960bbd5237f65375a830147783dcfa99ec220
2024-02-22 09:05:20 +00:00
Eric Mc Sween
cd1773773e Merge pull request #17162 from overleaf/em-handle-comments
Handle comment updates in project-history

GitOrigin-RevId: 46f0043c1c20200bdb665e66643a7870c18d797f
2024-02-21 09:03:27 +00:00
Jakob Ackermann
63520c7076 Merge pull request #16859 from overleaf/jpa-sharelatex-cleanup
[misc] ShareLaTeX cleanup - high impact

GitOrigin-RevId: 6dcce9b0f15e30f7afcf6d69c3df36a369f38120
2024-02-09 09:04:11 +00:00
David
285607b185 Merge pull request #16669 from overleaf/dp-decaf
Decaf cleanup of LabelsManager

GitOrigin-RevId: 4c261d3fb92cda9f8d493593d7d951ccb3b012ea
2024-02-06 09:03:02 +00:00
David
e3513a9d50 Merge pull request #16545 from overleaf/dp-project-owner-delete-labels
Allow project owners to delete history labels

GitOrigin-RevId: 16111337681ac4085db2cf48e9d4c2fa87993b77
2024-01-23 09:03:08 +00:00
Christopher Hoskin
ced8a923c0 Merge pull request #16218 from overleaf/csh-issue-11625-mongo-ug-5-project-history
Upgrade mongodb module for project-history

GitOrigin-RevId: 18782896b46b2b0512a1ce50215bb98ac3d46cea
2023-12-18 09:04:07 +00:00
Jakob Ackermann
47820c61a0 Merge pull request #15409 from overleaf/jpa-history-v1-http-timeout
[history-v1] make http request timeout configurable

GitOrigin-RevId: b31b1c94563ddb5195f92af303e6b0f234856795
2023-10-25 08:04:50 +00:00
Christopher Hoskin
5855ba7b49 Merge pull request #15241 from overleaf/em-gcp-opentelemetry
Replace the GCP trace agent with OpenTelemetry

GitOrigin-RevId: 591410029349e4ef5a39a5b79868e57c7bd089b6
2023-10-19 08:02:52 +00:00
Eric Mc Sween
43570cb7b4 Merge pull request #14932 from overleaf/em-optimise-ops-compression
Optimize ops compression in project-history

GitOrigin-RevId: 8131e8b833f64bb6560a966105e1d377e55b669e
2023-09-26 08:04:03 +00:00
ilkin-overleaf
6db48cdaa3 Merge pull request #14235 from overleaf/ii-history-project-diff
Project history diff fix

GitOrigin-RevId: 42d55425873aa610560a03609c01e55606894940
2023-08-17 08:02:54 +00:00
Brian Gough
06c3de586a Merge pull request #14266 from overleaf/bg-node-18-avoid-chunked-uploads
send content-length header when creating blobs

GitOrigin-RevId: fd541f307786cc883c6545ed8dfb750b03a025f2
2023-08-14 08:04:37 +00:00
Eric Mc Sween
b750948e00 Merge pull request #13780 from overleaf/em-fetch-utils-project-history
Use fetch-utils in project-history

GitOrigin-RevId: 96afc5f3961210baa7ad597645b725fe2d8d3529
2023-07-17 11:00:49 +00:00
Miguel Serrano
21eada08ef Merge pull request #13574 from overleaf/msm-fix-history-anon
Fix 'anonymous-user' edits breaking history

GitOrigin-RevId: 4141477e7987c0354a419d2c5d8203b6efcf673d
2023-07-17 10:48:20 +00:00
Eric Mc Sween
adfe7abaaf Merge pull request #13255 from overleaf/em-socket-leak-detection
Reintroduce socket leak detection in all services

GitOrigin-RevId: 0a9a1ced0b886dbb267cb46beb5da7d0133d39aa
2023-05-31 08:05:24 +00:00
Eric Mc Sween
6077e73dd6 Merge pull request #13253 from overleaf/em-revert-leaked-socket-detection
Revert leaked socket detection

GitOrigin-RevId: 0f17864122a17fc69d0dac1ad5e2775805639871
2023-05-30 08:04:09 +00:00
Eric Mc Sween
c625fef364 Merge pull request #13214 from overleaf/bg-add-socket-leak-detection-to-all-services
add socket leak detection to all services

GitOrigin-RevId: 9481222258b796ca8c3b50cdd7ce60c05f0f9f61
2023-05-30 08:03:58 +00:00
Tim Down
66dc566752 Merge pull request #13039 from overleaf/td-history-auto-select-file-ignore-binary
History migration: Ignore binary files when auto-selecting file to display in history view

GitOrigin-RevId: 7d2a314cdb3d54e4e2292a95e7633e3829ea931f
2023-05-26 08:04:29 +00:00
Jakob Ackermann
5638f06b3a Merge pull request #13055 from overleaf/jpa-monitor-sockets-everywhere
[metrics] collect HTTP socket stats for all the services

GitOrigin-RevId: 52872f4ca46d8cf351f7f4b4df90f9d6b05010b3
2023-05-23 08:05:03 +00:00
Brian Gough
acfeafd276 Merge pull request #12965 from overleaf/bg-improve-timeout-error
improve lock timeout error in project history

GitOrigin-RevId: fdcdacd4526e008f13c46c396fb13d07ae1b8c0f
2023-05-10 08:06:07 +00:00
Jakob Ackermann
51af6558cc Merge pull request #12831 from overleaf/jpa-project-history-pipe
[project-history] migrate to fetch/stream.pipeline

GitOrigin-RevId: 9224eab6a0ad9cbb0c80e443a1c0d4abdd9bbd0f
2023-05-09 08:04:14 +00:00
Eric Mc Sween
5fe98bf0fd Merge pull request #12210 from overleaf/em-camel-case-project-history
Camel case variables in project-history

GitOrigin-RevId: 299245883b44366911ee43ee7e644a7bfa3d8319
2023-03-21 09:05:13 +00:00
Brian Gough
fc9955e719 Merge pull request #12035 from overleaf/bg-clear-first-op-timestamp-3
skip adding timestamp when flushing old projects

GitOrigin-RevId: a420da0e1c2aecd1589d857744353fb5e014aa32
2023-03-01 09:03:55 +00:00
Eric Mc Sween
3ead64344f Merge pull request #11952 from overleaf/em-batch-redis-reads
Read updates from Redis in smaller batches

GitOrigin-RevId: 06901e4a9e43976e446c014d5d46c2488691c205
2023-02-28 09:04:23 +00:00
Eric Mc Sween
f6bfc14a79 Merge pull request #11913 from overleaf/em-revert-batch-redis-reads
Revert batched Redis reads

GitOrigin-RevId: 4f71dcb7a7e7ae92046ab7edef0930c0358da945
2023-02-21 09:05:26 +00:00
Eric Mc Sween
61bc701f7e Merge pull request #11864 from overleaf/em-batch-redis-reads
Read updates from Redis in smaller batches

GitOrigin-RevId: 847c3a65bc8acc275cd6ddaad1e4ef18c7d0287c
2023-02-21 09:05:18 +00:00
Eric Mc Sween
a7c9e3b20f Merge pull request #11790 from overleaf/em-promisify-redis-manager
Clean up and promisify RedisManager in project-history

GitOrigin-RevId: 8bd8bb7d51a0a68f7b1a97ffa310a674086714ba
2023-02-17 09:04:08 +00:00
Miguel Serrano
98cf5765e9 Merge pull request #11287 from overleaf/bg-clear-first-op-timestamp-2
clear the first op timestamp whenever the queue is processed (2nd attempt)

GitOrigin-RevId: 0764ca6360b2a9203e5d32499213b312563a2c47
2023-02-09 14:34:49 +00:00
Eric Mc Sween
74eeec2ba3 Merge pull request #11680 from overleaf/em-mongo-pool-monitoring
Mongo connection pool monitoring

GitOrigin-RevId: 050e50e7e67061ccbf39a710ca4532eafd423365
2023-02-09 14:34:35 +00:00
Miguel Serrano
8b723c5363 Merge pull request #11160 from overleaf/msm-replace-uuid-crypto
Replace `uuid`/`node-uuid` with `node:crypto`

GitOrigin-RevId: 1be4f09c4681edac7e8bc58af3b5726d0d5ee322
2023-01-18 15:07:58 +00:00