ls-apis should use package-manifest.toml to figure out which version of related repos to use#10220
Draft
davepacheco wants to merge 4 commits intomainfrom
Draft
ls-apis should use package-manifest.toml to figure out which version of related repos to use#10220davepacheco wants to merge 4 commits intomainfrom
davepacheco wants to merge 4 commits intomainfrom
Conversation
davepacheco
commented
Apr 3, 2026
| Arc::into_inner(omicron).expect("no more Omicron Arc references"), | ||
| ); | ||
|
|
||
| // To load Dendrite, we need to look something up in Maghemite (loaded |
Collaborator
Author
There was a problem hiding this comment.
This appears to have been totally superfluous after #7907, which added "dendrite" to the block above instead.
| linear-map = "1.2.0" | ||
| live-tests-macros = { path = "live-tests/macros" } | ||
| lldpd_client = { git = "https://github.com/oxidecomputer/lldp", package = "lldpd-client" } | ||
| lldpd_client = { git = "https://github.com/oxidecomputer/lldp", rev = "c3305fd1a7ea7aba31f3834757a6b931e4f59fe6", package = "lldpd-client" } |
Collaborator
Author
There was a problem hiding this comment.
Most of our other packages have specific Git commits in Cargo.toml and that seems appropriate so I've done that here. In practice, this also updates this dependency. I now see that was a breaking change so there's more work here to be done. I'll split this into a separate PR.
| source.repo = "lldp" | ||
| source.commit = "61479b6922f9112fbe1e722414d2b8055212cb12" | ||
| source.sha256 = "8f988c0b0fa3ad4121ab0e825298601035e56c5c054bdc3a1dfb4d6c8fd5b300" | ||
| source.commit = "c3305fd1a7ea7aba31f3834757a6b931e4f59fe6" |
Collaborator
Author
There was a problem hiding this comment.
This updates lldp to latest. I will split this into a separate PR (along with the lldpd-client dep change). I'm not sure what the implications are so I'll likely wait til the next release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(depends on #10217)
This change causes
ls-apisto parsepackage-manifest.tomlto figure out what commits of related repos (like Crucible, Dendrite, etc.) will actually be deployed (from the current Omicron workspace). It then uses this information to choose the correct clone of the repo to use for its analysis.There are a few other changes here I had to make (like bringing lldpd-client's deps in sync). I will probably split these out into separate PRs. I will likely wait for R19 because I'm not sure what the impact of updating these components is.
Background
ls-apisneeds access to checked-out repos for Omicron as well as related components like Dendrite, LLDP, Crucible, Propolis, etc. It wants the versions of these repos that get deployed on real systems (based on the Omicron workspace that it's running in), since the goal is to analyze the runtime API dependencies between these components. It could create its own clones of these repos, but instead, it leverages the fact that just runningcargo metadatain Omicron requires having downloaded copies of all of these repos already. How doesls-apisfind these copies? It uses Cargo to locate a package that's known to be in that repo. Generally, it picks the package of a client that Omicron already from that repo, likedpd-clientto find Dendrite.But it's not quite so simple: Omicron can reference multiple versions of a given repo. More specifically: Omicron may reference
dpd-clientfrom multiple versions of Dendrite. This happens withdpd-clientspecifically:This is almost certainly not great. But it shouldn't cause
ls-apisto break. Right now if this happens,ls-apispicks one of these arbitrarily, which can cause it to analyze the wrong version of our software and draw wrong conclusions. This is the real cause of #10214.Again: we want
ls-apisto be looking at the version of these things that gets deployed. How can it know which one it is? The authoritative version is the one in package-manifest.toml. Hence the solution here: parse that file, find the commit being used there, and choose the version of the package that corresponds to that commit.Other notes
This is still a little cheesy in a few ways:
but I think it's a meaningful improvement.
One other note: this will break in the future if:
dpd-clientpaths above is deliberately fixed to an old version for upgrade-related reasons. This works out fine though because there's another reference todpd-clientthat is the right version.ls-apisneeds to analyze both?TODO