commit | 0b3aac94581f63b3024b261fa6a9f298d0cca52b | [log] [tgz] |
---|---|---|
author | Lorenz Brun <lorenz@monogon.tech> | Thu Mar 16 16:49:56 2023 +0100 |
committer | Lorenz Brun <lorenz@monogon.tech> | Mon Mar 20 11:23:46 2023 +0000 |
tree | 5d08ccdc172f131c99b7acaabb108d2d4d4ce53b | |
parent | cf33f6805a7842a1aa7fac377468d9ca54f8d05b [diff] |
g/a/toposort: add topological sorting pkg This adds a package which implements topological sorting. There are existing Go packages out there which do this, but all of them have various shortcomings, either in the API or in performance or stability. This uses a fairly simple DFS-based algorithm for doing the majority of the work. It uses generics for the nodes to allow for flexibility and is covered by a fuzz test to check for correctness. Change-Id: I4ae3f0b97ef801350b87cdae3a3d9a1ba63830e3 Reviewed-on: https://review.monogon.dev/c/monogon/+/1351 Tested-by: Jenkins CI Reviewed-by: Serge Bazanski <serge@monogon.tech>
This is the main repository containing the source code for the Monogon Platform.
This is pre-release software - take a look, and check back later!
Our build environment is self-contained and requires only minimal host dependencies:
/dev/kvm
(if you want to run tests).Our docs assume that Bazelisk is available as bazel
on your PATH.
Refer to SETUP.md for detailed instructions.
Build CLI and node image:
bazel build //metropolis/cli/dbg //:launch -c dbg
Launch an ephemeral test node:
bazel test //:launch -c dbg --test_output=streamed
Run a kubectl command while the test is running:
bazel-bin/metropolis/cli/dbg/dbg_/dbg kubectl describe node
Run full test suite:
bazel test -c dbg //...