Commit Graph

1217 Commits

Author SHA1 Message Date
yu-i-i
0bc3dc35e1 Fix: always include repository prefix in sandboxed compiles image name 2026-05-19 15:49:19 +02:00
yu-i-i
7ddcc0da61 Refactor Sandboxed Compiles 2026-05-19 15:49:16 +02:00
yu-i-i
0637de8039 Add 'poll' to clsi seccomp profile, fixes minted. Thanks, David. 2026-05-19 15:49:16 +02:00
yu-i-i
a76b4019d7 Allow selecting a TeX Live image for a project 2026-05-19 15:49:13 +02:00
Mathias Jakobsen
ce6f9b8e8c Merge pull request #33705 from overleaf/mj-clsi-cwd-for-conversions
[clsi] Add cwd argument to CommandRunner and use to simplify conversions

GitOrigin-RevId: 5333e3262a99e602ab5470ae1e23facb5b28a170
2026-05-19 08:04:51 +00:00
Andrew Rumble
e9aedce4ab Merge pull request #33625 from overleaf/ar-update-vitest
[monorepo] bump vitest to 4.1.5

GitOrigin-RevId: 22ba2249ae384fd59347c9aa45c70f51ccdf8890
2026-05-18 08:06:49 +00:00
Eric Mc Sween
529c332159 Merge pull request #33658 from overleaf/em-fix-docker-tag-length
build: truncate branch names to 96 chars for Docker image tags
GitOrigin-RevId: 9db313244e78a6d4e0aa5d8c08d25f1aac83318b
2026-05-14 08:06:45 +00:00
Jakob Ackermann
b62d4814c3 [monorepo] turn throw statements in callback code into callback calls (#33524)
* [eslint-plugin] add rule for throw inside callback code

* [monorepo] enable our custom eslint plugins globally

* [monorepo] fix running make lint from root

* [monorepo] turn throw statements in callback code into callback calls

* [monorepo] add eslint-plugin libraries to all the Dockerfiles

* [monorepo] install eslint-plugin library at the root level

* [linked-url-proxy] add eslint-plugin library into Dockerfile

* [latexqc] add our eslint-plugin to eslint config

GitOrigin-RevId: b05e3ebbefb62370f2422e83880dd3913815270d
2026-05-14 08:05:47 +00:00
Mathias Jakobsen
6b28a4ee5a Merge pull request #33560 from overleaf/mj-conversion-cleanup
[clsi+web] Small cleanups and improvements to conversions / exports

GitOrigin-RevId: 300adfbb91e89f754ee7f835db792ccb50b27613
2026-05-12 08:06:17 +00:00
Mathias Jakobsen
32da6548c8 Merge pull request #33277 from overleaf/mj-pandoc-clsi-two-step-download
[clsi] Use clsi-nginx for downloading pandoc exports

GitOrigin-RevId: b6013fae6f53c7af714634d700ceed491d724653
2026-05-08 08:09:18 +00:00
Mathias Jakobsen
ae31ad218c Merge pull request #33104 from overleaf/mj-pandoc-arguments
[clsi] Add pandoc arguments for better conversions

GitOrigin-RevId: 76cddc5959237d6d2801c56471d8d3f63d111200
2026-05-08 08:09:12 +00:00
Mathias Jakobsen
5dc67db403 Merge pull request #33089 from overleaf/ds-export-md-files-pandoc
[WEB + CLSI] Download as markdown

GitOrigin-RevId: 181eddf2513e9c5edacbab37e93f9cac2191ee1a
2026-05-08 08:09:07 +00:00
Mathias Jakobsen
eddcc5a42e Merge pull request #32857 from overleaf/ds-pandoc-import-md
[WEB + CLSI] Import markdown files using pandoc

GitOrigin-RevId: adad7831ddb13a8fcb8063871166bde13cbbf1b6
2026-05-08 08:09:02 +00:00
Jakob Ackermann
44efc9d745 [monorepo] avoid corepack network requests (#33502)
* [monorepo] avoid corepack network requests

- Download yarn via corepack as the first step in all the docker files
- Turn off networking in corepack
- Do not run things in the upstream node image
  Instead, use the monorepo image, or base layer in all the services.
- Always build the base layer when running tests (uses cache)

* [monorepo] install corepack in shared place

* [clsi-lb] remove unrelated changes

* [web] add missing DC_RUN_FLAGS

* [monorepo] only rebuild test images locally

Also remove spurious build config in docker-compose.ci.yml.

* [server-ce] test: make yarn files available to host-admin and e2e

* [monorepo] put the corepack install snippet in a few more places

GitOrigin-RevId: 38005016ae5a708e12295e246269d6c18fece937
2026-05-08 08:08:57 +00:00
renovate[bot]
de9b07f0b9 [Platform] Update dependency lodash to v4.18.1 from 4.17.23 [SECURITY] (#33229)
* Upgrade lodash resolution to 4.18.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* update lodash in rest of packages

---------

Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Anna Fields <acfields11@gmail.com>
GitOrigin-RevId: 66ce1610993a592899c25155757ca3267ebcd5c1
2026-05-07 08:07:41 +00:00
Jakob Ackermann
37cc65ec7e [web] consolidate clsi downloads and add zod validation (#33069)
* [web] consolidate clsi downloads and add zod validation

* [validation-tools] make prettier happy

* [web] make clsiServerId optional

* [web] fix type of buildId

* [web] gracefully handle ObjectId

* [web] fix type of buildId

* [monorepo] address review feedback

- cjs export
- update module path in comments
- skip adding ?clsiserverid if not set
- allow nested output file download for submissions and add tests

* [web] address review feedback

* [web] cache one more zod schema

* [web] fix unit tests

GitOrigin-RevId: 0a1e618955983e035defd6d3c0528b81e0e85c95
2026-05-05 08:06:05 +00:00
Jakob Ackermann
da11cf2669 [monorepo] fix running tests locally (#33186)
* [monorepo] fix running tests locally

* [web] fix east invocation

* [web] move corepack into entrypoint

* [web] fix running module acceptance tests locally

* [web] fix merged module targets

* [web] remove spurious change

GitOrigin-RevId: 84cf7f8d768d3429c8a98c789acf76f6cecd6e3e
2026-04-29 08:05:42 +00:00
Anna Claire Fields
0d64a88a46 Yarn 4 Migration (#32253)
Migrates the Overleaf monorepo package manager from npm (v11) to Yarn 4 (v4.9.1) using node-modules linker mode.

GitOrigin-RevId: 50d32ab01955c15e29679eff9e9e9cfb897fab2d
2026-04-28 08:52:37 +00:00
Davinder Singh
be5a7b56c8 [WEB + CLSI] Download as docx file feature (#32851)
* using CLSI logic for fetching the project contents and skip the .zip export

* Use unique conversion directory for project-to-docx export to avoid corrupting the shared compile
  directory when a compile runs concurrently

* Remove X-Accel-Buffering header — not needed as CLSI does not run behind nginx

* moving log before sending the data

* Return CLSI stream directly instead of buffering to disk on web

  Previously convertProjectToDocx wrote the CLSI response to a temp file
  on disk, then the controller read it back to stream to the client.
  Now the stream is returned directly and piped to the response,
  avoiding unnecessary disk I/O on the web server.

* Use href redirect for docx export instead of fetching blob into memory

* making functions and files more generic so they can be used in future for other documents exports as well

* adding export-docx split test

* adding unit tests

* adding cypress E2E test

* format:fix

* renaming the route to download from convert

* adding new icon for export docx button

* format:fix

* remove unused showExportDocumentErrorToast export and adding guard against invalid Content-Length header from CLSI

* format:fix

* refactor(clsi): move promisify(parse) into RequestParser

* refactor: generic conversion endpoint with type as route
  param

* refactor: use type→extension map for validated conversion types

* refactor(clsi): remove --standalone flag and fix rejection test

* fixing the href in cypress test

* renaming function

* adding type to Metrics.inc

* fix: rename exportProjectDocument, add WithLock wrapper and metrics type label

* format:fix

* fix: hide docx export from anonymous users and add WithLock wrapper

* format fix

* remove redundant Content-Length validation from DocumentConversionManager

* format:fix

* removing trailing icon

GitOrigin-RevId: e9764fefac2c4b625d23be9e942ea4a8b283c70d
2026-04-24 08:06:10 +00:00
Jakob Ackermann
926d6bccd7 [clsi] reduce write traffic to clsi-cache from free users (#32958)
GitOrigin-RevId: c01cc21c3c82f361c7d82843e65bb087b21434ed
2026-04-22 08:05:59 +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
Andrew Rumble
72586d2ea2 Merge pull request #32497 from overleaf/ar-picomatch-4.0.4
[monorepo] picomatch 4.0.4

GitOrigin-RevId: 433c2b436123b3eff336ef6597a67c7dccc9d6ba
2026-04-01 08:05:59 +00:00
Jakob Ackermann
0544aded40 [clsi] handle draft mode and tikzexternalize as part of sync phase (#32516)
* [clsi] handle draft mode and tikzexternalize as part of sync phase

* [clsi] emit empty string from SafeReader on ENOENT

* [clsi] persist history state after clearing dirty state without changes

GitOrigin-RevId: d9dcd2e6887017f7935b5e95bdbdc6e11a3b18f5
2026-03-31 08:07:19 +00:00
Jakob Ackermann
d66a856baa [clsi] remove locking from docker actions (#32373)
* [clsi] remove locking from docker actions

Start:
- We have an in-memory lock on the compile request

Destroy:
- as part of run: see above
- as part of cleanup: we check the last access time now, so it cannot
  happen concurrent to compiling anymore.

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>

* [clsi] update comment

---------

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>
GitOrigin-RevId: a58df45416ae31c0b38d5efec7f9371d747303df
2026-03-27 09:06:28 +00:00
Mathias Jakobsen
9c97876268 [web]+clsi] Allow docx import via pandoc (#32004)
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 246b3290ec04867f71545b1a7c5d95d0f68379ff
2026-03-27 09:06:23 +00:00
Jakob Ackermann
07397bbdde [clsi] avoid server error when clearing cache while compiling (#32349)
* [clsi] avoid server error when clearing cache while compiling

* [clsi] tweak API around releasing locks

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

---------

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
GitOrigin-RevId: d3f171467d3bc26941758dd333f30049b37a05c8
2026-03-23 09:06:18 +00:00
Jakob Ackermann
3aa69c6ffa [k8s] clsi-cache: double the number of shards (#32323)
* [k8s] clsi-cache: double the number of shards

* [monorepo] add missing clsi-cache env vars to dev-env

* [clsi] flip direction of clsi-cache shard migration

* [clsi] remove upper bound from clsi-cache shard migration

GitOrigin-RevId: a325a11c3ac9e22a12ad2d8ea802b91d2e175e24
2026-03-20 09:07:11 +00:00
Jakob Ackermann
6377624d25 [clsi] ignore download errors for binary files in compile from history (#32263)
GitOrigin-RevId: 3c1940b2d56701ec4b07d1457ee1af2de317a047
2026-03-19 09:07:00 +00:00
Brian Gough
9f1e4d99e5 handle old versions of latexmk in run count extraction (#30597)
* handle old versions of latexmk in run count extraction

the log lines for the run number change from stderr to stdout in TL2022

* extend SimpleLatexFileTest to include TL2017

* reset metrics for each scenario in SimpleLatexFileTests

* fix buildscript merge conflict

GitOrigin-RevId: fb74f2025d21ddf43be6a3b90ac6f7df4d975db6
2026-03-19 09:06:55 +00:00
Jakob Ackermann
69a7927267 [clsi] shard clsi_compiles_total metric by syncType (#32255)
GitOrigin-RevId: 43111697323ec6697ef5f42cf17807ea564181a0
2026-03-19 09:05:55 +00:00
Jakob Ackermann
c2130dccb9 [clsi] use cheapest gzip compression level for history snapshot (#32251)
memoir manual with 1.5MiB snapshot:

level |load/decompress time | store/compress time |  size   | ratio | total sync time
 ---  | ---                 | ---                 |  ---    | ---   | ---
 6    | 18ms                | 57ms                |  412KiB | 26%   | 88ms
 1    | 17ms                | 28ms                |  509KiB | 32%   | 53ms
 0    |  8ms                | 10ms                | 1578KiB | 0%    | 33ms

total sync: read snapshot, walk dir, sync files to disk, save snapshot

GitOrigin-RevId: a2b1ee063af5aa749014f942db5e08bb1e685848
2026-03-19 09:05:50 +00:00
Jakob Ackermann
f947b549e4 [clsi-perf] migrate to compile from history mode (#32234)
* [clsi] only download history snapshot from clsi-cache when enabled

* [clsi-perf] migrate to compile from history mode

GitOrigin-RevId: 2dd54e032bd85d6335488741c039a5a1bd60090d
2026-03-18 09:07:51 +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
2e389c5a41 [rails] migrate compiles of conversions/submissions to history mode (#32053)
* [saas-e2e] test gallery templates with binary file

* [rails] add make target for fixing rubocop errors

* [rails] migrate compiles of conversions/submissions to history mode

* [rails] forward version to clsi request

* [rails] trim down compile request

* [saas-e2e] source v1 secrets after make install

GitOrigin-RevId: 65269e1df1051c9f3b4f1813d2e9dcf32a01be50
2026-03-18 09:07:22 +00:00
Jakob Ackermann
d5b55b831d [clsi] make last access tracking more robust (#32192)
* [clsi] do not overwrite last access during initial scan

* [clsi] cleanup submission cache 5-10min after startup

* [clsi] address review comments

GitOrigin-RevId: e03beec1b3deaee50629ada72b0242a8a2b2ae66
2026-03-18 09:07:10 +00:00
Jakob Ackermann
a9c413857a [clsi] avoid destroying containers of recently accessed projects (#32186)
* [clsi] avoid destroying containers of recently accessed projects

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>

* [clsi] gracefully handle missing access time during container cleanup

* [clsi] fix cyclic import

---------

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>
GitOrigin-RevId: 8195b6fccbe26d2fd673d38356af5d44cf4042a3
2026-03-18 09:07:01 +00:00
Daniel Kontsek
e60ac573bc [clsi] fix nginx regex for submission IDs with uppercase characters
GitOrigin-RevId: 28d85ebcf5abdb146d2fe8886039d0da0af08d53
2026-03-13 09:05:39 +00:00
Alf Eaton
f605a337aa Add with-texlive target to clsi Dockerfile (#31625)
GitOrigin-RevId: f2a971c761f09974921bf043e1f4959c63107dd8
2026-03-06 09:16:47 +00:00
Jakob Ackermann
bb3e1286db [clsi] parse env var for download concurrency as int (#31959)
GitOrigin-RevId: dbd91315318e385d691a6b59efeb3bf22f559fa2
2026-03-06 09:12:25 +00:00
Jakob Ackermann
81b7121408 [clsi] initial implementation of compile from history (#31883)
* [clsi] initial implementation of compile from history

* [clsi] copy changes

* [saas-e2e] extend test case with nested folder

* [saas-e2e] add test case for tracked changes

* [web] fix accumulating changes from multiple chunks

* [web] optimize size check for compile request payload

* [clsi] deduplicate globalBlobs

* [clsi] add validation for request body details

* [clsi] add metrics for compile from history

* [clsi] download binary files concurrently

* [clsi] skip download of empty file blob

* [clsi] break down e2e compile time metric by compileFromHistory

GitOrigin-RevId: 0dadef93e89d8a172c35cb130a1042d9d1bec42a
2026-03-06 09:12:07 +00:00
Andrew Rumble
5723a9589a Merge pull request #31567 from overleaf/ar-fb/handle-clsi-timeout-better
[clsi-lb,v1,clsi,web] handle clsi timeout better

GitOrigin-RevId: 86aa1e01b8cb465b8b9332e17fb97c21849d0489
2026-03-06 09:12:02 +00:00
Andrew Rumble
16cc4026a0 Merge pull request #30890 from overleaf/ar/code-coverage-e2e
[monorepo] code coverage e2e

GitOrigin-RevId: cfdef9e6b485831bd34847f7b7af13d39c18c3e6
2026-03-06 09:10:56 +00:00
Jakob Ackermann
eca31afb4a [clsi] remove unused endpoints for downloading output files (#31692)
GitOrigin-RevId: a0cac10f3585414779b026f38c2af2773c80082f
2026-03-06 09:06:33 +00:00
Jakob Ackermann
9731f061af [monorepo] remove unused firejail profiles (#31790)
GitOrigin-RevId: ba4bac748014d5edf0cf2815af295c573502f144
2026-03-06 09:06:22 +00:00
Jakob Ackermann
6c6e8d9a97 [monorepo] switch all output file reads to clsi-nginx (#31691)
* [monorepo] switch all output file reads to clsi-nginx

* [clsi-lb] allow gallery download requests

* [terraform] clsi: use nginx.conf from clsi service

* [clsi] fix flakey tests

* [clsi] replace alias with rewrite and root in nginx config

* [k8s] clsi-lb: expose download port on internal service

* [web] add explicit endpoint for downloading all output files

Serve the output.zip endpoint from clsi.

* [clsi] fix regex for latexqc submission ids

Previously, we only handled template submission ids.

GitOrigin-RevId: 6c3b21b01ec41ae767530b14aac31fbe3d640dd5
2026-02-24 09:07:12 +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
Brian Gough
f3e8601cba fix caching of minted output files in TL2025 (#31455)
GitOrigin-RevId: b82df4d9c7898332b310fd956c5f002bf5b20e39
2026-02-11 09:06:14 +00:00
Jakob Ackermann
c5bc4a1259 [clsi] tweak logging for clsi-cache (#31452)
* [clsi] tweak logging for clsi-cache

- Use `clsi-cache` identifier on log line
- Add shard to context
- Record nFiles on "too many entries for tar" error

* [clsi] do not trip clsi-cache circuit breaker on ENOENT errors

These can happen when an output/compile-dir is purged while we download
files.

GitOrigin-RevId: ffa73ef312bce5232ef72e3b81966bb6e14d2255
2026-02-11 09:06:09 +00:00