Repository navigation
Conversation
ecde953 to
06fce79
Compare
06fce79 to
de5ed00
Compare
- Adds the Dropshot `usdt-probes` feature to every crate depending on both Dropshot and `slog-dtrace`. Leaving this feature out causes build failures when compiling packages individually, as the selected `usdt` feature actually includes inline assembly, but Dropshot does not include the right feature-selection crate attribute. This works when building the whole workspace, since all features are unioned. - Adds a `check` subcommand to `omicron-package`, that runs `cargo check` instead of `cargo build`. This is also run during CI now, to catch regressions here, at least for the crates that we package via `omicron-package`.
davepacheco
left a comment
There was a problem hiding this comment.
We talked about this a bunch offline and discussed some alternative solutions. If it's useful to land this PR in the meantime, that works, or we could revert the slog-dtrace change for now.
| - name: Check style | ||
| run: cargo fmt -- --check | ||
|
|
||
| check-omicron-deployment: |
There was a problem hiding this comment.
I wonder if this will be a lot slower (or faster?) than making this a step in the build-and-test job. As a step in the build-and-test job, we may not need to rebuild as many things. But maybe the point is to rebuild them, and this will be run by GitHub in parallel, so maybe it doesn't matter?
|
I'd like to add some more context here, to help illuminate the actual cause of this problem. Prior to this, building a crate like This is because of an unfortunate combination of how features are unified and some of the internals of the Specifically, Sled agent also depends on Now Now, why didn't we see this in CI? CI only builds the entire workspace, which takes the union of all features for all dependencies. One dependency, SolutionsThis issue is caused by a complex confluence of multiple things: feature resolution, unstable/nightly Rust, and declarative macros. As is, it's not possible to write the correct set of feature flags in any one package, since that depends on both where the package is included, and whether it's built as a single package or as part of a workspace. But there are some ideas. One is to change Another idea is to change how library crates like Instead, #[cfg(feature = "usdt-probes")]
probes::my_probe_macro!();Now that probe would not even be referred to in the final binary if the I've tested that this latter approach works, by patching |
610db25 to
70d166c
Compare
duplicated in the rust-toolchain.toml file.
|
Note: This PR also deliberately enables Dropshot's USDT probes in all packages that consume it as a dependency. |
bd8f6f5 to
a5b9945
Compare
|
I seem to be stuck in the third circle of hell, which is GitHub continually reporting |
|
I am increasingly frustrated. The required status checks are actually running on the individual commits, but somehow this is not equivalent to the check passing for the PR itself. I am going nuclear, and will be closing this PR, deleting the remote branch, and reopening a new PR. The other "solutions" I've found by searching suggest removing the branch protection rules that require the status checks in the first place, which I have neither the permissions nor inclination to do. |
|
Well, after that spectacularly unproductive bout of force-pushing, this PR has been continued as #496. The status checks still refuse to report. |
usdt-probesfeature to every crate depending onboth Dropshot and
slog-dtrace. Leaving this feature out causes buildfailures when compiling packages individually, as the selected
usdtfeature actually includes inline assembly, but Dropshot does not
include the right feature-selection crate attribute. This works when
building the whole workspace, since all features are unioned.
checksubcommand toomicron-package, that runscargo checkinstead ofcargo build. This is also run during CI now, tocatch regressions here, at least for the crates that we package via
omicron-package.