fix: lake: use --service w/ cache get <mappings> (#12640)
This PR fixes an oversight in #12490 where `--service` was not used for `cache get` with a mappings file.
This commit is contained in:
parent
aab4d64f25
commit
e7e3588c97
1 changed files with 9 additions and 4 deletions
|
|
@ -411,11 +411,16 @@ protected def get : CliM PUnit := do
|
|||
failure
|
||||
let some remoteScope := opts.scope?
|
||||
| error "to use `cache get` with a mappings file, `--scope` or `--repo` must be set"
|
||||
let service : CacheService :=
|
||||
if let some artifactEndpoint := ws.lakeEnv.cacheArtifactEndpoint? then
|
||||
.downloadArtsService artifactEndpoint ws.lakeEnv.cacheService?
|
||||
let service : CacheService ← id do
|
||||
if let some service := opts.service? then
|
||||
let some service := ws.findCacheService? service
|
||||
| error (serviceNotFound service ws.lakeConfig.config.cache.services)
|
||||
return service
|
||||
else if let some artifactEndpoint := ws.lakeEnv.cacheArtifactEndpoint? then
|
||||
logWarning endpointDeprecation
|
||||
return .downloadArtsService artifactEndpoint ws.lakeEnv.cacheService?
|
||||
else
|
||||
.reservoirService ws.lakeEnv.reservoirApiUrl
|
||||
return ws.defaultCacheService
|
||||
let map ← CacheMap.load file
|
||||
service.downloadOutputArtifacts map cache ws.root.cacheScope remoteScope opts.forceDownload
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue