summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-05-19Release 1.1.0v1.1.0Klaus Aehlig
2023-05-15Relase 1.1.0~beta2v1.1.0-beta2Klaus Aehlig
2023-05-15memcheck: fix race in libgit2...Paul Cristian Sarbu
...caused by incorrectly setting and resetting the library internal state and the misuse of pthreads in libgit2. Normally, git_libgit2_init and git_libgit2_shutdown should span the life of a worker thread in order to be safely used. However, due to an incorrect implementation of libgit2's threadstate with pthreads, on unix systems there is a race condition. Until the use of pthread_key_t is corrected in libgit2, we need to apply a workaround by always ensuring that the main thread is the first thread reaching the GitContext constructor.
2023-05-05GitTree: Check optional before accessing itOliver Reiche
... and drop unecessary IsTree() check.
2023-05-03grpc: fix build fail with protobuf in debug modePaul Cristian Sarbu
2023-04-28Release 1.1.0~beta1v1.1.0-beta1Klaus Aehlig
2023-04-27just-mr: Fix config always being requiredPaul Cristian Sarbu
In just-mr the config file should only be needed if: 1. We call just with a subcommand requiring a config file, or 2. We use one of just-mr's own commands (except version).
2023-04-26imports: Switch to Microsoft GSL implementationOliver Reiche
... with two minor code base changes compared to previous use of gsl-lite: - dag.hpp: ActionNode::Ptr and ArtifactNode::Ptr are not wrapped in gsl::not_null<> anymore, due to lack of support for wrapping std::unique_ptr<>. More specifically, the move constructor is missing, rendering it impossible to use std::vector<>::emplace_back(). - utils/cpp/gsl.hpp: New header file added to implement the macros ExpectsAudit() and EnsureAudit(), asserts running only in debug builds, which were available in gsl-lite but are missing in MS GSL.
2023-04-26just-mr: Fix warning about unused lambda captureOliver Reiche
2023-04-26bazel_network: grpc++ is not a direct dependencyOliver Reiche
2023-04-26evaluator: Improve evaluation error reportingOliver Reiche
2023-04-19just-mr archive: subdir matters!Klaus Aehlig
When deciding if two archive-based repositories create the same root it is not enough to compare the contents of the archive; it also matters which subdirectory we will take as root. This is especially important, if we take the same archive on the one hand for the code and also the example subdir for testing. Additionally, we cannot ignore the archive type; there are tar archives that are also zip archives, but with different content. (Tar only cares about the initial segment till it finds the two empty blocks; zip has the index at the end and ignores any initial segment that might have been prepended to a valid zip archive.)
2023-04-14just-mr support -D optionKlaus Aehlig
Make just-mr unconditionally support an option -D that collects a configuration overlay and forwards it to the invocation of a just subcommand that supports this option. This syntax-switching facility makes it easy to embedd dynamic parts of the configuration (like the head commit to be part of a version string) as those information can unconditionally be the first argument to just-mr.
2023-04-04local API: fall back to git api, if availableKlaus Aehlig
2023-04-04just install-cas: use local git as git CASKlaus Aehlig
2023-04-04Add a git based read-only APIKlaus Aehlig
From a git CAS crate an execution API unable to execute actions or to store anything. This implementaiton of the common interface is still useful as the execution API is the interface used for tranfering artifacts.
2023-04-04Make git root part of the storage configKlaus Aehlig
In this way, we have the whole layout of the local build root consolidated in one place. Moreover, in this way, the location of the git root is also available to the build tool itself and can, e.g., be used as fallback CAS.
2023-04-04CAS: demote log messages of to debugKlaus Aehlig
As those functions indicate success, it is up to the caller to decide if the error was fatal or not. Reporting an error nevertheless might result in error messages on successful operaitons, which is confusing for the user.
2023-04-04disjoint_map_union: show conflicting values on errorKlaus Aehlig
2023-04-04command-line logging: change color schemeKlaus Aehlig
... to make it readable also on white background, where yellow is hardly readable.
2023-04-04clean up targets filesKlaus Aehlig
- deduplicate dependencies - remove unused dependency
2023-03-31git tree: degrade log level for missing entry in a git tree to debugKlaus Aehlig
... as this is only an internal functionality, and the caller will take care of a proper error message if the absence of that entry is not expected.
2023-03-30Improve error messages on reading invalid target filesKlaus Aehlig
... by including the details of the parse error.
2023-03-30GitRepo: Guard fake repository odb wrappingPaul Cristian Sarbu
In the current libgit2 implementation, a fake repository wrapped around an existing odb is being registered as owner the same way as a normal repository object. Therefore, one has to guard both the creation and destruction of the fake repository against all other git operations that might access the internal cache during this transfer of ownership.
2023-03-24libgit2: Remove use of deprecated functions...Paul Cristian Sarbu
...and enforce this through the build description.
2023-03-24just install{,-cas}: add --remember optionKlaus Aehlig
... asking just to transfer everyting installed to the local CAS first.
2023-03-23just-mr: extend self-descriptionKlaus Aehlig
2023-03-23just install{,-cas}: offer local CAS as preferred CASKlaus Aehlig
... to avoid unnecessary downloads and hence speed things up.
2023-03-23remote api: honor alternative for retrieving pathsKlaus Aehlig
2023-03-23execution api: support retrieving from more than one APIKlaus Aehlig
2023-03-23GitRepo: Make tag creation operation more robustPaul Cristian Sarbu
Use a similar logic as for repository initialisation: first check if tag has not already been created in another process, and only then try creation; make more tries with more wait in between; only retry if failure was due to internal locking.
2023-03-23GitRepo: Add proper error message for keep tag operationPaul Cristian Sarbu
2023-03-23GitRepo: Make repository initialisation more robustPaul Cristian Sarbu
As the initialisation of Git repositories is something that only takes place once, we should check early and cheaply whether the repository is already there before trying to initialize it. If we do need to initilize a repo, we can afford more attempts and longer wait times between tries to initalize if the failure to initialize happens due to the internal Git locking mechanism.
2023-03-23GitRepo: Add proper error message for repository initialisationPaul Cristian Sarbu
2023-03-23GitRepo: Make repository path usage explicitPaul Cristian Sarbu
Opening a repo should not check parent directories, only try to open at given path.
2023-03-23targets: Fix deps structurePaul Cristian Sarbu
2023-03-23GitRepoRemote: Improve logging messagesPaul Cristian Sarbu
Make capitalization consistent and log as debug whenever we revert to shelling out to git.
2023-03-23GitRepoRemote: Fix missing string in log messagePaul Cristian Sarbu
2023-03-23curl_easy_handle: fix unused return value...Alberto Sartori
...depending on the compiler and/or c++lib version, std::fread may warn about unused return value triggering a compile error, due to our compile flags.
2023-03-23just-mr: Add git binary optionPaul Cristian Sarbu
In the rare cases that we need to shell out to git, let the user configure what binary to use. Option resolves in the same way as the just executable, including allowing it to be set via just-mrrc. Updates all cases of shelling out to git (fetch and commit update). Update just-mr and just-mrrc docs accordingly.
2023-03-23just-mr: Update calls to fetch and update operations...Paul Cristian Sarbu
...to ensure the temporary directories exist before they are needed, as expected by those methods. This way, the TmpDir class takes care to also clean up after itself. Also, pass the local launcher to the methods that now shell out.
2023-03-23just-mr: Shell out to system Git for update commit from SSH remote...Paul Cristian Sarbu
...due to limitations in SSH support in libgit2. In this case, we simply execute 'git ls-remote <repo> [<branch>]' and then parse the output. Remote interogation requires no local repository, so it is an asynchronious operation by default.
2023-03-22just-mr: Shell out to system Git for fetches over SSH...Paul Cristian Sarbu
...due to limited SSH support in libgit2. In order to allow the fetches to still be parallel, we execute: git fetch --no-auto-gc --no-write-fetch-head <repo> [<branch>] This only fetches the packs without updating any refs, at the slight cost of sometimes fetching some redundant information, which for our purposes is practically a non-issue. (If really needed, a 'git gc' call can be done eventually to try to compact the fetched packs, although a save in disk space is not actually guaranteed.)
2023-03-22Git operations: Remove obsolete method declarationPaul Cristian Sarbu
2023-03-22just-mr: support log options in rc fileKlaus Aehlig
2023-03-22just-mrrc: allow setting a default for the launcher the rc fileKlaus Aehlig
2023-03-21LogLevel: support conversion from floating-point numbersKlaus Aehlig
... so that, e.g., we can set the logging from an expression value.
2023-03-20just-mr: report command output if desired tree was not createdKlaus Aehlig
2023-03-20just-mr: Fix fetch cache conditionPaul Cristian Sarbu
2023-03-20just-mr: rework progress reporting and statisticsKlaus Aehlig
To avoid unnecessary work, just-mr uses on-disk caches, including for the mapping of a distdir to the corresponding git tree. This, however, implies that the number of repositories that are actually considered varies: in order to fetch a distdir repository, all involved archives have to be fetched, but if we have a cache hit none of them is even looked at. So, in order to have a consistent reporting only count top-level targets (i.e., the reachable repositories) in the statistics, not the archives implicitly contained in a distdir, nor low-level sub tasks. The actual fetch acitvity is shown separately by the task tracker.