summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/serve_service
AgeCommit message (Collapse)Author
2024-07-05Pass StorageConfig to git_repo and git_repo_remoteMaksim Denisov
2024-07-05Pass Storage and StorageConfig to StorageUtils by referenceMaksim Denisov
2024-07-05Pass StorageConfig to GarbageCollector::SharedLockMaksim Denisov
2024-07-05Use StorageConfig functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
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-04Use ApiBundle's Auth::TLS instance in serve and execute serversPaul Cristian Sarbu
2024-07-04Pass Auth::TLS instance to BazelApi and ServeApiPaul Cristian Sarbu
2024-07-04Use Auth and TLS configurations via Instance()Paul Cristian Sarbu
...to more easily keep track of changes during refactoring.
2024-06-28Use (un)expected for serve serviceOliver Reiche
2024-06-28Use (un)expected for Git repoOliver Reiche
2024-06-28Use (un)expected for parsing dispatch infoOliver Reiche
2024-06-27Pass RemoteServeConfig by pointer for capturingMaksim Denisov
2024-06-27Pass ServeApi to just-mr maps by raw pointerMaksim Denisov
...since it is used for capturing in lambdas for AsyncMaps and mustn't be temporary.
2024-06-27Capture ServeApi by pointer in AnalyseContextMaksim Denisov
2024-06-27Capture TargetCache by pointer in AnalyseContextMaksim Denisov
2024-06-25Pass IExecutionApi to IExecutionApi by referenceMaksim Denisov
...instead of not_null const ptr.
2024-06-25Remove CreateExecutionApiMaksim Denisov
2024-06-25Pass ApiBundle to ServerImplMaksim Denisov
2024-06-25Pass ApiBundle to add-to-cas and install-casMaksim Denisov
2024-06-25Pass ApiBundle to SourceTreeServiceMaksim Denisov
2024-06-25Pass ApiBundle to GraphTraverserMaksim Denisov
2024-06-25Instantiate LocalApi and BazelApi at onceMaksim Denisov
...to properly fallback to local api if needed.
2024-06-18Make ServeServerImpl a general class, not a singleton.Maksim Denisov
2024-06-18Make RemoteServeConfig a general struct, not a singletonMaksim Denisov
...and adjust interfaces.
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 as a field of context to the analysisMaksim Denisov
...instead of using singleton calls.
2024-06-18Use ServeApi during bootstrapMaksim Denisov
...with a default implementation. Although it is not used directly, it will be needed for instantiation of std::optional.
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-15logging: Do not make assumptions in emit callsPaul Cristian Sarbu
The Emit method of the Logger class, when called with a string as second argument, expects it to be a format string. It should be considered a programming error to pass a string variable as that argument without knowing for certain that it does not contain any format escape character ('{', '}'); instead, one should be conservative and use the blind format string "{}" as second argument and pass the unknown string variable as third argument.
2024-04-25just_serve.proto: Cleanup of specification documentationPaul Cristian Sarbu
Also aligning comments in server-side headers with the proto file documentation.
2024-04-10just-mr: Ensure resolved trees are kept alive in Git cachePaul Cristian Sarbu
The association map file for a resolved tree was supposed to guarantee that the respective tree is kept alive in a Git repository as part of a tagged commit. This commit fixes this issue by tagging the tree (found in the Git cache after resolution) before writing its association file.
2024-04-10resolve_symlinks_map: Allow separate source and target repositoriesPaul Cristian Sarbu
In certain cases, e.g., on the serve endpoint, an unresolved tree might lie in a repository other than the Git cache, therefore we cannot create any new entries there, as it would violate our guarantee that we only write under our local build root. Therefore, the resolve_symlinks_map now receives pointers to both the source and target Git databases and ensures that: 1. any tree created on-the-fly is stored exclusively in the target repository, and 2. any other entry required for those trees is made available in the target repository by copying it from the source repository. Note that in our use case the target repository is always our Git cache and passing a pointer to that object database is done to avoid the overhead of otherwise opening the database very often.
2024-04-08Consistently guard all POSIX C includesPaul Cristian Sarbu
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-21serve target server: lazy report at trace level the analysis/build failurePaul Cristian Sarbu
2024-03-21Reduce log level of common operationsKlaus Aehlig
In general, in the log produced by `just serve`, we want at most one entry at INFO level or higher per successfull request. Therefore, downgrade the log level of all operations that are carried out in a loop over all repositories that just serve takes care of.
2024-03-19serve target: Remove unneeded backend description uploadPaul Cristian Sarbu
2024-03-19serve target: Fix sharding inconsistenciesPaul Cristian Sarbu
When running in single node, serve endpoint should not even consider sharding. Additionally, garbage collection uplinking should also take the shard into account. For this purpose, a TargetCache instance now remembers if it was explicitly sharded and passed that information to the GarbageCollector for uplinking.
2024-03-19serve target server: Provide client the log of failed target buildsPaul Cristian Sarbu
When the serve endpoint has all the information to analyse a target, any analysis or build errors should be made available to the client. This way the user can receive a relevant error report.
2024-03-19serve target: Small improvementsPaul Cristian Sarbu
2024-03-19just analysis: Be explicit in logging locationPaul Cristian Sarbu
...by allowing a Logger instance to be provided.
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-13Move storage-aware tmpdir creation to configKlaus Aehlig
... as the fs_utils have a lot more dependencies making them usable in less places. Moreover, this function also serves to shape the layout of the local build root and hence is more appropriately placed in the config anyway.
2024-03-12serve target: Report the analysed targetPaul Cristian Sarbu
...when orchestrating a build.
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.