tvl-depot/nix
sterni 8fed8982b7 feat(nix/buildkite): reflect deps between derivations in pipelines
Most of the steps in our buildkite pipeline build derivations without
doing anything else. A lot of those derivations depend on each other.
Consequently, buildkite will schedule builds of derivations whose
dependencies are still in the process of being built. The result is many
buildkite agents doing nothing but blocking on other derivations being
built. We can easily prevent this by using the dependency information we
can get from the derivation (files) of the targets we want to build and
translating them into buildkite step dependencies.

The hard part of this has already been done for a while:
//nix/dependency-analyzer finds the dependencies between a list of
“known” derivations (even if they only depend on each other through
intermediate derivations) without depending on a specific derivation
builder convention, but rather relying on `.drv` files. It still has a
few rough edges, but has been working reliably for our purposes.

Since our steps are identified by derivation hashes, we can just
directly use the available dependency data. Luckily, buildkite seems to
just takes a step as if it was completed if it is skipped, so we don't
even have to check whether dependencies have been skipped or not.

On whitby it seems that the dependency analysis costs about a minute
additionally (which is how long it takes to run
//nix/dependency-analyzer in isolation just about).

Supersedes cl/5063, cl/5060, cl/5064 and cl/5065.

Change-Id: I91d2eb2b43d60811cac0d26fa94467298f622970
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11116
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
2024-04-16 16:16:05 +00:00
..
binify style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
bufCheck chore: move protoCheck into extraStep of //nix/bufCheck 2024-03-15 11:55:54 +00:00
buildGo chore(nix/buildGo): add support for Go 1.20+ 2024-02-12 15:58:58 +00:00
buildkite feat(nix/buildkite): reflect deps between derivations in pipelines 2024-04-16 16:16:05 +00:00
buildLisp chore: remove comments formerly meant for alignment 2023-05-31 10:55:07 +00:00
buildManPages chore(gerrit): migrate OWNERS files to code-owners style 2022-09-19 11:13:28 +00:00
dependency-analyzer fix(nix/dependency-analyzer): ignore non-drv paths for Nix < 2.6 2024-04-15 19:21:02 +00:00
drvSeqL style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
emptyDerivation chore(gerrit): migrate OWNERS files to code-owners style 2022-09-19 11:13:28 +00:00
escapeExecline style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
getBins style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
lazy-deps feat(nix/lazy-deps): add override pattern for deps 2023-04-24 10:56:40 +00:00
mergePatch style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
netstring style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
nint chore(gerrit): migrate OWNERS files to code-owners style 2022-09-19 11:13:28 +00:00
nix-1p docs(nix-1p): clarify wording for what is an expression 2024-02-02 16:39:44 +00:00
readTree fix(nix/readTree): Fix typo in docs 2023-11-30 14:40:44 +00:00
renderMarkdown feat(nix/renderMarkdown): add optional tagfilter argument 2023-09-08 13:51:26 +00:00
runExecline style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
runTestsuite style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
sparseTree feat(nix/sparseTree): add optional name argument 2023-08-08 20:11:56 +00:00
stateMonad refactor(nix/stateMonad): optimize after 2022-10-08 10:59:45 +00:00
tag fix(nix/tag): correct no match check in discr 2022-10-09 13:25:14 +00:00
tailscale style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
utils revert(nix/utils): onlyDrvPath to get the drvPath w/o the outputs 2022-11-09 15:36:29 +00:00
writeElispBin chore(3p/sources): Bump channels and overlays 2022-04-21 16:54:07 +00:00
writeExecline style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
writers style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
writeScript style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
writeScriptBin refactor(nix): use our own writeScript(Bin) 2020-06-30 00:19:27 +00:00
writeTree feat(nix/writeTree): don't require IfD for drvs in tree 2024-02-21 20:52:20 +00:00
yants docs(yants): Update josh cloning instructions 2022-02-19 11:37:00 +00:00
OWNERS chore(gerrit): migrate OWNERS files to code-owners style 2022-09-19 11:13:28 +00:00