summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-06-05GitCAS: Reduce log level where fatal not expectedPaul Cristian Sarbu
...and fix inconsistent capitalisation.
2025-06-05GitCAS: Ensure compliance with existing noexcept specifiersPaul Cristian Sarbu
Do not implicitly trust that the third-party code called in these methods is non-throwing and instead properly handle any exception that might arise.
2025-06-04directory_map: Correctly report fatal on failures to read from workspace rootsPaul Cristian Sarbu
2025-06-04Remove unneeded extra checks for upwards symlinksPaul Cristian Sarbu
2025-06-04Executor: Check validity of action outputs in compatible modePaul Cristian Sarbu
This ensures that any entries that the standard remote execution protocol accepts but are invalid in justbuild, i.e., upwards symlinks, are rejected. For this purpose, do not fail in the action response instances, just perform the check there, as all required information is available, and set a flag that the executor can check as needed.
2025-06-04{Local,Bazel}Response: Fix logic for marking succesful populationPaul Cristian Sarbu
While in practice a failure to populate the fields of a response happens once per invocation, as it will trigger a failure of the execution, from an algorithmic standpoint the flag to mark a successful population of the response fields should only be set on actual success. Fix this.
2025-06-04Executor: Move noexcept enforcement to main public call pointsPaul Cristian Sarbu
...and remove specifiers from methods that might throw in unexpected ways. By doing this, balance the need to avoid wrongly silencing exception sources during execution with reducing the amount of try-catch blocks.
2025-06-04LocalCasReader: Add validity check for bazel directoriesPaul Cristian Sarbu
This will check if directories contain upwards symlinks.
2025-06-04Execution server: Let the underlying API handle invalid entriesPaul Cristian Sarbu
The execution server itself should not consider anything special in setting the response message to the client, instead let the underlying API fail or not during collection.
2025-06-04FileRoot: Improve documentationPaul Cristian Sarbu
2025-06-04FileRoot: Ensure all read blobs and trees contain valid entriesPaul Cristian Sarbu
In particular, ensure that Git roots check for, e.g., upwards symlinks, before returning blobs and trees. To ensure that only the bear minimum extra work is performed for this purpose, Git roots now keep also the root's GitTreeEntry as a field, allowing the validity check of root source trees to take place only once and only if required.
2025-06-04FileRoot: Small format fixPaul Cristian Sarbu
2025-06-04FileRoot: Give git-based roots access to storage configPaul Cristian Sarbu
2025-06-04RepositoryConfig: Ensure consistency in reading blobs and treesPaul Cristian Sarbu
...with respect to rejecting invalid entries such as upwards symlinks. Also ensure that valid trees are only checked once by remebering known valid tress though marker files in local storage.
2025-06-04RepositoryConfig: Give access to a persistent storage config...Paul Cristian Sarbu
...whenever it is given access to a Git repository. The referenced storage config needs to outlive the repository config instance.
2025-06-04Add utility methods for caching valid treesPaul Cristian Sarbu
...through marker files kept in storage under generation regime. These can be used to allow valid source trees, i.e., those free of upwards symlinks, to be cached in a persistent manner over multiple builds.
2025-06-04GitTree: Allow tree reading to skip symlinks checkerPaul Cristian Sarbu
This is useful when the caller already knows that the tree to look up is valid, and thus the extra check step can be safely skipped.
2025-06-04GitRepo: Fix wrong logging level in reading treesPaul Cristian Sarbu
This removes a scenario where otherwise successful (exit code 0) calls to just and just-mr would result in an error-level log message.
2025-06-04GitRepo: Add tree reader without symlink checkerPaul Cristian Sarbu
2025-06-04GitTree: Ensure all read entries are validPaul Cristian Sarbu
Match behaviour of reading trees, which always checks for invalid entries, also for reading blobs.
2025-06-04git_cas read object: allow validation of individual blobsPaul Cristian Sarbu
This allows individual blobs read to be checked, e.g., for upwards symlinks, also when not part of a tree, which performs such a validation for its entries during its parsing into a GitTree.
2025-06-04git_cas: Be explicit in hash type (raw or hex) when readingPaul Cristian Sarbu
2025-06-04GitTree: Fix comment typoPaul Cristian Sarbu
2025-06-02ParallelRetrieveToCasWithCache: abort early on failureKlaus Aehlig
... and do mark artifacts internally as synchronized. First all all, we will abort anyway, to the entry won't even be read and, secondly it is not necessarily true that the artifact is synchronized.
2025-06-02just-mr: Warn for non-content-fixed repo reached from absent mainPaul Cristian Sarbu
If the main repository is marked absent, warn if during the dependency closure computation any non-content-fixed repositories are reached, i.e., any "file"-type repositories that are neither implicitly nor explicitly marked "to_git". Also warn if the main repository itself is marked absent but is not content fixed. Add small test checking that the new warning is produced.
2025-05-30WriteTargetCacheEntries: do not use quadratic many jobsKlaus Aehlig
When backing up target-cache entries we use parallelism at two dimensions, the independent cache entries and for each entry we retrieve the artifacts in parallel. If for each dimension we use the full amount of parallelism allowed, that gives a number of threads up to the square of the amount of parallelism specified by the user. Therefore, use in each dimension only the square root of the allowed parallelism keeping the total parallelism (up to rounding) within the specified range.
2025-05-28profile: include also the end time of the buildKlaus Aehlig
... which might be quite ahead of the end time of the invocation if writing out of the action graph delays the end of the invocation.
2025-05-28GitRepo: Methods expected to use a logger should do so...Paul Cristian Sarbu
...in all return paths, including in reporting caught exceptions. In this way give the opportunity for any calling AsyncMap to receive an expected fatal logger call on failure and thus be able to shut down gracefully. This is in line with the AsyncMap design, where the loggers are assumed to be safe to call by a consumer.
2025-05-26profile: include time of build startKlaus Aehlig
When using a serve end point, the analysis phase might take quite long if serve has to actually build a delegated target or, at least, has to synchronize artifacts with the remote end point. Therefore, also record the time the build phase started (if building is requested) as an additional time stamp in the profile.
2025-05-22profile: add start/stop timeSascha Roloff
2025-05-22just-mr: Fix wrong setup root being picked upPaul Cristian Sarbu
This fixes a bug in which the setup root was falsely being changed by unconditionally searching early for a default configuration files, despite one being explicitly provided at the command line.
2025-05-20serve service: log every incoming request at debug levelKlaus Aehlig
... so that at this level, the full activity of the serve service can be monitored.
2025-05-16rc parsing: fix graph/plain graph confusionKlaus Aehlig
2025-05-15just-mr: support invocation-specific artifacts-to-build loggingKlaus Aehlig
It is already supported to ask just-mr (via the rc file) to log for each invocation the artifacts that were built. Add a similar option for the artifacts that were to be built, i.e., for dumping the intensional description of the output artifacts. That information can be used, e.g., to compute the critical path.
2025-05-15Make --dump-artifacts-to-build act cummulativelyKlaus Aehlig
2025-05-12LocalAction: Fix collection of directory symlinkOliver Reiche
2025-05-12TreeOperationsUtils: Fix Bazel Directory creationOliver Reiche
... which requires all entries to be sorted in lexicographical order.
2025-05-12profile: gracefully handle empty responseKlaus Aehlig
... by ignoring it rather than trying to dereference a nullptr.
2025-05-09invocation log: include seconds in directory nameKlaus Aehlig
The directory name is designed to allow an easy rough sorting by time. This can also be used to identify the latest build for a specific user. However, users often run several builds in a single minute; therefore, increase time-stamp precission to include seconds as well. While still lexicographic and chronological order will disagree, at least for a single user it will be correct most of the times.
2025-05-08Invocation logging: add new field context variablesSascha Roloff
It allows to specify a list of environment variables, which are captured at invocation time and stored as key-value pairs in the metadata file. This allows to get some information about the invocation context such as username, merge-request ID or source branch (on a CI runner), or others.
2025-05-08Fix some typosPaul Cristian Sarbu
2025-05-08computed_roots: Fix missing return on fatal in evaluation async mapPaul Cristian Sarbu
2025-05-07profile: include remote-execution propertiesKlaus Aehlig
Include in the profile also the effective remote-execution endpoint, properties, and dispatch list. Software projects are often tested in a variety of environments or hardware configurations; as, obviously, the performance might differ significantly (especially depending on the used hardware) a proper analysis therefore requires the possibility to distinguish the various backends. Adding the effective configuration adds this posibility.
2025-05-06just: record analysis errors in profileKlaus Aehlig
2025-05-06Extend profile to support recording analysis errorsKlaus Aehlig
2025-05-06Extend just exit codes to distinguish different kinds of failuresKlaus Aehlig
2025-05-06just-mr: only set profiling-induced --dump-artifacts if supportedKlaus Aehlig
... by the requested subcommand. In particular, do not set it for pure analyse requests.
2025-05-05generic rule: fix conflict checkKlaus Aehlig
For a generic rule, it is an error if map union of various inputs (overlayed in correct order) does not form a proper stage. To implement this check properly, we first have to construct the map of all inputs and only then perform the staging check and not do the check with only the runfiles, as 5e104a526cf76fe75312d2fd288a3c88f506fb0a accidentally did. Fix this.
2025-05-05TreeOperationsUtils: apply AsyncMap to compute tree overlaySascha Roloff
2025-05-05TreeOperationsUtils: make WriteTree method directly return ObjectInfo ↵Sascha Roloff
instead of ArtifactDigest