Skip to content

πŸ“¦οΈ(docker) keep the yarn cache out of the node images - #2992

Merged
lunika merged 1 commit into
mainfrom
improvement/frontend-image
Nov 13, 2026
Merged

lunika merged 1 commit into
mainfrom
improvement/frontend-image

Conversation

@lunika

@lunika lunika commented Nov 10, 2026

Copy link
Copy Markdown
Member

Purpose

yarn 1 keeps every downloaded tarball in /usr/local/share/.cache/yarn and nothing removed it, so each yarn install layer carried a second copy of the dependencies: 4.2 GB in the frontend-development image, close to 1 GB in the y-provider and yhub ones, and the y-provider production image shipped it too.

The installs now use a BuildKit cache mount, as the backend image already does for uv: the cache stays out of the layers and is still reused between local builds. It is locked because compose builds the images in parallel and concurrent yarn 1 installs can corrupt a shared cache.

frontend-development goes from 9.25 GB to 2.63 GB, y-provider-development from 2.28 GB to 753 MB, yhub-development from 2.19 GB to 814 MB and the y-provider production image from 812 MB to 463 MB.

Proposal

  • πŸ“¦οΈ(docker) keep the yarn cache out of the node images

@lunika
lunika requested a review from AntoLC November 10, 2026 16:29
@lunika lunika self-assigned this Nov 10, 2026
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change β†’

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Docker dependency-install steps now mount Yarn’s download cache as a locked BuildKit cache. Existing install commands and their frozen-lockfile and production options remain unchanged. The Unreleased changelog notes that the Yarn cache is kept out of Node images.

Estimated code review effort: 2 (Simple) | ~8 minutes

Suggested reviewers: roeesivan

Merge Risk: Minimal Β· up to 25609

This change shrinks Node image sizes by keeping the Yarn download cache out of image layers. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: keeping the Yarn cache out of the Node images. The changeset moves the Yarn 1 download cache into a locked BuildKit cache mount in each Node-based Dockerfile, which ke…
Description check Passed The description states the purpose of the change. It explains that Yarn 1 stored a duplicate copy of the dependencies in each install layer. It describes the BuildKit cache mount and its locking, and …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: keeping the Yarn cache out of the Node images. The changeset moves the Yarn 1 download cache into a locked BuildKit cache mount in each Node-based Dockerfile, which keeps it out of the image layers. The title is short, specific, and matches the changes. The emoji prefix is a repository convention and does not make the title unclear.

Full details: Description check

Explanation

The description states the purpose of the change. It explains that Yarn 1 stored a duplicate copy of the dependencies in each install layer. It describes the BuildKit cache mount and its locking, and it gives image-size results for each affected image. This relates directly to the Dockerfile changes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix Β· Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 39d8a4ea-77a0-4b39-94fc-11254b8ce49b
Commits

Reviewing files that changed from the base of the PR and between 63be438 and 256090e.

Files selected for processing: 1

  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@lunika
lunika force-pushed the improvement/frontend-image branch from b465909 to a1723b8 Compare November 12, 2026 10:06
@lunika
lunika enabled auto-merge (squash) November 12, 2026 10:06
@lunika
lunika force-pushed the improvement/frontend-image branch from a1723b8 to 63be438 Compare November 12, 2026 10:27
yarn 1 keeps every downloaded tarball in /usr/local/share/.cache/yarn
and nothing removed it, so each yarn install layer carried a second copy
of the dependencies: 4.2 GB in the frontend-development image, close to
1 GB in the y-provider and yhub ones, and the y-provider production
image shipped it too.

The installs now use a BuildKit cache mount, as the backend image
already does for uv: the cache stays out of the layers and is still
reused between local builds. It is locked because compose builds the
images in parallel and concurrent yarn 1 installs can corrupt a shared
cache.

frontend-development goes from 9.25 GB to 2.63 GB, y-provider-development
from 2.28 GB to 753 MB, yhub-development from 2.19 GB to 814 MB and the
y-provider production image from 812 MB to 463 MB.

Signed-off-by: Manuel Raynaud <[email protected]>
@lunika
lunika force-pushed the improvement/frontend-image branch from 63be438 to 256090e Compare November 13, 2026 13:37
@lunika
lunika merged commit 256090e into main Nov 13, 2026
51 checks passed
@lunika
lunika deleted the improvement/frontend-image branch November 13, 2026 13:43
lunika added a commit that referenced this pull request Nov 24, 2026
Added

- ✨(yhub) expose whether valkey accepts writes as a metric #3035
- ✨(yhub) size and bound the compute pool: threads, queue, heap per thread
  #3040
- ✨(frontend) paste a link to a doc on a text to make it an interlink #3004
- πŸ”§(backend) make NUM_PROXIES configurable for the throttles #3005

Changed

- πŸ“¦οΈ(docker) keep the yarn cache out of the node images #2992
- πŸ”§(yhub) SENTRY_PROFILES_SAMPLE_RATE samples processes since sentry 11 #2872
- ⚑️(backend) probe the celery worker with heartbeat files,
  not inspect ping #2956
- πŸ’„(frontend) redesign offline error page #2808
- πŸ›‚(frontend) allow asking for access from a sub-document page #2994
- πŸ”’οΈ(backend) require an editor access on the tree to create a child document,
  a link definition alone is not enough anymore #3031

Fixed

- πŸ›(ci) scan on the trivy label in a workflow of its own, adding a label
  hid the required docker checks #3064
- πŸ›(frontend) keep the column layout when uploading a file in a column #3010
- πŸ›(frontend) resume the analysis of an image nested in a column #3010
- πŸ›(frontend) stop the right panel from covering the doc header actions #3037
- βœ…(frontend) fix act warnings in the tests and fail on them #2983
- πŸ”’οΈ(backend) never lower an existing role when accepting a request #2982
- πŸ›(backend) delete the access requests a role given another way covers #2982
- πŸ—ƒοΈ(backend) delete the stored access requests a role already covers #2982
- πŸ›(frontend) show an error when approving an access request fails #2982
- πŸ”’οΈ(backend) refuse to change the email of an invitation #2986
- πŸ›(backend) count the ancestors in the rights on invitations #2986
- πŸ”’οΈ(backend) only let owners update or delete an owner invitation #2986
- πŸ›(frontend) follow the abilities of an invitation in the share dialog #2986
- πŸ›(frontend) keep comments on inline nodes after a reload #2898
- πŸ›(frontend) let the checkboxes of the tree root modals be unchecked #3015
- πŸ”’οΈ(backend) match emails in a single normalized form #3017
- πŸ›(backend) ask for access to the top parent doc from a sub-document #2994
- πŸ”’οΈ(backend) require the owner role to move a document out of its tree #2978
- πŸ›(backend) speed up the reconciliation admin with user autocompletes #3013
- πŸ›(frontend) show right-to-left text from the right in the editor #2919
- πŸ›(yhub) report unready when valkey only accepts reads #3035
- πŸ›(yhub) restart when valkey turns read-only after a failover #3035
- πŸ›(frontend) hide the sub-doc creation entries without children_create #3031
- πŸ”’οΈ(backend) duplicate a sub doc in its parent only with rights on it #2979
- πŸ›(frontend) add the copy of a sub doc to the tree only if it lands
  there #2979
- πŸ›(backend) name users without an email instead of returning a 500 #2943
- πŸ›(frontend) show an error page when the current user cannot be loaded #2943
- πŸ›(frontend) pick a mention with a click in the comments sidebar #3055
- πŸ›(backend) stop throttling the config endpoint #3005
- πŸ›(backend) throttle anonymous users per browser, not per IP address #3005

Signed-off-by: Manuel Raynaud <[email protected]>
lunika added a commit that referenced this pull request Nov 24, 2026
Added

- ✨(yhub) expose whether valkey accepts writes as a metric #3035
- ✨(yhub) size and bound the compute pool: threads, queue, heap per thread
  #3040
- ✨(frontend) paste a link to a doc on a text to make it an interlink #3004
- πŸ”§(backend) make NUM_PROXIES configurable for the throttles #3005

Changed

- πŸ“¦οΈ(docker) keep the yarn cache out of the node images #2992
- πŸ”§(yhub) SENTRY_PROFILES_SAMPLE_RATE samples processes since sentry 11 #2872
- ⚑️(backend) probe the celery worker with heartbeat files,
  not inspect ping #2956
- πŸ’„(frontend) redesign offline error page #2808
- πŸ›‚(frontend) allow asking for access from a sub-document page #2994
- πŸ”’οΈ(backend) require an editor access on the tree to create a child document,
  a link definition alone is not enough anymore #3031

Fixed

- πŸ›(ci) scan on the trivy label in a workflow of its own, adding a label
  hid the required docker checks #3064
- πŸ›(frontend) keep the column layout when uploading a file in a column #3010
- πŸ›(frontend) resume the analysis of an image nested in a column #3010
- πŸ›(frontend) stop the right panel from covering the doc header actions #3037
- βœ…(frontend) fix act warnings in the tests and fail on them #2983
- πŸ”’οΈ(backend) never lower an existing role when accepting a request #2982
- πŸ›(backend) delete the access requests a role given another way covers #2982
- πŸ—ƒοΈ(backend) delete the stored access requests a role already covers #2982
- πŸ›(frontend) show an error when approving an access request fails #2982
- πŸ”’οΈ(backend) refuse to change the email of an invitation #2986
- πŸ›(backend) count the ancestors in the rights on invitations #2986
- πŸ”’οΈ(backend) only let owners update or delete an owner invitation #2986
- πŸ›(frontend) follow the abilities of an invitation in the share dialog #2986
- πŸ›(frontend) keep comments on inline nodes after a reload #2898
- πŸ›(frontend) let the checkboxes of the tree root modals be unchecked #3015
- πŸ”’οΈ(backend) match emails in a single normalized form #3017
- πŸ›(backend) ask for access to the top parent doc from a sub-document #2994
- πŸ”’οΈ(backend) require the owner role to move a document out of its tree #2978
- πŸ›(backend) speed up the reconciliation admin with user autocompletes #3013
- πŸ›(frontend) show right-to-left text from the right in the editor #2919
- πŸ›(yhub) report unready when valkey only accepts reads #3035
- πŸ›(yhub) restart when valkey turns read-only after a failover #3035
- πŸ›(frontend) hide the sub-doc creation entries without children_create #3031
- πŸ”’οΈ(backend) duplicate a sub doc in its parent only with rights on it #2979
- πŸ›(frontend) add the copy of a sub doc to the tree only if it lands
  there #2979
- πŸ›(backend) name users without an email instead of returning a 500 #2943
- πŸ›(frontend) show an error page when the current user cannot be loaded #2943
- πŸ›(frontend) pick a mention with a click in the comments sidebar #3055
- πŸ›(backend) stop throttling the config endpoint #3005
- πŸ›(backend) throttle anonymous users per browser, not per IP address #3005

Signed-off-by: Manuel Raynaud <[email protected]>
lunika added a commit that referenced this pull request Nov 26, 2026
Added

- ✨(yhub) expose whether valkey accepts writes as a metric #3035
- ✨(yhub) size and bound the compute pool: threads, queue, heap per thread
  #3040
- ✨(frontend) paste a link to a doc on a text to make it an interlink #3004
- πŸ”§(backend) make NUM_PROXIES configurable for the throttles #3005

Changed

- πŸ“¦οΈ(docker) keep the yarn cache out of the node images #2992
- πŸ”§(yhub) SENTRY_PROFILES_SAMPLE_RATE samples processes since sentry 11 #2872
- ⚑️(backend) probe the celery worker with heartbeat files,
  not inspect ping #2956
- πŸ’„(frontend) redesign offline error page #2808
- πŸ›‚(frontend) allow asking for access from a sub-document page #2994
- πŸ”’οΈ(backend) require an editor access on the tree to create a child document,
  a link definition alone is not enough anymore #3031

Fixed

- πŸ›(ci) scan on the trivy label in a workflow of its own, adding a label
  hid the required docker checks #3064
- πŸ›(frontend) keep the column layout when uploading a file in a column #3010
- πŸ›(frontend) resume the analysis of an image nested in a column #3010
- πŸ›(frontend) stop the right panel from covering the doc header actions #3037
- βœ…(frontend) fix act warnings in the tests and fail on them #2983
- πŸ”’οΈ(backend) never lower an existing role when accepting a request #2982
- πŸ›(backend) delete the access requests a role given another way covers #2982
- πŸ—ƒοΈ(backend) delete the stored access requests a role already covers #2982
- πŸ›(frontend) show an error when approving an access request fails #2982
- πŸ”’οΈ(backend) refuse to change the email of an invitation #2986
- πŸ›(backend) count the ancestors in the rights on invitations #2986
- πŸ”’οΈ(backend) only let owners update or delete an owner invitation #2986
- πŸ›(frontend) follow the abilities of an invitation in the share dialog #2986
- πŸ›(frontend) keep comments on inline nodes after a reload #2898
- πŸ›(frontend) let the checkboxes of the tree root modals be unchecked #3015
- πŸ”’οΈ(backend) match emails in a single normalized form #3017
- πŸ›(backend) ask for access to the top parent doc from a sub-document #2994
- πŸ”’οΈ(backend) require the owner role to move a document out of its tree #2978
- πŸ›(backend) speed up the reconciliation admin with user autocompletes #3013
- πŸ›(frontend) show right-to-left text from the right in the editor #2919
- πŸ›(yhub) report unready when valkey only accepts reads #3035
- πŸ›(yhub) restart when valkey turns read-only after a failover #3035
- πŸ›(frontend) hide the sub-doc creation entries without children_create #3031
- πŸ”’οΈ(backend) duplicate a sub doc in its parent only with rights on it #2979
- πŸ›(frontend) add the copy of a sub doc to the tree only if it lands
  there #2979
- πŸ›(backend) name users without an email instead of returning a 500 #2943
- πŸ›(frontend) show an error page when the current user cannot be loaded #2943
- πŸ›(frontend) pick a mention with a click in the comments sidebar #3055
- πŸ›(backend) stop throttling the config endpoint #3005
- πŸ›(backend) throttle anonymous users per browser, not per IP address #3005

Signed-off-by: Manuel Raynaud <[email protected]>
lunika added a commit that referenced this pull request Nov 26, 2026
Added

- ✨(yhub) expose whether valkey accepts writes as a metric #3035
- ✨(yhub) size and bound the compute pool: threads, queue, heap per thread
  #3040
- ✨(frontend) paste a link to a doc on a text to make it an interlink #3004
- πŸ”§(backend) make NUM_PROXIES configurable for the throttles #3005

Changed

- πŸ“¦οΈ(docker) keep the yarn cache out of the node images #2992
- πŸ”§(yhub) SENTRY_PROFILES_SAMPLE_RATE samples processes since sentry 11 #2872
- ⚑️(backend) probe the celery worker with heartbeat files,
  not inspect ping #2956
- πŸ’„(frontend) redesign offline error page #2808
- πŸ›‚(frontend) allow asking for access from a sub-document page #2994
- πŸ”’οΈ(backend) require an editor access on the tree to create a child document,
  a link definition alone is not enough anymore #3031

Fixed

- πŸ›(ci) scan on the trivy label in a workflow of its own, adding a label
  hid the required docker checks #3064
- πŸ›(frontend) keep the column layout when uploading a file in a column #3010
- πŸ›(frontend) resume the analysis of an image nested in a column #3010
- πŸ›(frontend) stop the right panel from covering the doc header actions #3037
- βœ…(frontend) fix act warnings in the tests and fail on them #2983
- πŸ”’οΈ(backend) never lower an existing role when accepting a request #2982
- πŸ›(backend) delete the access requests a role given another way covers #2982
- πŸ—ƒοΈ(backend) delete the stored access requests a role already covers #2982
- πŸ›(frontend) show an error when approving an access request fails #2982
- πŸ”’οΈ(backend) refuse to change the email of an invitation #2986
- πŸ›(backend) count the ancestors in the rights on invitations #2986
- πŸ”’οΈ(backend) only let owners update or delete an owner invitation #2986
- πŸ›(frontend) follow the abilities of an invitation in the share dialog #2986
- πŸ›(frontend) keep comments on inline nodes after a reload #2898
- πŸ›(frontend) let the checkboxes of the tree root modals be unchecked #3015
- πŸ”’οΈ(backend) match emails in a single normalized form #3017
- πŸ›(backend) ask for access to the top parent doc from a sub-document #2994
- πŸ”’οΈ(backend) require the owner role to move a document out of its tree #2978
- πŸ›(backend) speed up the reconciliation admin with user autocompletes #3013
- πŸ›(frontend) show right-to-left text from the right in the editor #2919
- πŸ›(yhub) report unready when valkey only accepts reads #3035
- πŸ›(yhub) restart when valkey turns read-only after a failover #3035
- πŸ›(frontend) hide the sub-doc creation entries without children_create #3031
- πŸ”’οΈ(backend) duplicate a sub doc in its parent only with rights on it #2979
- πŸ›(frontend) add the copy of a sub doc to the tree only if it lands
  there #2979
- πŸ›(backend) name users without an email instead of returning a 500 #2943
- πŸ›(frontend) show an error page when the current user cannot be loaded #2943
- πŸ›(frontend) pick a mention with a click in the comments sidebar #3055
- πŸ›(backend) stop throttling the config endpoint #3005
- πŸ›(backend) throttle anonymous users per browser, not per IP address #3005

Signed-off-by: Manuel Raynaud <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants