summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/remote
AgeCommit message (Collapse)Author
2025-06-04RepositoryConfig: Give access to a persistent storage config...Paul Cristian Sarbu
...whenever it is given access to a Git repository. The referenced storage config needs to outlive the repository config instance.
2025-02-28Include ArtifactDigestFactory into "common" libraryMaksim Denisov
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.
2025-02-19Store HashFunction by valueMaksim Denisov
Although references give an additional information about ownership, they introduce additional design difficulties.
2025-02-19{MR}GitApi: Drop inheritanceMaksim Denisov
2025-02-14code structure: rename symlinks_map folder to symlinksPaul Cristian Sarbu
...to remove the unnecessary link between folder name and the logic of resolve_symlinks_map.
2025-01-23ServeApi: Implement DownloadTreeMaksim Denisov
2025-01-23ServeApi: Implement UploadTreeMaksim Denisov
2025-01-23ServeApi: Capture ApiBundle and StorageConfig in the ctor.Maksim Denisov
2025-01-22serve client: support keep_artifact_rootKlaus Aehlig
2025-01-21TreeStructure: Compute on serveMaksim Denisov
2024-11-14serve_api: Implement IWYU suggestionsPaul Cristian Sarbu
2024-10-25Add dependencies explicitly that are included directlyKlaus Aehlig
... instead of relying on those dependencies being pulled in indirectly.
2024-10-25serve service: Use digest when requesting serve to set up a treePaul Cristian Sarbu
...instead of passing just the Git hash, which imposes the remote to always be native. The serve service proto file is updated accordingly.
2024-10-25serve service: Respond with digest for blob and tree checksPaul Cristian Sarbu
...to be able to interrogate remotes irrespective of protocol. When serve endpoint is active, it will provide the correct digest with which to interrogate the remote endpoint. Otherwise, for a compatible remote check the file mappings for the correct digest. The serve service proto file is updated accordingly.
2024-10-25serve service: Respond also with digest in serve repository tree RPCsPaul Cristian Sarbu
...besides the simple Git hash, if syncing was done. This way one can know what digest to ask for from the remote. The serve client also needs to now know what hash function the remote expects. The serve service proto file is updated accordingly.
2024-10-07Enable readability-redundant-member-init check.Maksim Denisov
2024-10-07Enable bugprone-exception-escape checkMaksim Denisov
2024-09-23Reorder dependencies and remove duplicates in OSSMaksim Denisov
2024-09-11Use HashFunction::Type to deserialize ArtifactDescriptionMaksim Denisov
2024-09-11Return ArtifactDigest from RepositoryConfig::RepositoryKeyMaksim Denisov
...to prevent additional conversions to ArtifactDigest from plain strings.
2024-09-09Validate hashes in serve's targetMaksim Denisov
2024-08-30Cast ArtifactDigest to bazel_re::Digest explicitlyMaksim Denisov
...to simplify further refactoring.
2024-08-30Return ArtifactDigest from LocalCAS::StoreMaksim Denisov
2024-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
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-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-16Use RemoteExecutionConfig instances stored in ApiBundlePaul Cristian Sarbu
...wherever an ApiBundle is already being passed.
2024-07-16Ensure config builders always have a valid statePaul Cristian Sarbu
...by making the respective Build methods const. It should be perfectly valid for multiple Build calls to happen for the same builder instance, so its internal state should never be invalidated by, e.g., moving from internal fields.
2024-07-05Pass StorageConfig and Storage to ServeMaksim Denisov
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 serve and execute clientsPaul Cristian Sarbu
2024-06-28Use (un)expected for serve APIOliver Reiche
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 ServeApiMaksim Denisov
2024-06-25Instantiate LocalApi and BazelApi at onceMaksim Denisov
...to properly fallback to local api if needed.
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.
2024-06-18Make ServeApi a general class, not a singletonMaksim Denisov
...and adjust interfaces.
2024-06-18Pass RemoteAddress to ConfigurationClient by valueMaksim 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-18Store services in ServeApi by value.Maksim Denisov
* No stackoverflow is possible: there is just one instance of ServeApi and services are relatively 'light'; * Services are not optional and cannot be changed during their use; * operator-> is not free.
2024-06-18Mark ServeApi's services' methods contant.Maksim Denisov
2024-06-18Use RemoteServeConfig functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-06-18Use ServeApi functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-05-15serve target: Improve logic for local build failure triggersPaul Cristian Sarbu
If the serve endpoint reports an internal error, local builds should not continue and the error message should be provided. Similarly, if the serve endpoint promises the target cache value to be in remote CAS, but the client cannot find or process it as needed, then a local build again should not continue and the reason be provided as an error message.
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-19serve target: Differentiate between fatal and non-fatal orchestrated buildsPaul Cristian Sarbu
...by increasing granularity in client-side reporting. This allows to correctly continue with builds of local targets if the serve endpoint does not have the requested target, as well as improve the reporting for users on failure.
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