Skip to content

fix(ci): use mounted pnpm store on ARC runners#1081

Merged
willgriffin merged 2 commits intomainfrom
codex/pnpm-store-dir-smrt
Mar 26, 2026
Merged

fix(ci): use mounted pnpm store on ARC runners#1081
willgriffin merged 2 commits intomainfrom
codex/pnpm-store-dir-smrt

Conversation

@willgriffin
Copy link
Copy Markdown
Contributor

Summary

  • configure pnpm to use the mounted ARC tmpfs store before resolving the cache path
  • keep dependency installs on the shared RAM-backed cache exposed by arc-happyvertical

Why

Live arc-happyvertical runners expose the persistent pnpm cache at /home/runner/.local/share/pnpm/store, but pnpm defaults to /home/runner/.pnpm-store/v10 unless store-dir is set explicitly. That means workflow installs miss the shared tmpfs cache and rebuild more work than necessary.

Copilot AI review requested due to automatic review settings March 26, 2026 16:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repo’s composite CI setup action to explicitly point pnpm at the ARC runner’s mounted/shared store directory so installs can reuse the RAM-backed cache instead of pnpm’s default per-job store path.

Changes:

  • Add a step to set pnpm store-dir before computing the store path used for caching.
  • Ensure the intended store root directory exists on the runner.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: |
store_root="${PNPM_STORE_DIR:-/home/runner/.local/share/pnpm/store}"
mkdir -p "$store_root"
pnpm config set store-dir "$store_root" --location=user
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

pnpm config set ... --location=user will typically write store-dir=... into the user-level .npmrc, which is also read by npm. This repo runs npm install later (e.g. docs install in the publish workflow), and modern npm emits warnings for unknown keys and may treat them as errors in a future major. Prefer scoping this pnpm-only setting to pnpm’s own config (e.g. --location=global so it writes to pnpm’s rc under XDG config), or set the store dir via an env/CLI flag so npm never sees store-dir in .npmrc.

Suggested change
pnpm config set store-dir "$store_root" --location=user
pnpm config set store-dir "$store_root" --location=global

Copilot uses AI. Check for mistakes.
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.

Addressed in f4e1ace1: this now uses --location=global, so the setting lands in pnpm's own config instead of npm's user rc.

NODE_OPTIONS: --disable-warning=DEP0169
NPM_TOKEN: ${{ inputs.auth-token }}
run: |
store_root="${PNPM_STORE_DIR:-/home/runner/.local/share/pnpm/store}"
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The default store path is hard-coded to /home/runner/.... Since this is a composite action (and the repo’s workflows may eventually run under a different user/home), it would be more robust to default to $HOME/.local/share/pnpm/store (still matching ARC runners) while keeping PNPM_STORE_DIR as the override.

Suggested change
store_root="${PNPM_STORE_DIR:-/home/runner/.local/share/pnpm/store}"
store_root="${PNPM_STORE_DIR:-$HOME/.local/share/pnpm/store}"

Copilot uses AI. Check for mistakes.
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.

Addressed in f4e1ace as well: the default store root now falls back to $HOME/.local/share/pnpm/store, while still allowing PNPM_STORE_DIR to override it.

@willgriffin willgriffin merged commit 8325dae into main Mar 26, 2026
11 of 12 checks passed
@willgriffin willgriffin deleted the codex/pnpm-store-dir-smrt branch March 26, 2026 16:32
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