summaryrefslogtreecommitdiff
path: root/src/buildtool/main/main.cpp
AgeCommit message (Collapse)Author
2024-07-30Pass RemoteContext to execution serverPaul Cristian Sarbu
2024-07-30Pass LocalContext and RemoteContext to ServeApiPaul Cristian Sarbu
Also switch to using the fields from RemoteContext instances instead of those from ApiBundle.
2024-07-30Use RemoteContext in serve servicesPaul Cristian Sarbu
Also switch to using the fields from RemoteContext instances instead of those from ApiBundle.
2024-07-30Pass RemoteContext to ApiBundlePaul Cristian Sarbu
The CreateRemote method is also updated to receive all remote-related information as arguments, such that it does not have to rely on the ApiBundle internal fields which will eventually be removed.
2024-07-30Use LocalContext in execution and serve servicesPaul Cristian Sarbu
The context is passed by not_null const pointer in order to avoid binding to temporaries, and it or parts of it get stored by const ref where needed.
2024-07-30Pass LocalContext to ApiBundlePaul Cristian Sarbu
2024-07-22Make ServerImpl a general class, not singletonPaul Cristian Sarbu
2024-07-22Rename HashFunction methods and enumsMaksim Denisov
2024-07-22Convert HashFunction to a regular classMaksim Denisov
2024-07-22Store HashFunction in StorageConfigMaksim Denisov
2024-07-22Use HashFunction functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-07-19Remove the RetryConfig singletonPaul Cristian Sarbu
...and replace it with instances created early via a builder pattern.
2024-07-19Pass RetryConfig instance to ApiBundlePaul Cristian Sarbu
Also store a const ref for usage in setting up a fresh ApiBundle during target serve.
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-19Make OperationCache a general class, not singletonPaul Cristian Sarbu
As it is used by just execute only, instantiate it inside the ExecutionServer, which reads and writes to the cache map, and pass a const ref to OperationsServer, which only queries.
2024-07-19just: Minimize needed config for 'just execute'Paul Cristian Sarbu
As 'just execute' does not actually use the remote api, the configuration instances created for it can be streamlined or moved out of its scope.
2024-07-16Remove the RemoteExecutionConfig singletonPaul Cristian Sarbu
...and replace it with passed instances created early via a builder pattern. Tests are also updated accordingly.
2024-07-16Pass RemoteExecutionConfig instance to ApiBundlePaul Cristian Sarbu
...and store it as a const ref for subsequent use wherever the apis are already passed.
2024-07-16TargetCache: Use StorageConfig instance for shardingPaul Cristian Sarbu
Instead of computing the shard based on the RemoteExecutionConfig singleton, use the already computed hash stored in the passed StorageConfig instance, which now needs to be set up separately if bootstrapping in order to avoid unwanted includes. Storing the backend description to CAS and corresponding audit checks now take place in main.
2024-07-16StorageConfig: Store also the execution backend description idPaul Cristian Sarbu
...such that it will be available to the TargetCache for sharing. Also, GC does not require remote execution information, so the logic for this subcommand is moved earlier in main.
2024-07-16Remove the LocalExecutionConfig singletonPaul Cristian Sarbu
...and replace it with passed instances created early via a builder pattern.
2024-07-16Pass LocalExecutionConfig to TargetServicePaul Cristian Sarbu
2024-07-16Pass LocalExecutionConfig to ApiBundlePaul Cristian Sarbu
2024-07-11just: Fix storage instantiation in mainPaul Cristian Sarbu
As the storage instance also instantiates the target cache, we need to ensure that each such instance has at that point all the correct remote endpoint information to ensure the target cache sharding works as expected. In particular, the server-side and client-side operations of just have a slightly different setup for the remote endpoint address, therefore they require the storage instantiation to be done separately.
2024-07-05Convert StorageConfig to a general classMaksim Denisov
2024-07-05Convert Storage to a general classMaksim Denisov
2024-07-05Pass Storage to add-to-casMaksim Denisov
2024-07-05Pass Storage to RepositoryConfigMaksim Denisov
...and adjust AnalyseContext.
2024-07-05Pass StorageConfig and Storage to LocalApiMaksim Denisov
2024-07-05Pass StorageConfig and Storage to ServerImplMaksim Denisov
2024-07-05Pass StorageConfig and Storage to ServeMaksim Denisov
2024-07-05Pass StorageConfig to GarbageCollectionMaksim 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-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 APIOliver Reiche
2024-06-27Capture ServeApi by pointer in AnalyseContextMaksim Denisov
2024-06-27Capture TargetCache by pointer in AnalyseContextMaksim Denisov
2024-06-27Use a raw pointer for passing optional RepositoryConfigMaksim Denisov
...instead of std::optional<gsl::not_null<RepositoryConfig const*>>.
2024-06-26just: shorten repeated mentioning of the top-level targetKlaus Aehlig
The build tool prints status messages at the end of each of the major stages that sequentially follow each other. This allows, in particular when using log files (that contain time stamps) to quickly identify which phase was the resource consuming one. All these message mention the (same!) configured target that is process by this invocation of the build tool. In the presence of toolchains, the configuration can, however, get quite large (containing lots of paths to various tools). Therefore, shorted the configuration in the repeated menions if it is very long (currenlty 320 characters); as we do not change the first mentinoing ("Requested target is ..."), even with that shortening the log contains the same information.
2024-06-25Pass ApiBundle to ServerImplMaksim Denisov
2024-06-25Pass ApiBundle to describeMaksim Denisov
2024-06-25Pass ApiBundle to add-to-cas and install-casMaksim Denisov
2024-06-25Pass ApiBundle to ServeApiMaksim Denisov
2024-06-25Pass ApiBundle to GraphTraverserMaksim Denisov
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-18Create an individual instance of RemoteServeConfig in justMaksim Denisov
...instead of initialization of the singleton. Use builder for creation and validity check.