You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Downloads build outputsfor packages in the workspace from a remote cache service to the local Lake {tech (key:="local cache")}[artifact cache].
1173
1186
The cache service used can be specified via the {lakeOpt}`--service` option.
1174
1187
Otherwise, Lake will use the system default, or, if none is configured, Reservoir.
1175
1188
See {lake}`cache services` for more information on how to configure services.
1176
1189
1177
-
If an input-to-outputs {lakeMeta}`mappings` file, a {lakeMeta}`remote-scope`, or a {lakeMeta}`github-repo` is provided, Lake will download artifactsfor the root package.
1178
-
Otherwise, it will download artifactsfor each package in the root's dependency tree in order (using Reservoir).
1190
+
If an input-to-outputs {lakeMeta}`mappings` file, a {lakeMeta}`remote-scope`, or a {lakeMeta}`github-repo` is provided, Lake will download build outputsfor the root package.
1191
+
Otherwise, it will download outputsfor each package in the root's dependency tree in order (using Reservoir).
1179
1192
Non-Reservoir dependencies will be skipped.
1180
1193
1181
-
For Reservoir, setting {lakeOpt}`--repo` will make Lake lookup artifacts for the root package by a repository name, rather than the package's.
1182
-
This can be used to download artifactsfor a fork of the Reservoir package (if such artifacts are available).
1194
+
For Reservoir, setting {lakeOpt}`--repo` will cause Lake to look up outputs for the root package by a repository name, rather than the package's.
1195
+
This can be used to download outputsfor a fork of the Reservoir package (if such artifacts are available).
1183
1196
The {lakeOpt}`--platform` and {lakeOpt}`--toolchain` options can be used to download artifacts for a different platform/toolchain configuration than Lake detects.
1184
1197
For a custom endpoint, the full prefix Lake uses can be set via {lakeOpt}`--scope`.
1185
1198
@@ -1188,22 +1201,26 @@ Lake will download the artifacts for the most recent commit with available mappi
1188
1201
It will backtrack up to {lakeOptDef option}`--max-revs`, which defaults to 100.
1189
1202
If set to 0, Lake will search the repository's whole history, or as far back as Git will allow.
1190
1203
1204
+
By default, Lake will download both the input-to-output mappings and the output artifacts for packages.
1205
+
Using {lakeOptDef option}`--mappings-only` will cause Lake to only download the mappings and delay downloading artifacts until they are needed.
1206
+
Using {lakeOptDef option}`--force-download` will redownload existing files.
1207
+
1191
1208
While downloading, Lake will continue on when a download for an artifact fails or if the download process for a whole package fails.
1192
1209
However, it will report this and exit with a nonzero status code in such cases.
1193
1210
:::
1194
1211
1195
1212
1196
1213
```lakeCacheHelp put
1197
-
Upload artifactsfrom the Lake cache to a remote service
1214
+
Upload build outputsfrom the Lake cache to a remote service
1198
1215
1199
1216
USAGE:
1200
1217
lake cache put <mappings> <scope-option>
1201
1218
1202
-
Uploads the input-to-outputs mappings contained in the specified file along
1219
+
Uploads the input-to-output mappings contained in the specified file along
1203
1220
with the corresponding output artifacts to a remote cache. The cache service
1204
-
used via be specified via `--service` option. If not specifed, Lake will used
1205
-
the system default, or error if none is configured. See `lake cache services`
1206
-
for more information on how to configure services.
1221
+
used can be specified via the `--service` option. If not specified, Lake will use
1222
+
the system default, or error if none is configured. See the help page of
1223
+
`lake cache services` for more information on how to configure services.
1207
1224
1208
1225
Files are uploaded using the AWS Signature Version 4 authentication protocol
1209
1226
via `curl`. Thus, the service should generally be an S3-compatible bucket. The
@@ -1269,6 +1286,40 @@ The mappings file is uploaded to the revision endpoint with a file name derived
1269
1286
As such, the command will warn if the work tree currently has changes.
1270
1287
::::
1271
1288
1289
+
```lakeCacheHelp add
1290
+
Add input-to-output mappings to the Lake cache
1291
+
1292
+
USAGE:
1293
+
lake cache add <mappings>
1294
+
1295
+
OPTIONS:
1296
+
--service=<name> cache service to fetch from on demand
1297
+
--scope=<remote-scope> the prefix of artifacts within the service
1298
+
--repo=<github-repo> for Reservoir, a GitHub repository scope
1299
+
1300
+
Reads a list of input-to-output mapppings from the provided file and adds
1301
+
them to the local Lake cache. If `--service` is provided, the output artifacts
1302
+
can then be fetched lazily from that service during a Lake build. The service
1303
+
must either be `reservoir` or be configured through the Lake system
1304
+
configuration (see the help page of `lake cache services` for details).
1305
+
1306
+
Since Lake does not currently use cryptographically secure hashes for
1307
+
artifacts and outputs, artifacts in a cache service are prefixed with a scope
1308
+
to avoid clashes. For Reservoir, this scope can either be a package (set via
1309
+
`--scope`) or a repository (set via `--repo`). For S3 services, both options
Reads a list of input-to-output mappings from the provided file and adds them to the local Lake cache.
1315
+
If {lakeOpt}`--service` is provided, the output artifacts can then be fetched lazily from that service during a Lake build.
1316
+
The service must either be `reservoir` or be configured through the Lake system configuration (see {lake}`cache services` for details).
1317
+
1318
+
Since Lake does not currently use cryptographically secure hashes for artifacts and outputs, artifacts in a cache service are prefixed with a scope to avoid clashes.
1319
+
For Reservoir, this scope can either be a package (set via {lakeOpt}`--scope`) or a repository (set via {lakeOpt}`--repo`).
1320
+
For S3 services, both options are synonymous.
1321
+
::::
1322
+
1272
1323
```lakeCacheHelp clean
1273
1324
Removes ALL files from the local Lake cache
1274
1325
@@ -1331,6 +1382,70 @@ If no `cache.defaultService` is configured, Lake will use Reservoir by default.
1331
1382
:::
1332
1383
::::
1333
1384
1385
+
```lakeCacheHelp stage
1386
+
Copy build outputs from the cache to a staging directory
1387
+
1388
+
USAGE:
1389
+
lake cache stage <mappings> <staging-directory>
1390
+
1391
+
Creates the staging directory and copies the mappings file to it. Then, it
1392
+
copies all artifacts described within the mappings file from the cache to the
1393
+
staging directory. Errors if any of the artifacts described cannot be found in
0 commit comments