Open
Conversation
Artifact types are known ahead of time when the PHD artifact manifest is parsed. These won't change throughout a test, really only the path that those artifacts are locally cached at is the only element of an artifact that *may* change - and even then, only if the artifact is not already local in manifest or cache. So, move this mutable component of StoredArtifact behind a mutex, and let the rest of the artifact's description be accessible any time. The corresponding shuffling means that accessing a guest OS kind no longer implies downloading the referenced aritfact, an edge case which no one has noticed and no one will miss probably!
iximeow
commented
Mar 25, 2026
Comment on lines
+353
to
+354
| let entry = self.get_artifact(artifact_name)?; | ||
| match entry.description.kind { |
Member
Author
There was a problem hiding this comment.
this is where i momentarily had a tokio::task::block_in_place(|| let rt = ...; rt.block_on(entry.lock())) that was so terrible it would have caused @hawkw to close the tab, but i shoved some mutexes around and now it's just normal code
a87bbc5 to
49d2e1b
Compare
dancrossnyc
approved these changes
Mar 25, 2026
This gives us some additional confidence that all tests that run either: * pass * skip, but were expected to given the test hardware/guest configuration Importantly, not all PHD tests pass on all hardware/guest OS combinations, and not all PHD tests even *run* on all hardware/guest combinations. As a bit of a fluke, *Intel* happens to run one additional test that is skipped on AMD processors, even. The strategy is to run "skipped" tests and verify they skip because if guest artifacts are changed unexpectedly we may need to better understand how the artifact differs from PHD expectations. Or if Propolis/PHD implementation changes such that the skip is no longer taken, failing the test instead of silently passing will force us to notice if that change is wanted, if the test *should* pass, etc. As an example, the test Alpine image is currently expected to be an `alpine-virt` on an ISO 9660 (read-only) filesystem. Since this means the EFI system partition is also read-only, `guest_can_adjust_boot_order` is not a meaningful test (for now). We run this test anyway and *expect* a skip, because if it passed then either: * the guest Alpine is on a writable root FS; are we missing test coverage involving read-only guest images? * we've moved EFI NvVars to out-of-guest storage, and efivarfs writes succeed. In either case, the corresponding changes should have some consideration for how they relate Propolis and guest operations.
49d2e1b to
6b0a6a5
Compare
Member
Author
|
I'd fixed the clippy lints, and caught |
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.
the two commits here are distinct but related (in particular, second builds on the first), so I plan to do the rare "rebase and merge" on this one. because of that, the useful PR description is really just those two messages:
phd: getting guest OS kinds should not involve locks
Artifact types are known ahead of time when the PHD artifact manifest is
parsed. These won't change throughout a test, really only the path that
those artifacts are locally cached at is the only element of an artifact
that may change - and even then, only if the artifact is not already
local in manifest or cache.
So, move this mutable component of StoredArtifact behind a mutex, and
let the rest of the artifact's description be accessible any time.
The corresponding shuffling means that accessing a guest OS kind no
longer implies downloading the referenced aritfact, an edge case which
no one has noticed and no one will miss probably!
phd: be pedantic about what test skips are OK
This gives us some additional confidence that all tests that run either:
Importantly, not all PHD tests pass on all hardware/guest OS
combinations, and not all PHD tests even run on all hardware/guest
combinations. As a bit of a fluke, Intel happens to run one additional
test that is skipped on AMD processors, even.
The strategy is to run "skipped" tests and verify they skip because if
guest artifacts are changed unexpectedly we may need to better
understand how the artifact differs from PHD expectations. Or if
Propolis/PHD implementation changes such that the skip is no longer
taken, failing the test instead of silently passing will force us to
notice if that change is wanted, if the test should pass, etc.
As an example, the test Alpine image is currently expected to be an
alpine-virton an ISO 9660 (read-only) filesystem. Since this meansthe EFI system partition is also read-only,
guest_can_adjust_boot_orderis not a meaningful test (for now). Werun this test anyway and expect a skip, because if it passed then
either:
coverage involving read-only guest images?
succeed.
In either case, the corresponding changes should have some consideration
for how they relate Propolis and guest operations.
I've only really given this a run with the default Alpine guest for the time being. from the
phd_skip!()I found I'm pretty sure the predicates generalize to other guests/configs/etc and any other stuff we can suss out if/when we find it.