Commit 258ce1f
fix: "Lint PR Title" job cache validation error (#2722)
## Problem
The "Lint PR Title" job in the PR workflow was consistently failing on
first run with the following error:
> Error: Path Validation Error: Path(s) specified in the action for
caching do(es) not exist, hence no cache is being saved.
After a rerun, the job would usually succeed, but this was annoying and
required manual intervention.
## Root Cause
The `lint-title` job uses the `microsoft-setup-toolchain` action, which
has `cache-npm-dependencies: yarn` enabled by default. This causes the
underlying `actions/setup-node` action to attempt to cache yarn
directories. However, the `lint-title` job never runs `yarn install` -
it only executes `npx @rnx-kit/[email protected]` to validate the PR
title.
Since the cache paths don't exist when the job runs for the first time
(before dependencies are installed), the cache action fails with a
validation error.
## Solution
Disabled caching for the `lint-title` job by setting
`cache-npm-dependencies: ''` in the setup-toolchain step. This is
appropriate because:
1. The job doesn't install any dependencies - it only uses `npx` to run
a single package
2. Caching provides no benefit for this job
3. This eliminates the cache path validation error
## Testing
- Verified the YAML syntax is valid
- The change is minimal and only affects the `lint-title` job
- Other jobs that need caching remain unchanged
Fixes #2403
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>"Lint PR Title" PR Job always fails</issue_title>
> <issue_description>The job always fails with the following error:
>
> > Error: Path Validation Error: Path(s) specified in the action for
caching do(es) not exist, hence no cache is being saved.
>
> After a rerun it usually succeeds. But it's quite annoying, and would
be nice to fix. </issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
Fixes #2721
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Saadnajmi <[email protected]>1 parent 2b2f679 commit 258ce1f
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments