While it is still impossible to reliably determine the expected contents of these status files, this checks their nature for expected substitution behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This change introduces a new fast path for FloodArtifact. It is taken when a curing artifact has identical-by-content controlled relevant inputs and are otherwise identical to an already-cured artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This avoids disabling the artifact when using the individual cancel method. Unfortunately this makes the method blocking.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This is cleaner than checking cpu count during cure, it is impossible to avoid impurity in both situations but this is configurable.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This is quite error-prone and causes cache inconsistency similar to the store inconsistency seen on nix when a similar condition happens. Keep this behind a flag in case it is ever beneficial.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This should hopefully provide good separation between the artifact curing backend implementation and the (still work in progress) language. Making the IR parseable also guarantees uniqueness of the representation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This also rearranges the ident ir to be more predictable, and avoids an obvious and somewhat easy to get into inconsistent state.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Any fine-grained file-based locking here significantly hurts performance and is not part of the use case of the package. This change guarantees exclusive access to prevent inconsistent state on the filesystem.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This significantly improves scrubbing performance. Since the cache directory structure is friendly to simultaneous access, this is possible without synchronisation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This eliminates duplicate identifier computations. The new implementation also significantly reduces allocations while computing identifier for a large dependency tree.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This imposes a hard upper limit to concurrency during dependency satisfaction and moves all dependency-related code out of individual implementations of Artifact. This change also includes ctx and msg as part of Cache.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This runs a program in a container environment. Artifacts can be made available to the container, they are cured concurrently and mounted in order.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This change adds a method to check on-disk cache consistency and destroy inconsistent entries as they are encountered. This primarily helps verify artifact implementation correctness, but can also repair a cache that got into an inconsistent state from curing a misbehaving artifact, without having to destroy the entire cache.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This makes the checksum consistent with the final resting state of artifact directories without incurring the cost of an extra pair of chown syscalls.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This allows for more flexibility during implementation. The use case that required this was for expanding single directory tarballs.
Signed-off-by: Ophestra <cat@gensokyo.uk>