-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): add support for skipping remote cache #29574
feat(core): add support for skipping remote cache #29574
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
View your CI Pipeline Execution ↗ for commit ac0f1a4.
☁️ Nx Cloud last updated this comment at |
@@ -90,6 +91,11 @@ export function withRunOptions<T>(yargs: Argv<T>): Argv<T & RunOptions> { | |||
type: 'boolean', | |||
default: false, | |||
}) | |||
.options('skipRemoteCache', { | |||
type: 'boolean', | |||
describe: 'Do not save cache results to the remote cache.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
describe: 'Do not save cache results to the remote cache.', | |
describe: 'Disables the remote cache.', |
@@ -75,6 +75,7 @@ export interface DefaultTasksRunnerOptions { | |||
lifeCycle: LifeCycle; | |||
captureStderr?: boolean; | |||
skipNxCache?: boolean; | |||
skipRemoteCache?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this too
d6a05be
to
c21f3e2
Compare
- Introduced `skipRemoteCache` option to bypass saving and reading from remote cache. - Updated command-line and configuration options to support `skipRemoteCache`. - Adjusted cache runner logic to handle `skipRemoteCache` flag and log warnings when remote cache is disabled.
2bcb3f5
to
025816c
Compare
skipNxCache?: boolean; | ||
disableRemoteCache?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for disable
vs skip
here? I feel like it should match with the --skip-nx-cache
flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I was discussing this with Jason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add aliases to support all.
// option
skipNxCache
disableNxCache
skipRemoteCache
disableRemoteCache
// env
SKIP_NX_CACHE
DISABLE_NX_CACHE
SKIP_REMOTE_CACHE
DISABLE_REMOTE_CACHE
output.warn({ | ||
title: 'Remote Cache Disabled', | ||
bodyLines: [ | ||
'Nx will continue running, but nothing will be written or read from the remote cache.', | ||
], | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle this in the old cache as well.
@@ -103,6 +103,7 @@ Print the task graph to the console: | |||
| `--parallel` | string | Max number of parallel processes [default is 3]. | | |||
| `--runner` | string | This is the name of the tasks runner configured in nx.json. | | |||
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) | | |||
| `--skipRemoteCache` | boolean | Disables the remote cache. (Default: `false`) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't show the different aliases? @isaacplmann can we update nx.dev to show all of the aliases here? 🤔
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #