summaryrefslogtreecommitdiff
path: root/src/buildtool
AgeCommit message (Collapse)Author
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-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-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-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
2025-05-05TreeOperationsUtils: make free-standing implementation functions member ↵Sascha Roloff
functions of the class
2025-05-05TreeOperationsUtils: refactor digest population into proto messagesSascha Roloff
2025-05-05TreeOperationsUtils: add missing switch case in bazel directory generationSascha Roloff
2025-05-05TreeOperationsUtils: fix typo in commentSascha Roloff
2025-04-25just: make --dump-artifacts act cummulativelyKlaus Aehlig
2025-04-24profile: fix path rebasingKlaus Aehlig
During execution, paths are relative to the working directory of the action; however, in our representation, all paths are always relative to the action root. Commit d65d711f844224dcf9215c52be8f69fd2885adfc tried to change the reporing to our usual standard, however got the direction wrong; fix this.
2025-04-22Remove redundant calls to std::filesystem::absoluteMaksim Denisov
...when calling std::filesystem::weakly_canonical, since the latter converts the argument path to an absolute path internally.
2025-04-22FileSystemManager: When copying, take into account equivalent files.Maksim Denisov
2025-04-22FileSystemManager: Always copy directories recursivelyMaksim Denisov
2025-04-22FileSystemManager: Always remove directories recursivelyMaksim Denisov
2025-04-17profile: also honor action cwdKlaus Aehlig
In all presentations of actions to the user, we use output paths relative to the root of the action directory. Therefore, we should do the same in the profile. However, when noting the completion of an action, we get paths as in the wire protocol, i.e., relative to the working directory of the action. Therefore, rebase appropriately.
2025-04-17archive.cpp: eliminate un-needed copies of payloadAlberto Sartori
2025-04-17bazel_msg_factory: avoid copies in lambdas...Alberto Sartori
and while there, replace `auto` with explicit signatures.
2025-04-17bazel_execution_client: eliminate one un-needed copyAlberto Sartori
2025-04-17ServeFailureReporter: use const& to avoid copiesAlberto Sartori
2025-04-17main: ensure --profile is also honored for failed buildsKlaus Aehlig
We use a pointer to the actual Profile object to handle profiling, if requested. For this to work, actual object needs to stay in scope. However, we handle most of the operations, including parsing of arguments, in a global try-catch block. In order to be able to also correctly write a profile file outside this block, move the scope of the Profile object to top-level in main. While there, also improve the signature of the Profile class. That class is only meaningful, if a profile should eventually be writting to disk. So reflect this in the constructur. Also, once we know the file name to write the profile to (if any), we have already parsed the command line; so the making available of the command line to the profile can be enforced by adding this to the constructor as well. Co-authored-by: Denisov Maksim <denisov.maksim@huawei.com>
2025-04-16just profile: include subcommand and its argumentsKlaus Aehlig
As parsing the the command-line is non-trivial, we include all the relevant information about the command line in the profile. This should also include the subcommand. For sake of completeness, we also include the non-option arguments of the subcommand.
2025-04-16just profile: include exit code of actionsKlaus Aehlig
Extend the profile by including non-zero exit codes of individual actions. When looking at an individual build invocation, the actions with non-zero exit code are often the interesting ones, like root cause of a build failure, or failing tests. Therefore, it is useful information to include this information; by leaving out the exit code if it is zero, we do not significantly increase the profile.
2025-04-11Remove unused function GetTree from BazelCasClientKlaus Aehlig
2025-04-11Drop unused directory mapKlaus Aehlig
The BazelNetworkReader contains an optimization for reading directories in case the remote execution (in compatible mode) supports the GetTree request. This is, however not the case for many remote exeuciton services, including our own single-node execution service. So the code is basically untested and rarely used, if at all. Moreover, justbuild is usually used in native mode and using compatibility mode is expected to handle tree operations less efficient. Therefore, remove this basically dead code and decrease complexity this way.
2025-04-10cas_utils: Fix typo in log messagePaul Cristian Sarbu
2025-04-10BazelAcClient: log cache misses at trace levelKlaus Aehlig
... instead of at debug. We expect actions to be not in cache, so the fact that we experience cache misses is not surprising. Given the information available at this point, a useful logging indicating (in terms meaningful to the user) is not possible. Therefore, keep the debug-level log clean.
2025-04-10FilesystemManger: reduce debug level for absent filesKlaus Aehlig
At various places in the build tool, we try to read files from various CASes and caches. The absence of a file there is normal; therefore, reduce log level in order to not overload the debug-level log.
2025-04-10graph_traverser: drop logging graph-internal identifiersKlaus Aehlig
Those are the sha256sum of the serialisation of an artifact and that serialisation does not end up in the compatible CAS. In other words, they do not refer to anything the user can access. Therefore, drop this message that is not helpful.
2025-04-10Remove unnecessary targets filesKlaus Aehlig
2025-04-08executor: for a tree-overlay action, also report inputs in case of errorKlaus Aehlig
2025-04-08Tree-overlay utils: also report the path within the original treeKlaus Aehlig
... instead of only the file name. Having the full path into the tree makes it more easy for the user to understand the root cause of a conflict.
2025-04-08BazelCasClient: only warn on failure of GetTreeKlaus Aehlig
... as that failure does not necessarily abort the build.
2025-04-08executor: also track begin and end of tree-overlay operationsKlaus Aehlig
Those operations require fetching objects through the network. The fetch is already restricted to only the tree-objects where a merge is necessary, leaving out unchanged trees as well as all blobs. Still, some time may be required, especially over slow networks. Therefore report this activity in the progress.
2025-04-08Result map: include tree-overlay actions to the origin mapKlaus Aehlig
Now that we generate tree-overlay action identifiers that are disjoint from identifiers of regular actions, having a joint origin map does not cause any confusion. Concerning the numbering of subtasks, we always see tree-overlay actions following the regular actions, even if defined in a different order. In this way, the identifiers for the regular actions don't change. Including tree-overlay actions in the origin map also has the advantage that the origin is properly reported in case of failure (e.g., non-disjointness of the obtained trees).
2025-04-08Keep identifiers for actions, trees, and tree_overlays disjointKlaus Aehlig
While our traverser correctly keeps separate identifier spaces for those entities, having disjoint identifiers allows easier reading of log messages and more simple reporting of origins of actions.
2025-04-08executor: properly report failure of tree actionsKlaus Aehlig
... calling them as such, and not trying to report command and environment.
2025-04-08Improve reporting on tree errorsKlaus Aehlig
- break lines at logicial point, following the layout of our other error messages - fix a typo - properly quote the path of the conflict
2025-04-07executor: also handle tree-overlay actionsKlaus Aehlig
2025-04-07TreeOperationsUtils: sequential version of tree overlay computationSascha Roloff