oxidecomputer / oxidecomputer/omicron

omicron-git-version requires rebuilding the most expensive-to-rebuild crate in the tree every time the git HEAD changes

Open
#10,692 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

development
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

omicron-git-version, introduced in #10578, is depended on by nexus-db-model and omdb. This uses vergen-gitcl, which emits (among other things) cargo:rerun-if-changed=.git/HEAD in a build script.

This causes all downstream crates of nexus-db-model to be recompiled any time any git operation is done which moves the HEAD, e.g. checkout or commit; this includes rebuilding nexus-db-schema, which is very expensive to recompile.

In particular I have noticed this to be particularly egregious while working on releng, amending a commit, and then retesting releng -- the system now has to rebuild half of Nexus which would have otherwise already been fresh.

I don't really have any suggestions for a better option yet, but I wanted to track this somewhere.

cc @hawkw @smklein

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the build script for omicron-git-version and how vergen-gitcl emits the .git/HEAD rerun directive, then trace its dependency paths through nexus-db-model, omdb, and nexus-db-schema. Measure rebuilds after a checkout or commit; done means HEAD changes no longer unnecessarily recompile the expensive downstream crates.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.