aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg
AgeCommit message (Collapse)Author
2026-02-07internal/pkg: skip duplicate earlyOphestra
This significantly increases IR generation performance. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-05internal/pkg: standardise artifact IROphestra
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>
2026-02-03internal/pkg: improve error resolutionOphestra
This was taking way too long for early failures. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-29internal/pkg: set User-Agent headerOphestra
Avoid living under the default user agent and be at the mercy of some IDS. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27internal/pkg: allow multiarchOphestra
The armv8l busybox binary release needs this to run correctly. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27internal/pkg: encode checksum in identOphestra
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>
2026-01-27internal/pkg: exclusive artifactsOphestra
This alleviates scheduler overhead when curing many artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-26internal/pkg: close gzip reader on successOphestra
The Close method panics otherwise. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-26internal/pkg: absolute hard linkOphestra
This cannot be relative since the curing process is not in the temp directory. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-25internal/pkg: expose response bodyOphestra
This uses the new measured reader provided by Cache. This should make httpArtifact zero-copy. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-25internal/pkg: expose underlying readerOphestra
This will be fully implemented in httpArtifact in a future commit. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-24internal/pkg: block on implementation entryOphestra
This avoids blocking while not in Cure method of the implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-24internal/pkg: increase output buffer sizeOphestra
This avoids truncating unreasonably long lines from llvm. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-21internal/pkg: report dependency graph sizeOphestra
This is an interesting value to know when profiling. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-21internal/pkg: allow user namespace creationOphestra
No good reason to filter this in the execArtifact container, and the extended filter breaks certain programs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-19internal/pkg: make checksum available to cureOphestra
This enables deduplication by value as implemented in execArtifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-17internal/pkg: deduplicate dependency errorsOphestra
This significantly simplifies error reporting for caller. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-16internal/pkg: lock on-filesystem cacheOphestra
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>
2026-01-16internal/pkg: parallelise scrubOphestra
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>
2026-01-15internal/pkg: cache computed identifiersOphestra
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>
2026-01-14internal/pkg: optional dependency graph size limitOphestra
This provides a quick check against cyclic dependencies without hurting cure performance. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-13internal/pkg: zero atime and mtimeOphestra
This is significantly more practical than keeping track of them in directory flattening format and setting this in every non-artifact implementation. Only tarArtifact can have meaningful deterministic checksums that are not zero and zeroing them still keeps autotools happy. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-13internal/pkg: remove typeflag promotion loopOphestra
Expanding this enables sharing of code common between types. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-12internal/pkg: exec prefix verbose outputOphestra
This proxies program output through msg with a name and fd prefix. This also avoids introducing additional information to the container via process stdout/stderr. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-12internal/pkg: cure completion verbose messagesOphestra
This reports cure completions to the user. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-12internal/pkg: optionally named static fileOphestra
These are generally for generating configuration files or build scripts, naming them is quite useful. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-12internal/pkg: caller-supplied reporting name for execOphestra
This does not have a reasonable way of inferring the underlying name. For zero value it falls back to base of executable pathname. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-12internal/pkg: append user-facing name in messagesOphestra
This makes verbose messages much more useful. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-11internal/pkg: exec with specific timeoutOphestra
This change also updates the documentation of NewExec. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-11internal/pkg: do not discard the result of compactOphestra
This result was mistakenly unused resulting in incorrect identifiers for artifacts with duplicate dependencies. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-11internal/pkg: compare interfaces for host netOphestra
An upcoming improvement in the container init makes the current host net check return the same result for both cases. This change Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-09internal/pkg: pass context to file cureOphestra
This removes the left over embedded contexts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-09internal/pkg: move dependency flooding to cacheOphestra
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>
2026-01-08internal/pkg: use short wait delayOphestra
The cure is condemned at the point of cancellation and all of its state is destroyed by the deferred cleanup, so it makes little sense to wait for it much. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-08internal/pkg: use correct artifact countOphestra
This updates buffer sizes and counters to use correct total artifact count. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-08internal/pkg: place ephemeral upperdir in tmpOphestra
This enables the use of directories made writable this way as scratch space. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-08internal/pkg: support explicit overlay mountOphestra
This removes all but the /work/ auto overlay behaviour and enables much greater flexibility. This also renames ExecContainerPath to ExecPath so it is easier to type. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-08internal/pkg: set container WaitDelayOphestra
This prevents a container from blocking forever after context is canceled. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-08internal/pkg: make tar temporary directory writableOphestra
This allows it to be renamed to work directory. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-08internal/pkg: reserve kind rangeOphestra
This is useful for custom implementations of Artifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: do not connect stdinOphestra
This introduces external state when verbose. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: tar optional fileOphestra
This allows tar to take a single-file directory Artifact as input. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: return reader for filesOphestra
This improves efficiency for cache hits. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: support tarball compressed via bzip2Ophestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: reject entry types disallowed in the cacheOphestra
These are not encoded in the format, they are rejected here to serve as a check for cache since checksum is computed for every directory. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: automatic overlay mount on workOphestra
This directly submits the upperdir to cache. It is primarily used in bootstrapping where tools are limited and should not be used unless there is a very good reason to. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: respect mount order for overlay tempOphestra
Setting it up after everything else prevents covering files in /tmp. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: implement file artifactOphestra
This is an Artifact implementing File, backed by a constant, caller-supplied byte slice. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: fail on empty output directoryOphestra
This works around the fact that execArtifact always creates the work directory when setting up the bind mount. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: automatic overlay mount on tmpOphestra
This sets up the last Artifact to target /tmp as a writable overlay mount backed by the host side temp directory. This is useful for an Artifact containing source code to be built for another Artifact for example. Signed-off-by: Ophestra <cat@gensokyo.uk>