-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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): allow partially resetting workspace #23381
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 571443e. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 5 targets
Sent with 💌 from NxCloud. |
e8c03a6
to
ff7787c
Compare
ff7787c
to
2453d62
Compare
{ name: 'workspaceData', message: 'Workspace Data' }, | ||
], | ||
footer: 'Press <space> to select, <return> to submit.', | ||
indicator(state, choice) { |
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 is cool. Let's change the indicator in other places.
But when I reset, I don't want to be bothered by a prompt. I just want things reset.
We can keep the granularity flags but let's get rid of the prompt.
2453d62
to
5bcd325
Compare
5bcd325
to
b538632
Compare
9c45bce
to
9b6e15b
Compare
9b6e15b
to
e51379a
Compare
5cb32a5
to
fb77b60
Compare
fb77b60
to
e5ae718
Compare
docs/generated/cli/reset.md
Outdated
Clears all the cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon: | ||
|
||
```shell | ||
nx reset --all |
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.
Remove the --all
flag
docs/generated/cli/reset.md
Outdated
Clears the Nx Cache directory. This will remove all local cache entries for tasks, but will not affect the remote cache: | ||
|
||
```shell | ||
nx reset --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.
Can we make this --only-cache
and --only-daemon
e5ae718
to
fac07fd
Compare
fac07fd
to
1e8c5d8
Compare
1e8c5d8
to
237d3d6
Compare
237d3d6
to
1f467d3
Compare
docs/generated/cli/reset.md
Outdated
@@ -1,11 +1,11 @@ | |||
--- | |||
title: 'reset - CLI command' | |||
description: 'Clears all the cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon.' | |||
description: 'Clears cached Nx artifacts and metadata about the workspace and shuts down the Nx onlyDaemon.' |
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 was unintentionally replaced. Please change it back.
docs/generated/cli/reset.md
Outdated
```shell | ||
nx reset | ||
``` | ||
|
||
Clears all the cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon: | ||
|
||
```shell | ||
nx reset | ||
``` |
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.
These are the same.
docs/generated/cli/reset.md
Outdated
|
||
Type: `boolean` | ||
|
||
Clears the Nx onlyCache directory. This will remove all local onlyCache entries for tasks, but will not affect the remote onlyCache. |
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 wording is off.
docs/generated/cli/reset.md
Outdated
|
||
Type: `boolean` | ||
|
||
Stops the Nx Daemon to reset its internal state. |
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 could be phrased better.. what about...
Stops the Nx Daemon, it will be restarted fresh when the next Nx command is run.
7d3f70c
to
e51fbe2
Compare
e51fbe2
to
6012bab
Compare
packages/nx/migrations.json
Outdated
"19-2-0-move-graph-cache-directory": { | ||
"cli": "nx", | ||
"version": "19.2.0-beta.2", | ||
"description": "Updates the default graph cache directory to .nx/workspace-data", |
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.
"description": "Updates the default graph cache directory to .nx/workspace-data", | |
"description": "Updates the default workspace data directory to .nx/workspace-data", |
packages/nx/migrations.json
Outdated
"cli": "nx", | ||
"version": "19.2.0-beta.2", | ||
"description": "Updates the default graph cache directory to .nx/workspace-data", | ||
"implementation": "./src/migrations/update-19-2-0/move-graph-cache-directory" |
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.
Change the name.
6012bab
to
571443e
Compare
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
nx reset
takes no options, and will always shut down the daemon as well as remove all local cache entries. This isn't great, because it means that the next task gets a full cold start when the user may have just needed to restart the daemon to clear up the issue they are facing.Expected Behavior
nx reset
allows users to pick what data is deleted.nx/workspace-data
is new project graph cache dirRelated Issue(s)
Fixes #