Skip to content

Commit c97d54b

Browse files
CammisuliFrozenPandaz
authored andcommitted
docs(core): add local cache information for powerpack (#29630)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Also includes update ENV variables ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes # (cherry picked from commit cad265d)
1 parent e1fbe37 commit c97d54b

File tree

11 files changed

+166
-42
lines changed

11 files changed

+166
-42
lines changed

docs/external-generated/packages-metadata.json

+1-11
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,7 @@
189189
}
190190
],
191191
"executors": [],
192-
"generators": [
193-
{
194-
"description": "Initialize the S3 Cache",
195-
"file": "external-generated/packages/powerpack-s3-cache/generators/init.json",
196-
"hidden": false,
197-
"name": "init",
198-
"originalFilePath": "/libs/nx-packages/powerpack-s3-cache/src/generators/init/schema.json",
199-
"path": "powerpack-s3-cache/generators/init",
200-
"type": "generator"
201-
}
202-
],
192+
"generators": [],
203193
"githubRoot": "https://github.com/nrwl/nx/blob/master",
204194
"name": "powerpack-s3-cache",
205195
"packageName": "@nx/powerpack-s3-cache",

docs/external-generated/packages/powerpack-azure-cache/documents/overview.md

+26
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,29 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `contain
8181
| --------------- | -------------------------------- |
8282
| **container** | The name of the container to use |
8383
| **accountName** | The name of blob storage account |
84+
85+
# Cache Modes
86+
87+
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
88+
89+
Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file.
90+
91+
```jsonc {% fileName="nx.json" %}
92+
{
93+
"azure": {
94+
// ...
95+
"localMode": "read-only"
96+
}
97+
}
98+
```
99+
100+
The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment.
101+
102+
```jsonc {% fileName="nx.json" %}
103+
{
104+
"azure": {
105+
// ...
106+
"ciMode": "read-only"
107+
}
108+
}
109+
```

docs/external-generated/packages/powerpack-gcs-cache/documents/overview.md

+26
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,29 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `bucket`
8080
| **Property** | **Description** |
8181
| ------------ | ----------------------------- |
8282
| **bucket** | The name of the bucket to use |
83+
84+
# Cache Modes
85+
86+
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
87+
88+
Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file.
89+
90+
```jsonc {% fileName="nx.json" %}
91+
{
92+
"gcs": {
93+
// ...
94+
"localMode": "read-only"
95+
}
96+
}
97+
```
98+
99+
The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment.
100+
101+
```jsonc {% fileName="nx.json" %}
102+
{
103+
"gcs": {
104+
// ...
105+
"ciMode": "read-only"
106+
}
107+
}
108+
```

docs/external-generated/packages/powerpack-s3-cache/documents/overview.md

+28
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,31 @@ Below is an example on how to connect to MinIO:
152152
| **endpoint** | The custom endpoint to upload artifacts to. If endpoint is not defined, the default AWS endpoint is used |
153153
| **accessKeyId** | AWS Access Key ID (optional if `AWS_ACCESS_KEY_ID` is set in the environment) |
154154
| **secretAccessKey** | AWS secret access key (optional if `AWS_SECRET_ACCESS_KEY` is set in the environment) |
155+
156+
# Cache Modes
157+
158+
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
159+
160+
Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file.
161+
162+
```jsonc {% fileName="nx.json" %}
163+
{
164+
"s3": {
165+
"region": "us-east-1",
166+
"bucket": "my-bucket",
167+
"localMode": "read-only"
168+
}
169+
}
170+
```
171+
172+
The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment.
173+
174+
```jsonc {% fileName="nx.json" %}
175+
{
176+
"s3": {
177+
"region": "us-east-1",
178+
"bucket": "my-bucket",
179+
"ciMode": "read-only"
180+
}
181+
}
182+
```

docs/generated/manifests/menus.json

-17
Original file line numberDiff line numberDiff line change
@@ -10980,23 +10980,6 @@
1098010980
],
1098110981
"isExternal": false,
1098210982
"disableCollapsible": false
10983-
},
10984-
{
10985-
"id": "generators",
10986-
"path": "/nx-api/powerpack-s3-cache/generators",
10987-
"name": "generators",
10988-
"children": [
10989-
{
10990-
"id": "init",
10991-
"path": "/nx-api/powerpack-s3-cache/generators/init",
10992-
"name": "init",
10993-
"children": [],
10994-
"isExternal": false,
10995-
"disableCollapsible": false
10996-
}
10997-
],
10998-
"isExternal": false,
10999-
"disableCollapsible": false
1100010983
}
1100110984
],
1100210985
"isExternal": false,

docs/generated/manifests/nx-api.json

+1-11
Original file line numberDiff line numberDiff line change
@@ -3868,17 +3868,7 @@
38683868
"root": "/libs/nx-packages/powerpack-s3-cache",
38693869
"source": "/libs/nx-packages/powerpack-s3-cache/src",
38703870
"executors": {},
3871-
"generators": {
3872-
"/nx-api/powerpack-s3-cache/generators/init": {
3873-
"description": "Initialize the S3 Cache",
3874-
"file": "external-generated/packages/powerpack-s3-cache/generators/init.json",
3875-
"hidden": false,
3876-
"name": "init",
3877-
"originalFilePath": "/libs/nx-packages/powerpack-s3-cache/src/generators/init/schema.json",
3878-
"path": "/nx-api/powerpack-s3-cache/generators/init",
3879-
"type": "generator"
3880-
}
3881-
},
3871+
"generators": {},
38823872
"path": "/nx-api/powerpack-s3-cache"
38833873
},
38843874
"powerpack-shared-fs-cache": {

docs/shared/packages/powerpack-azure-cache/powerpack-azure-cache-plugin.md

+26
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,29 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `contain
8181
| --------------- | -------------------------------- |
8282
| **container** | The name of the container to use |
8383
| **accountName** | The name of blob storage account |
84+
85+
# Cache Modes
86+
87+
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
88+
89+
Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file.
90+
91+
```jsonc {% fileName="nx.json" %}
92+
{
93+
"azure": {
94+
// ...
95+
"localMode": "read-only"
96+
}
97+
}
98+
```
99+
100+
The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment.
101+
102+
```jsonc {% fileName="nx.json" %}
103+
{
104+
"azure": {
105+
// ...
106+
"ciMode": "read-only"
107+
}
108+
}
109+
```

docs/shared/packages/powerpack-gcs-cache/powerpack-gcs-cache-plugin.md

+26
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,29 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `bucket`
8080
| **Property** | **Description** |
8181
| ------------ | ----------------------------- |
8282
| **bucket** | The name of the bucket to use |
83+
84+
# Cache Modes
85+
86+
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
87+
88+
Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file.
89+
90+
```jsonc {% fileName="nx.json" %}
91+
{
92+
"gcs": {
93+
// ...
94+
"localMode": "read-only"
95+
}
96+
}
97+
```
98+
99+
The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment.
100+
101+
```jsonc {% fileName="nx.json" %}
102+
{
103+
"gcs": {
104+
// ...
105+
"ciMode": "read-only"
106+
}
107+
}
108+
```

docs/shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin.md

+28
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,31 @@ Below is an example on how to connect to MinIO:
152152
| **endpoint** | The custom endpoint to upload artifacts to. If endpoint is not defined, the default AWS endpoint is used |
153153
| **accessKeyId** | AWS Access Key ID (optional if `AWS_ACCESS_KEY_ID` is set in the environment) |
154154
| **secretAccessKey** | AWS secret access key (optional if `AWS_SECRET_ACCESS_KEY` is set in the environment) |
155+
156+
# Cache Modes
157+
158+
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
159+
160+
Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file.
161+
162+
```jsonc {% fileName="nx.json" %}
163+
{
164+
"s3": {
165+
"region": "us-east-1",
166+
"bucket": "my-bucket",
167+
"localMode": "read-only"
168+
}
169+
}
170+
```
171+
172+
The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment.
173+
174+
```jsonc {% fileName="nx.json" %}
175+
{
176+
"s3": {
177+
"region": "us-east-1",
178+
"bucket": "my-bucket",
179+
"ciMode": "read-only"
180+
}
181+
}
182+
```

docs/shared/reference/environment-variables.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ The following environment variables are ones that you can set to change the beha
1717
| NX_WORKSPACE_DATA_DIRECTORY | string | The project graph cache and some other internal nx caches are stored in `.nx/workspace-data` by default. Set this variable to use a different directory. |
1818
| NX_PARALLEL | number | The number of tasks Nx should run in parallel. Overrides any configured value inside nx.json |
1919
| NX_RUNNER | string | The name of task runner from the config to use. Can be overridden on the command line with `--runner`. Not read if `NX_TASKS_RUNNER` is set. |
20-
| NX_SKIP_NX_CACHE | boolean | Rerun the tasks even when the results are available in the cache |
20+
| NX_SKIP_NX_CACHE | boolean | Rerun the tasks even when the results are available in the cache. |
21+
| NX_DISABLE_NX_CACHE | boolean | Rerun the tasks even when the results are available in the cache. |
22+
| NX_SKIP_REMOTE_CACHE | boolean | Disable all remote caching features. This means that the remote cache will not be read from or written to. Includes Nx Cloud and Powerpack Caches. |
23+
| NX_DISABLE_REMOTE_CACHE | boolean | Disable all remote caching features. This means that the remote cache will not be read from or written to. Includes Nx Cloud and Powerpack Caches. |
2124
| NX_TASKS_RUNNER | string | The name of task runner from the config to use. Can be overridden on the command line with `--runner`. Preferred over `NX_RUNNER`. |
2225
| NX_TASKS_RUNNER_DYNAMIC_OUTPUT | boolean | If set to `false`, will use non-dynamic terminal output strategy (what you see in CI), even when you terminal can support the dynamic version |
2326
| NX_VERBOSE_LOGGING | boolean | If set to `true`, will print debug information useful for troubleshooting |

docs/shared/reference/sitemap.md

-2
Original file line numberDiff line numberDiff line change
@@ -814,8 +814,6 @@
814814
- [powerpack-s3-cache](/nx-api/powerpack-s3-cache)
815815
- [documents](/nx-api/powerpack-s3-cache/documents)
816816
- [Overview](/nx-api/powerpack-s3-cache/documents/overview)
817-
- [generators](/nx-api/powerpack-s3-cache/generators)
818-
- [init](/nx-api/powerpack-s3-cache/generators/init)
819817
- [powerpack-shared-fs-cache](/nx-api/powerpack-shared-fs-cache)
820818
- [documents](/nx-api/powerpack-shared-fs-cache/documents)
821819
- [Overview](/nx-api/powerpack-shared-fs-cache/documents/overview)

0 commit comments

Comments
 (0)