summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-01-13Release 1.4.2v1.4.2Klaus Aehlig
2025-01-13just-mr setup: Fix ensuring 'subdir' only accepts non-upwards pathsPaul Cristian Sarbu
...which implicitly also enforces non-absolute. (cherry-picked from 311c88641e3b4be067ed6575369b401288e8984c) This ensures that there is no access outside the root directory of a Git checkout or the temporary unpack directory of an archive.
2025-01-13just-mr setup: Fix ensuring field 'subdir' only accepts relative pathsPaul Cristian Sarbu
(cherry-picked from a8b50ad395b72c6933c164d064d86d60cd6b594c)
2025-01-13source tree service: Fix ensuring Git cache rootPaul Cristian Sarbu
This is an amendment to the changes in commit 8234079, as the underlying issue was only partially solved there. While the call to GitRepo::InitAndOpen is in itself properly guarded, it does not share a lock with the call to create the path to the Git cache if it is missing. Fix this by moving the call to the method ensuring the Git cache initialization to after acquiring the Git cache root garbage collector shared lock. (cherry-picked from 7d0a4df3822ca194d93abb6b65d0ebb264cc1974)
2025-01-13source tree service: Ensure the Git cache existsPaul Cristian Sarbu
Similarly to just-mr, each SourceTree RPC must ensure that the Git cache folder exists and the Git cache repository is initialized before using it. While there, fix missing shared locks on the Git cache root. (cherry-picked from 82340791f4362a3a92ea1dfa9ff111c1258be19f)
2025-01-13Common API: correctly report failureKlaus Aehlig
If fetching via the primary API failed and there is no fallback, we should fail rather than tacitly continuing with the next object to fetch. (cherry-picked from 74096dce2ee85ea5df940155fc2717d249e14d80)
2025-01-13GitCAS: remove friend GitRepoMaksim Denisov
...and access internal state via getters. (cherry-picked from ca952159e778f0ed927082832a195842f6229a94)
2025-01-13GitCAS: remove mutex and locksMaksim Denisov
...since there are no unique_locks any more. (cherry-picked from 9a164558010af84d834dee86f1929bd6582a1ccb)
2025-01-13GitRepo: don't reassign git_repository to git_odbMaksim Denisov
...and remove GuardedRepo. (cherry-picked from d9f39250d302152d19a0aacd76eabae7a013f1a8)
2025-01-13GitCAS: retain git_repository alive.Maksim Denisov
(cherry-picked from 7b50ad08180edb160d023ed61518cd9256f65f70)
2025-01-13GitCAS: implement method for creation of an empty GitCASMaksim Denisov
...and use it in GitRepo to set custom backends. (cherry-picked 99860b78304817c4d5b27ec4c661b733e30a430a)
2025-01-13GitCAS: remove redundant methodMaksim Denisov
(cherry-picked from f40780393d68e2ebb866d8b941b5a30f0ea5f0de)
2025-01-13GitCAS: avoid manual memory managementMaksim Denisov
...and fix a potential memory leak in the try-catch for std::filesystem::absolute. (cherry-picked from 44ec2679c68cbe6141b76d9758b5986725a62d91)
2025-01-13GitCAS: use the same call for openning repository as GitRepo does.Maksim Denisov
(cherry-picked from cdd3a6a777a36ff98b60cf47c91281a69c39c4e2)
2025-01-13GitRepo: keep GuardedRepo unexposed and adjust the interface.Maksim Denisov
(cherry-picked from d9f39250d302152d19a0aacd76eabae7a013f1a8)
2025-01-13Start 1.4.2 development cycleKlaus Aehlig
2024-12-03Release 1.4.1v1.4.1Klaus Aehlig
2024-12-03Avoid double deletion of git_repository in GuardedRepoMaksim Denisov
(cherry-picked from 59a485598d1a57b78fb60fe7df7dfe08a1cadd83)
2024-12-03Synchronize initialization of a git repo across processesMaksim Denisov
2024-12-03Store keys in CriticalGitOpGuard's mapMaksim Denisov
(cherry-picked from af759f79b9a04ea914edf35037951c1fe993d824)
2024-12-03Ensure gitstrarray gets created with alive pointers.Maksim Denisov
(cherry-picked from 9dc61e9faca5e8b05a1a2a2eed83a5468aeb6202)
2024-12-03Fix unchecked access to FileRootMaksim Denisov
(cherry-picked from a9899714c61b998f408e36d870ad8408ec780590)
2024-12-03Serve service: properly lock git operations against each otherKlaus Aehlig
... by using an exclusive lock. A lock of which only ever shared instances are requested has no synchronisation effect. Fix this. (cherry-picked from dfb7ad5c7d5dcca13d9728534434079a2b60bdea)
2024-12-03just main: subcommand traverse should only traverseKlaus Aehlig
... regardless of success. If traversing fails, we should just return failure. In this way, we can also avoid an unnecessary else-branch. While there, always return normally for tarverse, avoiding direct exits. (cherry-picked from 3583ed73a269d7467f2b485bf345a0b70cc1b279)
2024-12-03Start 1.4.1 development cycleKlaus Aehlig
2024-11-04Release 1.4.0v1.4.0Klaus Aehlig
2024-10-30Release 1.4.0~beta1v1.4.0-beta1Klaus Aehlig
2024-10-29Graph traverser: fix wrong wording in trace-level messageKlaus Aehlig
As we write the first message about the actual upload of a blob, we should use future rather than past tense. Also, again at trace level, add a message of successful completion, if we succeeded.
2024-10-29Clean up unused dependenciesKlaus Aehlig
2024-10-28Retry Execution on FAILED_PRECONDITIONKlaus Aehlig
The specification for this status code is as follows. One or more errors occurred in setting up the action requested, such as a missing input or command or no worker being available. The client may be able to fix the errors and retry. We routinely ensure all inputs are available to the remote execution before we start an action, so all prerequisites will be there on a compliant server, however might not actually be on a server where the CAS only has eventual consistency or is incorrect (due to old cache entries on CAS purge) in its answer to FindMissingBlobs. While we have no guarantee that a retry will help, we still retry; at least in the case of an unavailable worker or CAS entries not yet available due to eventual consistency, this will help. Also, we log at debug lvel the full response, including the repeated Any message. In this way, we can find out what useful information (if any) is sent by popular remote-execution services and implement more specific mitigations in the future.
2024-10-28BatchUploadBlobs: decrease log level for retried tasksKlaus Aehlig
In BatchUploadBlobs we accept short writes and, in case of no progress, fall back to single blob upload. Therefore, failure to upload blobs is not fatal and therefore should not be reported at error level. Decrease the log level accordingly: a protocol failure to upload is a performance-related event (as the retry needs additional time), catching an internal exception is something that shouldn't really happen, so we warn the user.
2024-10-28WithRetry: Support reduced log level for failuresKlaus Aehlig
In some situations, we use a retry strategy, but in case of complete failure have another way of attempting that task. In this case, we should not emmit an error message right away. Add support for this.
2024-10-25Add dependencies explicitly that are included directlyKlaus Aehlig
... instead of relying on those dependencies being pulled in indirectly.
2024-10-25Enable compatible mode for just-mr and SourceTree serve service...Paul Cristian Sarbu
...by using the new local api that can handle any remote endpoint, irrespective of protocol. Also ensure all tests for the serve service are now being run both in native and compatible modes.
2024-10-25Add new local execution api that can interact with any remotePaul Cristian Sarbu
...irespective of the used protocol. This api is useful in enabling just-mr and the SourceTree service of just serve to interact seamlessly with any remote-execution endpoint.
2024-10-25serve service: Set correct protocol-aware digests in responsesPaul Cristian Sarbu
When returning digests in responses, ensure they are of the type the remote would know. Compatible digests can be found vis the stored mappings from Git digests to bazel objects.
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-25serve proto: Fix inconsistencies in referring to GitPaul Cristian Sarbu
2024-10-25just-mr and SourceTree: Use new Git execution api instancePaul Cristian Sarbu
In just-mr: to instantiate the new Git api instance, both storage configs, as well as the compatible storage, need to be passed to the maps. While there, use more explicit naming schemes for the storage and CAS instances used. In serve: also acquire gc locks for the local storages when needed to instantiate the new Git api, which now has access to the CAS. In all these instances we also pass, as needed, the local api, which currently still operates only in native mode. This makes no difference currently, but will ensure less changes needed when the future compatible-aware local api will be used instead.
2024-10-25Add new Git execution api that can interact with any remotePaul Cristian Sarbu
...irrespective of the used protocol. This api is useful in enabling just-mr and the SourceTree service of just serve to interact seamlessly with any remote-execution endpoint.
2024-10-25serve service: Give SourceTreeService access to both local storagesPaul Cristian Sarbu
...native and compatible, even if currently only native is active. While there, be more explicit in which storage instance is being used.
2024-10-25just-mr: Instantiate both native and compatible storages...Paul Cristian Sarbu
...to be later passed to maps that might need them. This is a preparatory commit. Currently only the native storage is actively being used.
2024-10-25just-mr: Use explicit naming in default instantiated storagePaul Cristian Sarbu
As just-mr will always create Git roots, be explicit in the names of variables to state that the default storage created is native.
2024-10-25Add utility methods for digest mappingsPaul Cristian Sarbu
These allow to read and write file associations between known digests in different CAS instances.
2024-10-25BazelMsgFactory: Add method to create bazel Directory from Git treePaul Cristian Sarbu
2024-10-25StorageUtils: Add generation-aware rehashing ID file mapPaul Cristian Sarbu
Such a file could be used to store mappings of digests from CAS or Git cache to digests of different hash type that represent same content.
2024-10-25ArtifactDigest: Add getter for hash function typePaul Cristian Sarbu
2024-10-25just-mr: Small fixesPaul Cristian Sarbu