summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_engine/executor
AgeCommit message (Collapse)Author
2024-09-11Use ArtifactDigestFactory in executorMaksim Denisov
...to create ArtifactDigests.
2024-09-09Replace ArtifactDigest::CreateMaksim Denisov
...with ArtifactDigestFactory::HashDataAs
2024-08-30Move artifact_blob_container to a standalone libraryMaksim Denisov
2024-08-30Return the IsTree flag from ArtifactDigestMaksim Denisov
...and replace obvious redundant conversions to bazel_re::Digest, which were done to ensure that the digest represents a tree.
2024-08-23Executor: Also report missing output dirsOliver Reiche
2024-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
2024-08-01Execution API: support cwdKlaus Aehlig
... following the remote-execution standard that all output paths (but none of the input paths) are relative to the working directory. Therefore, the executor has to do the path translation. For our implementation of the API interface - the local API now handles cwd correctly, - the remote API forwards cwd correctly, and - the git API continues to report actions as not implemented.
2024-07-30Pass ExecutionContext to GraphTraverser and Executor/RebuilderPaul Cristian Sarbu
Also update the classes documentation accordingly.
2024-07-30Add extensible struct to be passed to graph traverserPaul Cristian Sarbu
2024-07-30executor: Use ApiBundlePaul Cristian Sarbu
...instead of separate local and remote instances. For tests, where different implementations of the IExecutionApi interface are used, ApiBundle instances are created by explicitly setting the struct fields instead of using ApiBundle::Create.
2024-07-30Pass RemoteContext to Executor/RebuilderPaul Cristian Sarbu
2024-07-22Pass HashFunction to ExecutorMaksim Denisov
2024-07-22Pass HashFunction to BazelApiMaksim Denisov
2024-07-22Pass HashFunction to ArtifactDigest::CreateMaksim Denisov
2024-07-19Pass RetryConfig instance to ExecutorPaul Cristian Sarbu
2024-07-19Pass RetryConfig instance to BazelApiPaul Cristian Sarbu
2024-07-16Add useful aliases for platform properties and dispatch endpointPaul Cristian Sarbu
2024-07-04Replace the Auth and Auth::TLS singletonsPaul Cristian Sarbu
Use a builder pattern for creation and validation, in a manner that allows also other authentication methods to be added in the future besides the current TLS/SSL. The main Auth instances are built early and then passed by not_null const pointers, to avoid passing temporaries, replacing the previous Auth::TLS instances passed by simple nullable const pointers. Where needed, these passed Auth instances are also stored, by const ref. Tests also build Auth instances as needed, either with the default 'no certification' or from the test environment arguments.
2024-07-04Pass Auth::TLS instance to BazelApi and ServeApiPaul Cristian Sarbu
2024-06-25Pass IExecutionApi to Executor by refereceMaksim Denisov
...instead of not_null const ptr.
2024-06-25Pass IExecutionApi to IExecutionApi by referenceMaksim Denisov
...instead of not_null const ptr.
2024-06-17executor: properly separate stdout and stderr in log messagesKlaus Aehlig
... about processes producing both, stdout and stderr. By supporting unique readability of the output, we facilitate the understanding of the messages provided by actions.
2024-06-04blob containers: Store and upload taking into account content sizePaul Cristian Sarbu
Update logic populating containers to use the new method which is aware of the maximum transfer limit.
2024-05-28Use ArtifactBlobContainer in IExecutionApiMaksim Denisov
...instead of BazelBlobContainer to not bring bazel_re::Digest to IExecutionApi.
2024-05-28Rename BlobContainer to BazelBlobContainerMaksim Denisov
2024-05-21executor.hpp: fix a typoAlberto Sartori
2024-05-17FileRoot: Fix parsing of ignore-special Git tree rootsPaul Cristian Sarbu
When populating the GitTree instance stored in a Git tree-type FileRoot with the ignore-special flag set, the GitTree instance would be created with an empty raw_id_ field, signaling that some of the entries might have been skipped and thus the root tree id is not anymore in a one-to-one correspondence with the stored list of entries. This however caused FileRoot instances with missing tree id information. This commit fixes the issue by always storing the raw_id_ field as the root id of the Git tree, as well as clarifying the relationship between this field and the ignore_special_ flag, including refactoring the tree id getters.
2024-05-17RepositoryConfig: Instance should not be changed once populatedPaul Cristian Sarbu
Once a RepositoryConfig instance gets populated, it must never be changed again. Therefore, all functions accepting these instances should only take them as pointers to const.
2024-05-03Include environment in action reporting on the command lineKlaus Aehlig
Compared to the command line, the environment usually is quite short. So including it in messages reporting about commands does not introduce a lot of additional noise. However, knowing the environment can help understanding an error message. Therefore, it seems a good trade off to include it. Do so.
2024-04-15executor: Log in caller logger if givenPaul Cristian Sarbu
This means that on the serve endpoint, where a logger for the GraphTraverser is explicitly set, the log messages during action execution is also made available to the client via the CAS-stored analysis and build log blob.
2024-04-11Error reporting on action failure: give short target nameKlaus Aehlig
... as this is the only thing the user cares about when trying to investigate why that action failed.
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
2024-03-11just: Replace singletons for progress tracking and statistics...Paul Cristian Sarbu
...with regular instances that have controlled life-times. This avoids race conditions in tracking and reporting the results of analysis and build, as the serve endpoint can orchestrate multiple builds at the same time asynchronously. As a bonus side-effect this also ensures the correctness of the progress reporting per orchestrated build.
2024-02-26Employ blob splitting and splicing for endpoint dispatchingSascha Roloff
2024-02-22Executor: in case of a failing action also report originKlaus Aehlig
... if provided. This might help users to find the correct place in their code base causing the action to fail.
2024-01-24just: Wrap IExecutionApi raw pointer argumentsPaul Cristian Sarbu
...in accordance to our coding style.
2024-01-09Refactor GraphTraverser to take in platform properties and dispatch listPaul Cristian Sarbu
In order for the serve endpoint to correctly dispatch a build to the correct remote-execution endpoint, the platform properties and dispatch list for a build need to be passed explicitly to the executor (via the graph traverser instance) instead of always being taken from the RemoteExecutionConfig struct. This commit implements these changes, including updating existing tests accordingly.
2023-12-13executor.hpp: log more info in case of failureAlberto Sartori
2023-12-05executor: Move helper methods inside ExecutorImpl classPaul Cristian Sarbu
...with appropriate scope depending on where they are called from, to avoid unnecessary code duplication.
2023-11-27Refactoring RepositoryConfigPaul Cristian Sarbu
With the introduction of 'just serve', export targets can now be built also independently from one another based on their corresponding minimal repository configuration, as stored in the target cache key. In this context, this commit changes the RepositoryConfig usage from one global (static) instance to pointers passed as necessary throughout the code.
2023-07-05Executor: dispatch on action propertiesKlaus Aehlig
2023-06-26FileRoot: Add handling of non-upwards symlink...Paul Cristian Sarbu
...and update tests accordingly.
2023-06-15executor: honor action-specific execution propertiesKlaus Aehlig
2023-06-06style: Use designated initializersPaul Cristian Sarbu
This feature has been introduced with C++20.
2023-05-31Executor: honor timeout scalingKlaus Aehlig
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-02-27Progress reporting: Extract generic logic from just progress classSascha Roloff
2023-02-22ExecutionApi: Retrieve to correct CAS directlyOliver Reiche
... by keeping track of each blob being a file or executable and storing it to the correct local physical CAS directory. The new flag is merely a hint and only used by the local execution API. Leaving it out will still correctly transfer the blob but may cause unnecessary duplicates in file CAS.
2023-01-31Fix segfault if reading git tree failedOliver Reiche