Skip to content

Substitute the realisations from the remote caches #4493

Open
@thufschmitt

Description

Follow-up of #4238 (and more precisely #4238 (comment))

Is your feature request related to a problem? Please describe.

When building a CA derivation drv0, the first thing we do (once we tried and failed substituting it) is to resolve it, which requires fetching/building all its inputs.
However, it might be that the remote cache knows about resolved(drv0), in which case we can substitute it, and all the inputs that we've downloaded are never used (except for the ones which are in the runtime closure ofc).
But we can only know that once we've resolved the derivation. And to resolve the derivation we need to know the output mappings for all its inputs, which currently requires fetching them.

Describe the solution you'd like

We should be able to ask the remote store for the path associated to a given derivation output without fetching that path.

(Note that to ensure consistency, we shouldn't register that mapping in the db, it would only be used during the resolution step)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ca-derivationsDerivations with content addressed outputs

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions