Add test-log dev-dependency and import it in the test module so that
all #[test] functions automatically capture log output, displaying it
only when a test fails. Note that `RUST_LOG` needs to be set when
running the tests to see the log output.
Add structured logging throughout the COB evaluation and mutation
paths to aid debugging:
- debug: job creation, root initialisation, op application, run
insertion, finishing, and log-setting
- warn: no-op situations like duplicate runs, missing nodes, or
missing UUIDs
Update to `radicle-0.24.0`. This update introduces the change of the
`radicle::cob::store` API changes. The `Store` structure now requires
an `Access` parameter. This is fulfilled by `access::ReadOnly` or
`access::WriteAs`. `ReadOnly` is trivially constructed, and provides
read access to `Jobs`. `WriteAs` is constructed with the signer of the
node, and provides read and write access to `Jobs`. Since the signer
is provided at construction, it is no longer needed to be passed into
`Jobs` operations.
This necessarily updates the MSRV to 1.86.0 since transitive crates
required a later version.
Use an iterative loop with `return` and `continue` to avoid stack overflow.
A stack overflow could have occurred due to the recursion, and
potentially many jobs.
With the Run storing the timestamp, it can be added to the CLI output
as well.
When pretty printing the timestamp, `chrono` is used to have a
date-time format.
For each Run, the timestamp can be easily tracked using the
operation's timestamp. This field is added to Run to provide more
information to end users.
Introducing a `FindByCommit` iterator, which can be constructed using
`Jobs::find_by_commit`.
This allows the caller to supply a `git::Oid` and get back an `Iterator` of all
`Job`s that are running for that commit.
Some public items of the crate were undocumented. These items are now better
described in detail, and the missing docs pragma is added to catch further
missing items in the future.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
Sets the MSRV for the crate. The `rust-toolchain.toml` file is dropped since
this is too retrictive when choosing choosing a toolchain for developing the
crate – uses exact semantics.
It is necessary to change the `flake.nix` to read this version from the
`Cargo.toml` so that it can select the rust toolchain to use via `rust-overlay`.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
Use `refs/heads/master` to ensure the latest updates – including the
`Transaction::initial` changes. This is a stop-gap until a new version of
`radicle` is published to crates.io.