Commit Graph

286 Commits

Author SHA1 Message Date
Jakob Ackermann
6117feef1b [chat] clone comment threads when cloning project with ranges (#32852)
* [project-history] add best effort flush when cloning project

* [web] update labels in clone project modal for admins

* [project-history] do not shadow history flush failure

* [web] fix accessible label for 'Add comment' button

* [chat] clone comment threads when cloning project with ranges

GitOrigin-RevId: ef30204c8a94b3d6204d56dcca2f62a46319996b
2026-04-17 08:07:03 +00:00
Mathias Jakobsen
cae558af69 Merge pull request #32779 from overleaf/mj-project-history-bug
[project-history] Fix broken ranges from history resync

GitOrigin-RevId: c839e1d187768b7ce3411d06f78f017ebf7fec6e
2026-04-17 08:05:42 +00:00
Daniel Kontšek
b7ee046025 Merge pull request #32827 from overleaf/dn0-bump-redis-dev-dockerfile
Bump dev Redis from 7.4.3 to 7.4.8

GitOrigin-RevId: 69d69bc7f14454a8a6512cc75cd5329050ce79f2
2026-04-17 08:05:21 +00:00
Jakob Ackermann
3dc8899334 [web] add admin page for project history failures (#32751)
GitOrigin-RevId: c9564e07239b761851c9a86894f9ef3023dfcf2b
2026-04-15 08:05:57 +00:00
Jakob Ackermann
7faa4c5db4 [project-history] normalize failure messages (#32748)
* [project-history] normalize failure messages

* [project-history] add tests for normalizing failure messages

GitOrigin-RevId: ec15fdba97215047067c10c3fd16ad64696af20b
2026-04-15 08:05:53 +00:00
Jakob Ackermann
5a6c066847 [web] allow admins to clone projects with ranges and entire history (#32739)
* [web] add consistent aria-label to editing/reviewing toggle

* [docstore] add endpoint for getting all docs with ranges

* [history-v1] fix schema of chunkId when deleting old history chunk

* [web] skip duplicate project lookup for resolving rootDocPath

* [web] ignore new limits for root doc path when making debug copy

* [web] allow admins to clone projects with ranges and entire history

* [web] fix tests

* [history-v1] re-order params for cloning project

* [web] fix duplicate import of logger after merge

* [project-history] re-order params for cloning project history metadata

GitOrigin-RevId: 7fa35b4f90885dd453150a348d491ba0ec8de412
2026-04-15 08:05:49 +00:00
Anna Claire Fields
1a7de4ddd8 Upgrades Node.js from 24.13.0 → 24.14.1 (#32498)
GitOrigin-RevId: edbe6969c4c28109e3077f48e94084fc5c910727
2026-04-14 08:04:32 +00:00
Eric Mc Sween
77952e5d21 Merge pull request #32628 from overleaf/em-bg-history-bug
Prevent incorrect merging of ops with different hpos offsets

GitOrigin-RevId: d171a93dcb29e952c7105afd81c3b29ca7e9788e
2026-04-08 08:05:03 +00:00
Domagoj Kriskovic
332588826d [project-history] Fix for invalid range Error (#32198)
* [project-history] Invalid range Error WIP

* Clamp tracked deletes to retention range to prevent negative positions

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
GitOrigin-RevId: 408da6fff99b6c413af3d18fa4c399d88ca5f2a2
2026-04-01 08:06:15 +00:00
Jakob Ackermann
ad508b1882 [project-history] migrate simple request usages to fetch-utils (#32539)
* [project-history] remove unused getQueueCounts in tests

* [project-history] migrate simple request usages to fetch-utils

GitOrigin-RevId: 0e299a9d2ea968b87d7f0f2fc1626393ca4e4fdc
2026-04-01 08:05:41 +00:00
Jakob Ackermann
8a67258461 [project-history] remove unused DocumentUpdaterManager (#32537)
GitOrigin-RevId: f2806187e2ae4e768f48a724712daffd4168e4fb
2026-03-31 08:07:43 +00:00
Jakob Ackermann
a8abc22e6c [web] extend project admin page for history debugging (#32437)
* [web] extend project admin page for history debugging

* [web] address review feedback

Co-authored-by: Malik <malik.glossop@overleaf.com>

---------

Co-authored-by: Malik <malik.glossop@overleaf.com>
GitOrigin-RevId: 01866e8c8529bc8332c49baf4ad281e300f8cdd4
2026-03-27 09:05:52 +00:00
Jakob Ackermann
adef5b26fb [web] gracefully handle broken histories when compiling from history (#32386)
* [web] gracefully handle broken histories when compiling from history

* [web] trim down schema

GitOrigin-RevId: 97d59b31eb25644d7de1194a45281def6982b130
2026-03-24 09:06:18 +00:00
Lucie Germain
bf1f34bca6 Merge pull request #32197 from overleaf/lg-project-number-buildscripts
Replace project name with project number for --pipeline-owner in buildscripts

GitOrigin-RevId: c021447091b388ee3a26e59e7163d53bcd1c8e81
2026-03-18 09:07:27 +00:00
Jakob Ackermann
209f660435 [monorepo] remove endpoints for generating a fake error (#31679)
GitOrigin-RevId: d424881e6ebca157b81344705670021677f856de
2026-02-20 09:06:13 +00:00
Jakob Ackermann
7c70b749d4 [monorepo] remove PII and variables from error messages (#31508)
* [monorepo] remove PII and variables from error messages

Exclusions:
- scripts
- tests
- fuzzing
- SplitTestManager (messages are sent to admin frontend)
- Group setup (we may want an error per unique tuple)
- sharejs (unused types; text type errors are shadowed already)
- history-v1 error messages that are used by the ErrorRecorder
- errors that flag issues with configuration/call signatures

I've used these search terms for finding unwanted error messages:
- new Error(`
- new Error\(\n\s+` (regex search)
- new OError(`
- new OError\(\n\s+` (regex search)

* [web] throw NotFoundError from ProjectLocator

* [github-sync] fix OError.tag call in script

Co-authored-by: Jessica Lawshe <jessica.lawshe@overleaf.com>

* [templates] revert changes to test client

---------

Co-authored-by: Jessica Lawshe <jessica.lawshe@overleaf.com>
GitOrigin-RevId: 736857a4fc5d9bfb0f8cb03e0f004eda87e5a220
2026-02-17 09:05:04 +00:00
Jakob Ackermann
dbf6401f22 [monorepo] move retries from the outside to the per-test level (#31528)
* [monorepo] move retries from the outside to the per-test level

* [web] increase hookTimeout in CI

* [monorepo] consolidate test retries

- do not retry unit tests
- only retry in ci, optionally locally with "RETRIES=3 make test..."
- add retries for web

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>

---------

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
GitOrigin-RevId: 86e45edcfb087d18e0e957ad6df9a6105dcd5770
2026-02-16 09:06:48 +00:00
Jakob Ackermann
fd647002f5 [monorepo] enable caching for eslint and prettier (#30967)
* [monorepo] enable caching for eslint/prettier/stylelint

* [monorepo] speed up prettier by swapping --list-different for --check

--list-different will print each file that it processes. We have a lot
of files in the monorepo. Using --check only prints mismatching files.

Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>

* [monorepo] explicitly configure prettier cache-location

This is the default location. Prettier will only discover that location
if the top level node_modules folder is writable, which is not the case
in CI. We create the .cache folder outside of docker, writable to node
inside docker.

The proper fix would be in prettier, to only check for write access in
the cache folder. Something to raise/upstream another day.

* [monorepo] run top-level format/format_fix in a single container

With the cache in place, it is much faster to use a single container.
As there is a single shared cache file, concurrent processes may see a
partially (re-)written cache file and bail out.

- all in a single container: 24s
- previous with -j4: 41s
- previous with -j8: failed due to corrupted cache file

---------

Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
GitOrigin-RevId: 7850a3a980ae6c836393d97fe56a6316ffc3fa18
2026-02-06 09:05:44 +00:00
Rebeka Dekany
a648015db8 Centralize prettier configuration to root level (#30501)
* Merge all .prettierignore files into top-level config

* Merge all .prettierrc files into top-level config

* Replace service-specific glob patterns in package.json format scripts with `prettier .`

* Add template files with Jinja2, Go template, envsubst, and Handlebars syntax to .prettierignore

* Ignore GitHub templates

* Ignore PUG templates to format them separately with `format:pug`

* Encourage double quotes for YAML, YML files

* Move prettier for PUG source format script to the root

* Move prettier for styles source format script to the root

* Remove prettier for jenkins files from web

* Remove prettier source format script from all services

* Make .prettierrc more readable

* Update format scripts by file type

* Organise `.prettierignore`

* Add `--cache` flag to prettier scripts for faster runs

* Format all files with prettier

* Format all or format services

* Remove `format`/`format:fix` scripts from services since now it runs from root `package.json`

* Avoid conlficts with yamllint configuration

* Remove `--cache` flag from prettier scripts

* Update all service Makefiles to use root-level prettier configuration

* Update all Jenkinsfile to use root-level prettier configuration

* Ignore auto-generated files by build_scripts

* Update package-lock.json

* Update root Makefile format targets

* Update SP Jenkinsfile format target

* Update E2E Makefile format script

* Udpate `format_js` to work in both local and CI env

* Add docker-mailtrap to .prettierignore

docker-mailtrap is a third-party git-ignored directory used for testing

* Added Docker env detection to prevent nested Docker spawning

* Ignore handlebars templates

* Add cryptographic files and test output to `.prettierignore`

* Add terraform modules to `.gitignore`

* Remove prettier-plugin-groovy

* Use npx directly instead of Docker for local formatting for faster formatting

* Auto-generate Makefiles

* Revert "Remove prettier-plugin-groovy"

This reverts commit 194a33589a2e1e4d2225d10c67e9f025e4222025.

* Mount monorepo root in RUN_LINT_FORMAT for prettier config access

* Prettier ignores all `node_modules` by default regardless of location

* Show only changed files in format output

* Ignore LICENSE files

* Enable prettier on rendered build_scripts outputs

* Ignoring all the template folders by prettier

* Remove the public/minjs entry since it does not exist

* Remove all non-existent paths

* Sync `.prettierignore` with ignored files by `.gitignore` and `.dockerignore` files

* Revert "Auto-generate Makefiles"

This reverts commit c0233e490de1bc95fe437219d65e0b66e0331ec9.

* Revert "Use npx directly instead of Docker for local formatting for faster formatting"

This reverts commit 1d2b2cf1a6c6974c76885852a90dd55e84167e41.

* Ignore dashboard JSON files

* Ignore files generated by bin/update_build_scripts

* Remove unsupported file types from `.prettierignore`

* Ignore test fixture generated files

* Ignore README file types by prettier

* Ignore generate snapshots by prettier

* Allow to format generated bin/update_build_scripts by prettier

* Ensure build script outputs prettier-compatible tsconfig.json

* Fix build script output to match prettier formatting
- Fix Jinja2 whitespace in docker-compose templates
- Change YAML quotes from single to double

* Don't read cryptographic files by prettier

* Ignore google verification files by prettier

* Revert npx prettier formatting

* Ignore domain verification files

* Show only changed files in format output

* Make `.github` prettier

* Allow all files to be formatted in jobs by prettier

* Allow server-ce/server-pro files to be formatted by prettier

* Ignore more folders in clsi, filestory, git-bridge by prettier

* Update build script with `RUN_LINTING_CI_MONOREPO`

* Ignore docker-mailtrap and downloads in server-ce by prettier

* Restore prettier configs and prettierignore for V1 since it has its own prettier (an older version)

* Source format

GitOrigin-RevId: 637adc3cc422d1f20c86d6ebc8ec514d60758287
2026-02-04 09:08:22 +00:00
Domagoj Kriskovic
9bd7171413 [project-history] update getProjectBlobSchema to accept numeric history_id
GitOrigin-RevId: b38d8c9e279e227975a12662d3f0c9e0d21cc1bd
2026-02-02 09:05:33 +00:00
Domagoj Kriskovic
4d6c1138c7 rename validateReq to parseReq
GitOrigin-RevId: 26d1a3adf0793a4f80a919707850477db5374b8d
2026-02-02 09:05:24 +00:00
Domagoj Kriskovic
859c21b4dd [project-history] update schemas to accept numeric project IDs
GitOrigin-RevId: 4dac763223f42eb772c30f34e0da0d22464055dd
2026-02-02 09:05:20 +00:00
Domagoj Kriskovic
da9da896c2 Revert "Revert "[project-history] migrate from joi to zod (#30187)" (#30681)"
This reverts commit 8d66aa15a29216736755c3f86954a4d40aa20a6c.

GitOrigin-RevId: 9d56dafff3da5202204ead896bed30182cc2aceb
2026-02-02 09:05:15 +00:00
Anna Claire Fields
e80ce42896 Upgrade Node.js from 22.18 to 24.13 (#30509)
GitOrigin-RevId: c2405a0583e68c61351f52b32ba28faec994fbc0
2026-01-30 09:05:28 +00:00
Mathias Jakobsen
8859aaaeb9 Merge pull request #31011 from overleaf/mj-build-scripts-elastic-search
[build-scripts] Remove elastic search (es) dependency from build scripts

GitOrigin-RevId: db21887149dfb6eab3508762695f73f7ecacb492
2026-01-28 09:07:54 +00:00
Andrew Rumble
f58949a440 Merge pull request #30779 from overleaf/ar-split-analytics-queues
[analytics] split analytics queues

GitOrigin-RevId: cb719fbeba91d69503f315e8c32dd8ab5e872421
2026-01-20 09:05:53 +00:00
Anna Claire Fields
37b8bb15e6 Update es-mock to version 2.7.3 (#30753)
* Update esmock in web and project-history

GitOrigin-RevId: 69d7eceed4b567e2122d6de385a5202c2b25c212
2026-01-19 09:06:54 +00:00
Andrew Rumble
028bca6e87 Merge pull request #30798 from overleaf/ar-reapply-request-overrides
[monorepo] reapply request overrides

GitOrigin-RevId: 55d19cc011435a00ffc1e5c63f523473cd0fc2dc
2026-01-16 09:56:13 +00:00
Andrew Rumble
4271744bfd Merge pull request #30606 from overleaf/ar/bump-qs-to-6.14.1
[monorepo] bump qs to 6.14.1

GitOrigin-RevId: 4b1f8b1cf739c3c0195392fa6707fc233d036b70
2026-01-15 14:20:06 +00:00
Domagoj Kriskovic
da7569e892 Revert "[project-history] migrate from joi to zod (#30187)" (#30681)
This reverts commit f8396a3caadd536edf64c6f971c77f4c941f000a.

GitOrigin-RevId: 8d66aa15a29216736755c3f86954a4d40aa20a6c
2026-01-13 09:07:22 +00:00
Domagoj Kriskovic
6d3dd3601a [project-history] migrate from joi to zod (#30187)
* Add @overleaf/validation-tools in project-history

* use error handler for zod

* Replace joi validations with zod schema

* fix unit tests

* remove Joi validation middleware

* remove optional when there is a default

* fix tests after checking for objectid

* ran build_scripts

* monorepo npm install

GitOrigin-RevId: f8396a3caadd536edf64c6f971c77f4c941f000a
2026-01-13 09:07:00 +00:00
Jakob Ackermann
425e7b1e5b [web] enable mongo notablescan in CI (#29501)
* [monorepo] record ERROR/FATAL log messages in junit report

* [web] put SaaS specific code behind feature flag

* [web] use split test cache for getting user assignments

The unit tests needed updating as they did not replicate any of the
 mongo filtering. The acceptance tests cover this logic.

* [web] make better use of existing indexes

* [web] avoid col-scan in tests of notifications module

* [web] remove cleanup of empty feedbacks collection

* [web] add assertion for reason of rejected request in launchpad test

* [web] add missing indexes

* [web] enable mongo notablescan

* [web] make emailNotifications tests compatible with notablescan

GitOrigin-RevId: b888f2feeb3a0e915f068ae1c4ea23ec17821221
2026-01-13 09:06:38 +00:00
Eric Mc Sween
969079125a Merge pull request #30386 from overleaf/revert-30335-em-retry-octokit
Revert github-sync octokit migration

GitOrigin-RevId: d9f89e058e4ef9f5e6c157089be2793168db9170
2025-12-17 09:07:05 +00:00
Eric Mc Sween
d496324b8d Merge pull request #30335 from overleaf/em-retry-octokit
Retry github-sync migration to octokit

GitOrigin-RevId: d34b2498e86039dd0781a1707adbfe523acfa250
2025-12-17 09:06:13 +00:00
Miguel Serrano
a3ec5b2797 Merge pull request #30018 from overleaf/msm-fix-esm-import
[web] Fix ESM import

GitOrigin-RevId: 887f4927248241cb3d237e0bdad36b05928657ef
2025-12-03 09:05:32 +00:00
Gernot Schulz
74efa0e345 Merge pull request #29898 from overleaf/gs-jenkins-issues-all-pipelines
Enable Jenkins hooks for creating GitHub issues for all pipelines with owners

GitOrigin-RevId: ba46db1d3137db12ee5c78f09b126fb9927d9c49
2025-11-27 09:06:04 +00:00
Eric Mc Sween
1b2a52ad7f Merge pull request #29877 from overleaf/em-revert-octokit
Revert octonode to octokit migration

GitOrigin-RevId: 6a5819a0f25c96bea10bc0cae33ae90ee5038276
2025-11-25 09:06:41 +00:00
Eric Mc Sween
ba61b0dfd4 Merge pull request #29691 from overleaf/em-promisify-github-manager
Replace octonode with octokit in github-sync

GitOrigin-RevId: dfe4f94bed8c4c41a2234860ce2b3443eb076cb9
2025-11-25 09:05:53 +00:00
Thomas
c059a3c5b0 Handle slashes in branch names for docker build tags (#29529)
* Refactor v1 Makefile to use DOCKER_COMPOSE variable for Docker commands with tag safe branch name

* Handle slashes in branch names for docker build tags

GitOrigin-RevId: 463940e8435845978aced745575905f3bfbb8e1c
2025-11-14 09:05:25 +00:00
Gernot Schulz
b834b8bcb7 Merge pull request #29537 from overleaf/gs-jenkins-pr-build-tags-templates
Tag images with branch head instead of merge commit (templates)

GitOrigin-RevId: 53e616aeec058863e25b356841a59f3ebe13c87f
2025-11-10 09:05:00 +00:00
Jakob Ackermann
6691c5dc05 [monorepo] enable mongo notablescan for all services but web (#29497)
* [migrations] make old migrations compatible with --notablescan in mongo

Re-running the migration for db.users.emails.reversedHostname on all
Server Pro/CE users will not be harmfull.

* [monorepo] enable mongo notablescan for all services but web

GitOrigin-RevId: e2a710c9de08de9ac2aa9df1f3082d5f1c33ea05
2025-11-05 09:06:35 +00:00
Brian Gough
729e0f5ac9 move migrations to shared location (#28306)
* fix: correct typedef for Document in helpers.mjs

* add move-migrations codemod

* update migration paths to use shared migrations directory

* move migrations to shared location

* fix: update Dockerfile and docker-compose.ci.yml to include migrations directory

* feat: add migrations tool to workspaces in package.json

* [monorepo] Fix order of docker ignore rules

* [web] remove unused docker ignore file

* [monorepo] replace old references to migrations folder

* [server-ce] copy migrations from new place

* [migrations] Inline web scripts

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] move three web scripts over

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] add missing collection

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] remove lodash dependency

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] avoid mongodb-legacy dependency

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [monorepo] run migrations from tools/migrations

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] simplify migration for adding gitBridge feature to users

* [monorepo] run migrations from tests in all the services

* [migrations] add Jenkins pipeline for linting/formatting

* [monorepo] fixup running web migrations everywhere

* [monorepo] trigger Jenkins builds on changes to mongo migrations

* [migrations] add Jenkins pipeline for linting/formatting

* [monorepo] build scripts: update devDependencies before deps scanning

* [monorepo] build scripts: formerly depend on tools/migrations

* [monorepo] run eslint on .mjs files

* [migrations] enable more eslint rules and fix all the errors

* [rake] fix migrations:list task

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 14cf69cc1b9405bbc75adbb9a000e555500e0614
2025-10-16 08:07:37 +00:00
Jakob Ackermann
0182ad0046 [monorepo] compute IMAGE_CACHE lazily (#29087)
GitOrigin-RevId: de287c89c1cea858d0609265945266be19d7ea26
2025-10-15 08:07:47 +00:00
Jakob Ackermann
15a6e8ba04 [monorepo] use content hash as docker image cache key (#29046)
* [monorepo] remove docker-repos flag from build scripts

* [monorepo] use content hash as docker image cache key

* [packer] jenkins-worker: populate build cache for all services

* [v1] adopt smarter docker caching

* [latexqc] adopt smarter docker caching

* [monorepo] refresh docker cache in Jenkins

* [packer] jenkins-worker: increase disk size

* [monorepo] run jenkins_docker_build_cache as Jenkins user for v1

* [monorepo] define MONOREPO at the top of all the Makefiles

* [monorepo] add --build-arg BUILDKIT_INLINE_CACHE=1 everywhere

GitOrigin-RevId: 8110c6e68727a52ea80f3ec71711d30e17d69499
2025-10-15 08:06:41 +00:00
Jakob Ackermann
fd0d21fbbd [monorepo] migrate build scripts to Jenkins (#29019)
* [monorepo] migrate build scripts to Jenkins

* [fraud-dash] fix integration with monorepo

GitOrigin-RevId: 6a30ec5ea68a1eae9b663faf9ccdc741ec7f9cf8
2025-10-13 08:07:11 +00:00
Tim Down
7aa66b260c Merge pull request #28541 from overleaf/td-notifications-app-ts
Change notifications app.js to TypeScript

GitOrigin-RevId: cb6195e2e8c8cd89e1a954bfcb1911929440d6ca
2025-10-13 08:05:36 +00:00
Domagoj Kriskovic
267fc5393a Promisify ProjectHistoryClient, ProjectHistoryApp, SyncTests and SendingUpdatesTests (#28890)
GitOrigin-RevId: 7bf26c6ed1a172c6506449a821d4e43f424a72bd
2025-10-08 08:06:00 +00:00
Domagoj Kriskovic
6d84dfddcc Skip checking status code for fetchJson
GitOrigin-RevId: 1470fdd5aabde3448c5ac5ed8e9203fc509b13e8
2025-10-07 08:05:43 +00:00
Domagoj Kriskovic
62ec3f9644 Promisify ReadingASnapshotTests
GitOrigin-RevId: 281b3a84466175a38b5ebbf9282b4c996e04d221
2025-10-07 08:05:39 +00:00
Domagoj Kriskovic
aed47ef01b Promisify LatestSnapshotTests
GitOrigin-RevId: 40b0811e25ac9ee75c295c89cec7ad07570007c4
2025-10-07 08:05:34 +00:00