summaryrefslogtreecommitdiff
path: root/src/buildtool/main/serve.cpp
AgeCommit message (Collapse)Author
2025-02-25just serve: allow clients to access execution endpoint with a different addressAlberto Sartori
To properly use `just serve`, both the client and the serve instance must talk to the very same execution endpoint. Typically, both the client and serve can reach out to the execution endpoint via the same IP address. However, it might be possible that the client and a serve instance know the same execution endpoint by means of differnet IP addresses. For example, the client knows the execution endpoint address through an _external_ IP address, while the serve instance, deployed within the same network infrastructure, only knows the _internal_ IP address. This patch adds the subkey `"client address"` -- of the key `"execution endpoint"` -- in the serve configuration file, to specify the alternative pair `address:port` used by the client.
2024-11-14main: Implement IWYU suggestionsPaul Cristian Sarbu
2024-10-07Enable google-* checks.Maksim Denisov
2024-10-07Enable bugprone-narrowing-conversions checkMaksim Denisov
2024-09-13Remove Compatibility flag from justMaksim Denisov
2024-09-13Rename Compatibility class to ProtocolTraitsMaksim Denisov
...and move it to the common stage.
2024-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
2024-07-19just: Move RetryConfig setup before starting just servePaul Cristian Sarbu
As the serve endpoint acts also as a regular client to its associated remote-execution endpoint, it should employ the same retry strategy as the regular just client. Also updates ReadJustServeConfig to store the retry config arguments instead of calling the RetryConfig singleton setters directly, thus clearly separating the reading of the arguments from the creation of any configuration singleton/instance.
2024-07-19Fix naming inconsistencies in retry configurationPaul Cristian Sarbu
The retry_parameters.hpp header-only library defining the Retry class now is the retry_config.hpp header-only library defining the RetryConfig class.
2024-06-28Use (un)expected for reading location objectsOliver Reiche
2024-04-25just serve: Paths in config file should be location objectsPaul Cristian Sarbu
Also updates the tests and all relevant documentation accordingly.
2024-04-10Support stderr log-limit restriciton for serveKlaus Aehlig
As `just serve` is used like a daemon it can be desirable to restrict stderr, e.g., to only errors, while keeping a detailled log of the activity in a file.
2024-04-10just serve: follow symlinks to the serve configKlaus Aehlig
... to simplify set ups where configuration files are provided as symbolic links to some central store.
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-20Add local launcher to just-serve configKlaus Aehlig
As just serve can simultaneously act as remote-execution endpoint, it has to accept in its configuration all the necessary information, in particular, the local launcher. Add it.
2024-01-31just serve: Cleanup logging to remove tool namePaul Cristian Sarbu
Also cleans up the logging when parsing the serve service configuration file.
2023-12-13just serve: allowing for tuning retry strategy in the configuration fileAlberto Sartori
While parsing the configuration file, if the key `"execution endpoint"` is present, the following three keys are evaluated as well: - "max-attempts" - "initial-backoff-seconds" - "max-backoff-seconds"
2023-12-06just serve: make tc write strategy configurableKlaus Aehlig
2023-12-05just serve: Add configuration fields for remote buildsPaul Cristian Sarbu
2023-09-15just serve: add remote execution endpoint and --fetch-absent optionPaul Cristian Sarbu
The serve service will communicate with this endpoint when needed, as well as ensure artifacts it provides are synced with the remote execution CAS, if requested by the client. If just-mr is given the --fetch-absent option, it Always produce present roots irrespective of the 'absent' pragma. For Git repositories marked with the 'absent' pragma, first try to fetch any commit trees provided by the serve endpoint from the execution endpoint CAS, before reverting to a network fetch. Co-authored-by: Klaus Aehlig <klaus.aehlig@huawei.com> Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
2023-09-13just: Add handling of 'just serve' configurationPaul Cristian Sarbu