summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-09Validate bazel_re::Digests in BazelDigestFactoryMaksim Denisov
2024-09-09Test HashInfoMaksim Denisov
2024-09-09Implement HashInfo classMaksim Denisov
...that validates hashes and stores some additional information about them.
2024-09-09Remove redundant operator lessMaksim Denisov
...from ObjectInfo and ArtifactDigest
2024-09-09Generalize GetMissingArtifacts with templated iteratorsMaksim Denisov
2024-08-30Cast ArtifactDigest to bazel_re::Digest explicitlyMaksim Denisov
...to simplify further refactoring.
2024-08-30Use BazelDigestFactory to create bazel_re::Digest directly if neededMaksim Denisov
...bypassing ArtifactDigest functionality.
2024-08-30Replace bazel_re::Digest in add_to_casMaksim Denisov
...with ArtifactDigest.
2024-08-30Replace bazel_re::Digest in BazelMsgFactory (trees)Maksim Denisov
...with ArtifactDigest.
2024-08-30Move artifact_blob_container to a standalone libraryMaksim Denisov
2024-08-30Replace bazel_re::Digest in BazelMsgFactory (local trees)Maksim Denisov
...with ArtifactDigest.
2024-08-30Replace bazel_re::Digest in UplinkerMaksim Denisov
...with ArtifactDigest.
2024-08-30Replace bazel_re::Digest in LocalACMaksim Denisov
...with ArtifactDigest.
2024-08-30Replace bazel_re::Digest in CASUtilsMaksim Denisov
...with ArtifactDigest
2024-08-30Replace bazel_re::Digest in LocalCAS::CheckTreeInvariantMaksim Denisov
...with ArtifactDigest
2024-08-30Replace bazel_re::Digest in LocalCAS::Split/SpliceMaksim Denisov
...with ArtifactDigest.
2024-08-30Replace bazel_re::Digest in LocalCAS::{...}PathMaksim Denisov
...with ArtifactDigest.
2024-08-30Return ArtifactDigest from LocalCAS::StoreMaksim Denisov
2024-08-30Replace bazel_re::Digest in LargeObjectCASMaksim Denisov
...with ArtifactDigest.
2024-08-30Replace bazel_re::Digest in ObjectCASMaksim Denisov
...with ArtifactDigest.
2024-08-30Replace bazel_re::Digest in GitRepo::SymlinksCheckFunc callbackMaksim Denisov
...with ArtifactDigest.
2024-08-30Unify symlink checks in git treeMaksim Denisov
2024-08-30Return the IsTree flag from ArtifactDigestMaksim Denisov
...and replace obvious redundant conversions to bazel_re::Digest, which were done to ensure that the digest represents a tree.
2024-08-30Remove blob_creator lib from testsMaksim Denisov
...and move this functionality to bazel_msg_factory_test, where it is actually used. For local_cas.test the regular hashing is used, since blob_creator is redundant there.
2024-08-30Retry on exceeding deadline obtaining the status of a running executionKlaus Aehlig
Remote execution of actions is handled via long-running operations. Here we have to be careful with the involved status codes: there is the status code of the operation and the response contains a faild that also happens to be a status code. The protocol states Errors discovered during creation of the `Operation` will be reported as gRPC Status errors, while errors that occurred while running the action will be reported in the `status` field of the `ExecuteResponse` So we have to distinguish between two kinds of DEADLINE_EXCEEDED. - If reported by the rpc, it means, we failed to obtain the status of the ongoing action in a reasonable amount of time; here we can do nothing but retry. - If we obtain an answer and that answer has state DEADLINE_EXCEEDED this means "The execution timed out."; hence we must not retry and report the result properly to the user.
2024-08-30Drop expressions for first/last element of a list entirelyKlaus Aehlig
... as using the built-in "[]" directly is cleaner and equally readable.
2024-08-29test just-mr: Add symlink cycle detection checks for repository rootsv1.4.0-alpha+20240829Paul Cristian Sarbu
2024-08-29FileSystemManager: Implicit copy should not follow symlinksPaul Cristian Sarbu
The default options of std::filesystem::copy include following symlinks, resulting in file repositories creating wrong trees if containing unresolved symlinks, or failing unexpectedly early if symlink cycles existed. This is fixed by ensuring the copy_symlinks option is always used.
2024-08-29just-mr maps: Properly check for missing values in map chainPaul Cristian Sarbu
The root async map in a chain of calls should always be checked for missing value, which can happen if, e.g., a cycle happens or a thread gets killed by the system. Properly handle this by checking explicitly if a value has been posted. If not, check for cycles where it makes sense (for example, in the resolving of symlinks), otherwise report any pending map keys not yet processed. This is done for all just-mr commands working with async maps.
2024-08-29just-mr maps: Add utility key-printing functionsPaul Cristian Sarbu
...to be used when reporting pending keys on failure to post value.
2024-08-29async_map_utils: Pass key_printer also for reporting pending tasks...Paul Cristian Sarbu
...in async map instances, same as for reporting cycles. This removes the restriction that the key object has to posses the ToString method, allowing it to be used, e.g., with just-mr maps. The now obsolete HasToString concept is removed.
2024-08-29just-mr maps: Fix wrong or missing return conditionsPaul Cristian Sarbu
2024-08-29SourceTree: Check for missing value after using resolve_symlinks_mapPaul Cristian Sarbu
Fixes a false assumption that the result of resolving the tree will always be set if the map doesn't log fatal, when in fact the map might fail to set a value if, e.g., a thread is killed by the system or there is a symlinks cycle.
2024-08-28Add basic sanity check on the default outputKlaus Aehlig
2024-08-28Demote message on absence of cach key to debugKlaus Aehlig
The separation of cache-key handling and CAS lockup in e6a91bb733b0738cee0b3ae06ee640f70c1e787f unified the log-level of two messages to warning: the absence of a cache entry (originally debug) and a report on a malformed entry in the cache (originally warning). As we routinely expect non-cached actions in a build, demote those messages to debug level in order to keep the log readable and not confuse the user with warnings about expected behaviour.
2024-08-27Also retry on DEADLINE_EXCEEDEDKlaus Aehlig
... as those typically are of transient nature as well.
2024-08-27bytestream server: also enforce the tree invariantKlaus Aehlig
2024-08-27CasClient: Fall back to single blob upload, if batch uploading made no progressKlaus Aehlig
We already accept short writes in batch uploads, but when no progress is made, we cannot simply retry, as this might lead to an infinite loop. Instead, we give up on batching and upload each blob one by one.
2024-08-27bytestream API: verify that invalid digests are rejectedKlaus Aehlig
2024-08-27Bytestream server: verify hash of uploaded objectKlaus Aehlig
... and correctly report the error. - If we cannot store the bytes we received, this is an internal error. - If the bytes received have a different hash than announced, report this user error as INVLID_ARGUMENT.
2024-08-27test/utils: CC test with remote: also log remote outputKlaus Aehlig
2024-08-27Reformat code to comply with clang-format 18Klaus Aehlig
... while keeping our .clang-format file.
2024-08-27debugging tutorial: Update to include correct toolchain defaultsPaul Cristian Sarbu
This is an essential step in the debugging process that was missing in the tutorial.
2024-08-26Store LocalAC keys as ArtifactDigestsMaksim Denisov
2024-08-26Split serialization/deserialization logic in LocalACMaksim Denisov
...into writing/reading to CAS and writing/reading entries (to remove code duplications in uplinking and obtaining the result). The read functionality cannot be replaced by a single function since the CAS key of the entry is required during uplinking. Although the write functionality can, it is also separated into two parts to keep the reverse logic clear.
2024-08-26Reduce the size of large object entries.Maksim Denisov
Removed named keys of entries (hash, size). These prefixes were added for every chunk creating an additional overhead without any benefit. Removed prefixes of hashes (*62*hash) appearing in native mode and creating an additional overhead as well: it is known that all of them are blobs.
2024-08-26Add test to check that we ignore Git magic names in treesPaul Cristian Sarbu
2024-08-26install-cas --archive: Fix empty directories not added to archivePaul Cristian Sarbu
Also add empty directory in test script to ensure we don't regress in the future. While there, fix some typos.
2024-08-26GitRepo: Create commit from a directory explicitly...Paul Cristian Sarbu
...by writing its tree directly in the object database instead of working with the index. This allows the creation of trees that contain also entries with 'magic' names, such as the .git folder or .gitignore files. Callers must ensure the given directory only contains the needed entries. In particular, just-mr maps and serve service are updated to separate the import-to-Git repository path from the temporary path containing the content to be committed, to avoid polluting the content path with entries generated on repository initialization.
2024-08-26GitRepo: Add method to create tree from directoryPaul Cristian Sarbu
The tree is traversed bottom-up and each entry is explicitly added to the object database: non-directory entries have their content read and are added as blobs with corresponding permissions based on file type (regular, executable, symlink), while subdirectories are added as trees via CreateTree based on the already added blobs.