summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/local/local_response.hpp
AgeCommit message (Collapse)Author
10 daysExecutionAPI: Support output_symlinks in responseOliver Reiche
10 daysExecutionApi: Drop DirectorySymlinks from common apiOliver Reiche
... as it is only needed for local execution, there is no need to provide it in the common api interface.
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-03-17execution_api: support reading off stdout/stderr digestsKlaus Aehlig
2025-03-10execution response interface: include execution durationKlaus Aehlig
2024-11-14execution_api remaining: Implement IWYU suggestionsPaul Cristian Sarbu
2024-10-07Enable readability-redundant-member-init check.Maksim Denisov
2024-09-16local execution: Check validity of symlinksPaul Cristian Sarbu
Invalid entries, currently all upwards symlinks (pending implementation of a better way of handling them), are now identified and handled similarly to remote execution: in compatible mode on the client side, during handling of local response, and in native mode during the population of the local action result.
2024-09-16execution_response: Allow failures to be reported while populatingPaul Cristian Sarbu
As populating the containers from remote response only takes place once, no assumptions should be made that this cannot fail (for example if wrong or invalid entries were produced). Instead, return error messages on failure to callers that can log accordingly.
2024-09-09Use ArtifactDigest in LocalActionMaksim Denisov
2024-09-09Replace ArtifactDigest::CreateMaksim Denisov
...with ArtifactDigestFactory::HashDataAs
2024-08-30Replace bazel_re::Digest in LocalCAS::{...}PathMaksim Denisov
...with ArtifactDigest.
2024-08-07Avoid deep copies of containers in responses.Maksim Denisov
2024-08-07Remove code duplication in Populate method in responses.Maksim Denisov
2024-07-22Use HashFunction from Storage in LocalResponseMaksim Denisov
2024-07-22Pass HashFunction to ArtifactDigest::CreateMaksim Denisov
2024-07-05Pass StorageConfig and Storage to LocalApiMaksim Denisov
2024-03-26Add missing system includesPaul Cristian Sarbu
Main culprits: - std::size_t, std::nullptr_t, and NULL require <cstddef> - std::move and std::forward require <utility> - unordered maps and sets require respective includes - std::for_each and std::all_of require <algorithm>
2024-03-15Clean up more includes and targetsPaul Cristian Sarbu
Some of the more specific issues addressed: - missing log_level target/include - header-only libs wrongly marking deps as private - missing/misplaced gsl includes
2023-06-26Allow non-upwards symlinks with local APIPaul Cristian Sarbu
2023-06-26Execution response: Add output symlink pathsPaul Cristian Sarbu
2023-06-06style: Use designated initializersPaul Cristian Sarbu
This feature has been introduced with C++20.
2023-04-26imports: Switch to Microsoft GSL implementationOliver Reiche
... with two minor code base changes compared to previous use of gsl-lite: - dag.hpp: ActionNode::Ptr and ArtifactNode::Ptr are not wrapped in gsl::not_null<> anymore, due to lack of support for wrapping std::unique_ptr<>. More specifically, the move constructor is missing, rendering it impossible to use std::vector<>::emplace_back(). - utils/cpp/gsl.hpp: New header file added to implement the macros ExpectsAudit() and EnsureAudit(), asserts running only in debug builds, which were available in gsl-lite but are missing in MS GSL.
2023-03-13Storage: Reworked storage and garbage collectionOliver Reiche
The improved GC implementation uses refactored storage classes instead of directly accessing "unknown" file paths. The required storage class refactoring is quite substantial and outlined in the following paragraphs. The module `buildtool/file_system` was extended by: - `ObjectCAS`: a plain CAS implementation for reading/writing blobs and computing digests for a given `ObjectType`. Depending on that type, files written to the file system may have different properties (e.g., the x-bit set) or the digest may be computed differently (e.g., tree digests in non-compatible mode). A new module `buildtool/storage` was introduced containing: - `LocalCAS`: provides a common interface for the "logical CAS", which internally combines three `ObjectCAS`s, one for each `ObjectType` (file, executable, tree). - `LocalAC`: implements the action cache, which needs the `LocalCAS` for storing cache values. - `TargetCache`: implements the high-level target cache, which also needs the `LocalCAS` for storing cache values. - `LocalStorage`: combines the storage classes `LocalCAS`, `LocalAC`, and `TargetCache`. Those are initialized with settings from `StorageConfig`, such as the build root base path or number of generations for the garbage collector. `LocalStorage` is templated with a Boolean parameter `kDoGlobalUplink`, which indicates that, on every read/write access, the garbage collector should be used for uplinking across all generations (global). - `GarbageCollector`: responsible for garbage collection and the global uplinking across all generations. To do so, it employs instances of `LocalStorage` with `kDoGlobalUplink` set to false, in order to avoid endless recursion. The actual (local) uplinking within two single generations is performed by the corresponding storage class (e.g., `TargetCache` implements uplinking of target cache entries between two target cache generations etc.). Thereby, the actual knowledge how data should be uplinked is implemented by the instance that is responsible for creating the data in the first place.
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-08-05ExecutionResponse: Fix artifacts reserve sizeOliver Reiche
2022-02-22Initial self-hosting commitKlaus Aehlig
This is the initial version of our tool that is able to build itself. In can be bootstrapped by ./bin/bootstrap.py Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com> Co-authored-by: Victor Moreno <victor.moreno1@huawei.com>