Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ inputs:
description: 'Indicates if node is set up for hybrid app'
required: false
default: 'false'
SEED_STICKY_DISKS:
description: |
'true' only in the seedStickyDisks workflow, which installs dependencies and nothing else.
Everywhere else the disks are mounted read-through so no job can persist build artifacts or
tool caches into the snapshot.
required: false
default: 'false'

outputs:
cache-hit:
Expand Down Expand Up @@ -36,20 +43,23 @@ runs:
with:
key: ${{ format('{0}-{1}-{2}-node-modules-{3}', github.repository, runner.os, runner.arch, inputs.IS_HYBRID_BUILD == 'true' && hashFiles('normalized-package-lock.json', 'patches/**', 'Mobile-Expensify/patches/**') || hashFiles('normalized-package-lock.json', 'patches/**')) }}
path: node_modules
commit: ${{ inputs.SEED_STICKY_DISKS == 'true' && 'if-missing' || 'false' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Rotate keys or replace existing snapshots

The pinned stickydisk action defines if-missing as committing only when no prior snapshot existed, so any already-bloated node_modules disk for the unchanged key will be mounted, treated as a hit via .stickydisk-installed, and then skipped by the seed instead of being replaced. Because regular consumers now use commit: false, those 30–100GB snapshots remain active as long as CI keeps mounting them; use a new key/version or a one-time delete/reseed path so existing contaminated disks are actually replaced.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we need to remove all the previous sticky disks using the Blacksmith panel when this PR hits main, since these disks are bloated and some of them reach 80 GB
сс: @mountiny

Screenshot 2026-08-13 at 13 42 12

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I can do that when we are ready


- id: stickydisk-old-dot-node-modules
if: steps.runner-info.outputs.use-sticky-disk == 'true' && inputs.IS_HYBRID_BUILD == 'true'
uses: useblacksmith/stickydisk@6d373c96a74cbde0c99fedc5ea5d3a7ba66ba494 # v1.4.0
with:
key: ${{ format('{0}-{1}-{2}-old-dot-node-modules-{3}', github.repository, runner.os, runner.arch, hashFiles('Mobile-Expensify/package-lock.json', 'Mobile-Expensify/patches/**')) }}
path: Mobile-Expensify/node_modules
commit: ${{ inputs.SEED_STICKY_DISKS == 'true' && 'if-missing' || 'false' }}

- id: stickydisk-npm
if: steps.runner-info.outputs.use-sticky-disk == 'true'
uses: useblacksmith/stickydisk@6d373c96a74cbde0c99fedc5ea5d3a7ba66ba494 # v1.4.0
with:
key: ${{ format('{0}-{1}-{2}-npm', github.repository, runner.os, runner.arch) }}
path: ~/.npm
commit: on-change

- id: cache-node-modules
if: steps.runner-info.outputs.use-sticky-disk != 'true'
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/seedStickyDisks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Seed sticky disks

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
seedStandalone:
name: Seed standalone node_modules
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout
uses: useblacksmith/checkout@1c9394c220d293645707b625ba9d79685f093a8f # v1

- name: Setup Node (seed)
uses: ./.github/actions/composite/setupNode
with:
SEED_STICKY_DISKS: 'true'

seedHybrid:
name: Seed hybrid node_modules
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout
uses: useblacksmith/checkout@1c9394c220d293645707b625ba9d79685f093a8f # v1
with:
submodules: true
token: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Setup Node (seed)
uses: ./.github/actions/composite/setupNode
with:
IS_HYBRID_BUILD: 'true'
SEED_STICKY_DISKS: 'true'
Loading