* [web] move building of compile from cache response into manager
* [web] retry fetching initial compile from cache response
GitOrigin-RevId: b4dc89f1b91d99e869c0c7789881dc72d8a5761f
* [web] settle on a single split-test for the clsi-cache rollout
Use the split-test that was used for rolling out the writes so that we
can use their already populated caches.
* [clsi-cache] fix non-sharded clsi-cache in dev-env
GitOrigin-RevId: 6ebd6369183342fe6d5e325b760d011fd1d57516
* [history-v1-ot] initial implementation of using doc-level history-v1-ot
* [web] fix advancing of the otMigrationStage
Use 'nextStage' for the user provided, desired stage when advancing.
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
* [document-updater] document size check in editor-core
* [history-ot] rename history-v1-ot to history-ot and add types
* [history-ot] apply review feedback
- remove extra !!
- merge variable assignment when processing diff-match-match output
- add helper function for getting docstore lines view of StringFileData
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
* Revert "[document-updater] add safe rollback point for history-ot (#25283)"
This reverts commit d7230dd14a379a27d2c6ab03a006463a18979d06
Signed-off-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
---------
Signed-off-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: 89c497782adb0427635d50d02263d6f535b12481
* Improve FileTooLargeError handling in FileWriter.js
* handle errors on passThrough stream
* unlink files on error
* fail `writeUrlToDisk` if content-length header is too large
With Node 22, the test `Open In Overleaf - when POSTing a snip_uri for a file that is too large` fails.
I initially tried replacing it with a check of the `content-length` header. But then I managed to make the old test pass by adding a handler (`passThrough.on('error', ...)`)
* Unlink files asynchronously, add stream destroys on error
* Remove eslint disables
* Remove `stream.on('error', ...)` and `passThrough.on('error', ...)`
* Revert `Content-Length` check
* Re-add `stream.on('error', errorHandler)`; Remove it on 'response'
* Only report unlink errors there is an error(!!) that's not ENOENT
GitOrigin-RevId: fefe49519ec6f54df5eef69a2c2a75518f9d3748
* Reapply "[web] Promisify ClsiCookieManager and CompileController (reapply and fix)"
This reverts commit 98cb9127ff2b7c7c347c560766f749265d712490.
* Fix: Use query parameters correctly (!!)
* Add unit test on `checkIsLoadSheddingEvent`
* Remove interference between tests: rename to `ClsiCookieManager2` when it's re-sandboxed
* Add test: 'should report "cycle" when other is UP'
GitOrigin-RevId: 3146b149954b908830226cb03b51d9adfa08ec2e
* [web] refactor startup sequence
The primary objective here is to call loadGlobalBlobs() only once.
But to get there, we need to reorder things and add extra try/catch
sections to ensure we are not letting the global uncaughtException
handler catch startup errors.
Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com>
* [web] add metrics for startup steps
Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com>
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: c73edea02516e919d55b896588dcd1862835fedf
* [clsi-cache] shard per zone into three instances
Keep the old instance as read fallback. We can remove it in 4 days.
Disk size: 2Ti gives us the maximum write throughput of 240MiB/s on a
N2D instance with fewer than 8 vCPUs.
* [clsi] fix format
* [k8s] clsi-cache: bring back storage-classes
* [k8s] clsi-cache: fix reference to zonal storage-classes
* [k8s] clsi-cache: add logging configs
* [clsi] improve sharding
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
* [clsi] fix sharding
Index needs to be positive.
* [clsi] fix sharding
The random part is static per machine/process.
* [clsi] restrict clsi-cache to user projects
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
* [k8s] clsi-cache: align CLSI_CACHE_NGINX_HOST with service LB
---------
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: 1efb1b3245c8194c305420b25e774ea735251fb3
* Refactor `ClsiCookieManager` to use async/await
* Refactor `CompileController` to use async/await
* Fix tests: CompileControllerTests.js
* Fix tests: ClsiCookieManagerTests.js
* Fixup: keep old object key (`serverId`->`clsiServerId`)
* Prefix non-express methods with an underscore
* Use async versions of `rclient` methods
* Fix: `canContinue` must be `false` when rate limited (!!)
* Remove unused `ClsiCookieManager.getCookieJar`
* Remove bad comments
* Fix linting
* Replace `request` by `@overleaf/fetch-utils`
* Replace `callsFake` by `resolves`
* Update `catch` block after request->fetch update: check status code
* Re-add timeout of 30s (was removed in 3df75ab5ccc8a63bd69a6a6e6052ef0451b76220)
* `npm run format:fix`
* Don't throw on 4xx errors; keep functionality similar to the current implementation using `request`.
GitOrigin-RevId: ef161f6c252d13f407e9cf28029b62061d6b992f
* [web] stopOnFirstError=true does not conflict with =false locally
Allow stopOnFirstError to be enabled in the compile from cache and
disabled locally.
Compiles that passed with stopOnFirstError=true will also pass with
stopOnFirstError=false. The inverse does not hold, and we need to
recompile.
* [web] record event when using compile from cache
* [web] record event when falling back to clsi-cache
* [web] make clsi-cache a premium feature
* [k8s] clsi-cache: increase disk size for beta rollout
NOTE: As this is a premium feature and paid servers run in zones c+d, we
do not need to scale up clsi-cache in zone b for now.
* [web] enable full sampling of compile-result-backend events
* [web] fix frontend tests
* [web] be more verbose when determining access to clsi-cache feature
GitOrigin-RevId: 6fd663e16085187876eb225f7f33eeeaf69d2b2a
* Remove hacks that conditionally hid `ds-nav` survey
* Remove `getAssignment` of `sidebar-navigation-ui-update`
* Remove `hasDsNav`: make it true everywhere
* Remove dead code
* Update Footer so thin footer is shown in SP/CE
* Run `web$ make cleanup_unused_locales` & `bin/run web npm run extract-translations`
* [server-pro] fix learn wiki tests following DS navigation changes
* [server-pro] tests: remove logout action before switching session
* [server-pro] tests: fix logout test
* [server-pro] tests: use new css class for sidebar on project dashboard
* Revert "should add a documentation entry to the nav bar" test change
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 93eb7a1b03bb4e54ad1770150d83778b8f7f6727