-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ls-apis
cannot see dependency from Propolis/Crucible upstairs to Nexus internal API
#6811
Comments
For my future reference and to make this super clear, here's what happens in a fresh clone of Propolis (commit fae5334bcad5e864794332c6fed5e6bb9ec88831). First, what happens when you see how
Now, when we enable the
Enabling that feature gets us the additional path from propolis-server -> propolis -> crucible -> nexus-client. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary: The
ls-apis
tool tries to identify API dependencies between components using Progenitor-based clients of Dropshot servers. Propolis includes Crucible [upstairs], which uses the Nexus internal API. Butls-apis
does not see this dependency because Crucible's use of it is behind the non-default feature flag 'notify-nexus':https://github.com/oxidecomputer/crucible/blob/2cacedab67c5af7515a8ea69abaa7937a44fe482/upstairs/Cargo.toml#L14
More precisely, as part of constructing a shipping TUF repo:
omicron/package-manifest.toml
Lines 613 to 625 in 0640bb2
propolis-server
package:https://github.com/oxidecomputer/propolis/blob/5fe523a12734d6a0630c5cf07eba7cf4bfadfb2e/.github/buildomat/jobs/image.sh#L31-L36
omicron-build
feature ofpropolis-server
enables theomicron-build
feature of its dependency onpropolis
:https://github.com/oxidecomputer/propolis/blob/5fe523a12734d6a0630c5cf07eba7cf4bfadfb2e/bin/propolis-server/Cargo.toml#L81-L83
omicron-build
feature ofpropolis
enables thenotify-nexus
feature of its dependency oncrucible
(which is the Crucible upstairs package):https://github.com/oxidecomputer/propolis/blob/5fe523a12734d6a0630c5cf07eba7cf4bfadfb2e/lib/propolis/Cargo.toml#L61-L63
and that gets us a Propolis binary containing a Crucible that uses the Nexus internal API.
However,
ls-apis
works by looking atcargo metadata
in clones of these repos, which only enables the default features. As a result, when it looks at dependencies ofpropolis-server
, it sees the dependency onpropolis
and thencrucible
, but without crucible'snotify-nexus
feature, and so it doesn't see the dependency onnexus-client
. That's bad!In practice, this isn't a huge issue right now because Propolis itself depends on
nexus-client
. And sincels-apis
(and the upgrade project) doesn't really care about which part of a shipped component uses some other component, this is sufficient. This would be a bigger problem if for whatever reason Propolis stopped using the same client that Crucible is using here (e.g., if Propolis stopped needing it, or if we break up the Nexus internal API into separate APIs that Propolis and Crucible separately consume).Related: oxidecomputer/crucible#1280, which would fix this.
The text was updated successfully, but these errors were encountered: