summaryrefslogtreecommitdiff
path: root/src/buildtool/main/main.cpp
AgeCommit message (Collapse)Author
2024-06-18Make ServeApi a general class, not a singletonMaksim Denisov
...and adjust interfaces.
2024-06-18Pass ServeApi to ServeServerImpl by referenceMaksim Denisov
...instead of using singleton calls.
2024-06-18Pass RemoteServeConfig to ServeServerImpl by referenceMaksim Denisov
...instead of using singleton calls.
2024-06-18Pass ServeApi by reference to the describe functionMaksim Denisov
...instead of using singleton calls.
2024-06-18Pass ServeApi as a field of context to the analysisMaksim Denisov
...instead of using singleton calls.
2024-06-18Use an extensible structure to pass arguments to the analysis.Maksim Denisov
2024-06-18Use RemoteServeConfig functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-06-06tc writing: allow different log levelKlaus Aehlig
... for failures instead of the binary strict_logging. In this way, we can log at log level Error in the serve instance, and for the client at level Warning or Info, depending on whether failure is expected (i.e., if targets are potentially taken from a serve endpoint) or not.
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-04-18Move retry-related CLI parts into separate librariesKlaus Aehlig
... to simplify reuse.
2024-04-16just: support writing the error blobs from serve into a json fileKlaus Aehlig
... so that they are available in machine-readable form. In this way, all logs can automatically be collected without the need of parsing human-targeted error messages.
2024-04-10Add command-line option to restrict log limit on stderrKlaus Aehlig
2024-04-02Move file chunker to storage.Maksim Denisov
2024-03-22main: also served export targets are relevant export targetsKlaus Aehlig
... so also report at info level if we got export targets served.
2024-03-20Add new subcommand add-to-casKlaus Aehlig
2024-03-19just: Report non-zero served targets after analysisPaul Cristian Sarbu
2024-03-18parallelism: Do not spawn more threads than asked toPaul Cristian Sarbu
...in the tool proper, i.e., excepting tests.
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-03-11just analyse: Use explicit target cache instancePaul Cristian Sarbu
The serve endpoint always has to access the correctly sharded target cache, including during analysis. For this purpose, the target cache instance interrogated during analysis has to be explicitly provided.
2024-03-11gc: add option --no-rotationKlaus Aehlig
... to clean up what can be done without losing cache information.
2024-02-26Initialize file chunker in mainSascha Roloff
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.
2024-01-09just main: Fix log messagePaul Cristian Sarbu
2023-12-13Add command line options to tune the retry strategy for rpc callsAlberto Sartori
Three new command line options have been added: - `--max-attempts` - `--initial-backoff-seconds` - `--max-backoff-seconds`
2023-12-12just serve: Fix handling of missing remote execution endpointPaul Cristian Sarbu
Only the client needs to make sure that the remote execution endpoint is set in the case 'just serve' acts also as 'just execute', i.e., when a remote execution endpoint is not specified, while for setting up the serve server a missing execution endpoint should remain unset.
2023-12-06just serve: make tc write strategy configurableKlaus Aehlig
2023-12-06Add CLI option to set write strategy for target-level cacheKlaus Aehlig
2023-12-05just serve: Add configuration fields for remote buildsPaul Cristian Sarbu
2023-12-05just main: Move useful results processing methods to own libraryPaul Cristian Sarbu
2023-12-05AnalyseTarget: Simplify method signaturePaul Cristian Sarbu
Similarly to the jobs common argument, we can simply only pass the needed single element from the analysis arguments struct. This will allow for a clearer understanding of what target analysis requires and reduce the overhead when reutilizing this method in just serve.
2023-12-05just main: Move root parser into static FileRoot method...Paul Cristian Sarbu
...to make it available also for setting up 'just serve' builds.
2023-12-05just main: Make capitalization in log messages consistentPaul Cristian Sarbu
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-11-24just: Fix wrong access to moved structPaul Cristian Sarbu
The traverser instantiation consumes the arguments.build struct, therefore one must not access that struct later in the code.
2023-11-22Implement blob splitting protocol on just client sideSascha Roloff
2023-11-16remote-execution-endpoint: fall back to remote-serve-endpointAlberto Sartori
If only the `--remote-serve-endpoint` option is specified on the command line, the `--remote-execution-endpoint` is also set to the given value. This makes the spawning and usage of just-execute consistent. When just-serve is started, if no remote execution endpoint is provided, the same process will also act as a just-execute instance. With the current patch, the client can thus only write, on command line, the remote serve address, avoiding the repetition of the same address for two different options.
2023-11-15just-serve: start a just-execute instance if the user does not provide...Alberto Sartori
...a remote execution end-point for just-serve.
2023-11-15ReadConfiguredTarget: handle absent target rootsAlberto Sartori
2023-11-15just main: Extend root parsing to allow absent rootsPaul Cristian Sarbu
2023-11-07artifacts sync: use parallelism if providedKlaus Aehlig
Use parallelism if provided by the build API when synchronizing artifacts of export targets and when synchronizing artifacts due to the --remember option. Do so at build parallelism as this the parallelism suitable for the build API.
2023-11-07Fetch export targets sequentially when creating local backupKlaus Aehlig
Typically, the number of export targets is small compared to the size of the respective export targets. Moreover, export targets are often chained, resulting in overlapping artifacts that we want to fetch only once. Therefore, fetch export targets sequentially, giving room to introduce parallelism in the individual fetch steps later. While there, also log the beginning of the artifact synchronisation for the export targets.
2023-09-13just serve: Add endpoint argumentsPaul Cristian Sarbu
2023-09-13just serve: Basic service implementation with commit-of-tree RPCPaul Cristian Sarbu
Initial version, to be extended later with other RPCs.
2023-09-13just: Add handling of 'just serve' configurationPaul Cristian Sarbu
2023-08-23just: split main codeKlaus Aehlig
... by moving the diagnose and cli related code into to separate libraries. In this way, we hopefully improve maintainability of the code base.
2023-07-11filesystem: Avoid unwanted indirections...Paul Cristian Sarbu
...that std::filesystem::* calls produce. This is because existence and type checks use almost exclusively std::filesystem::status, which follows symbolic links, when being called with path arguments. Instead, one should instead use these methods with the value returned by a call of std::filesystem::symlink_status. This commit also streamlines the FileSystemManager tests, as well as replace bare calls to std::filesystem with their FileSystemManager counterparts (where suitable).
2023-07-05Add CLI argument to dispatch endpointKlaus Aehlig
In this way, the user can specify which execution endpoint to use depending on the execution properties.
2023-07-05main: RemoteExecutionConfig is a direct dependencyKlaus Aehlig
... and hence should be declared as such.
2023-06-28Fix json to filepath conversion in mainSascha Roloff