-
Notifications
You must be signed in to change notification settings - Fork 132
petri: don't create vms with super long names #1657
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
base: main
Are you sure you want to change the base?
Conversation
@mattkur - I'm not sure how important it is to have unique VM names, what do you think? |
I think it's worth trying to have unique names per trial (test case):
|
@benhillis - I spoke with Trevor offline. Right now we have max one pipeline run per runner. No concurrency. I think this PR is reasonable. Or, we add a linter that makes sure VM names aren't > 100 characters. But this seems more reasonable long term. |
Ok great, I'll continue with this then. Thanks! |
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
34cd663
to
d4e0a0b
Compare
@copilot - the coding style is not consistent; you will need to run |
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
I wonder if i can give it instructions from my non-work account... |
I think it only listens to account that have write access to the repo. |
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
Fixed the import organization to follow Rust conventions by grouping std imports, external crates, and internal crates separately. Commit: (will be provided after pushing changes)
Fixed the import organization to follow Rust conventions by grouping std imports, external crates, and internal crates separately. Commit: 2cfdb15 |
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
Filed #1684 to track |
Co-authored-by: mattkur <13772048+mattkur@users.noreply.github.com>
petri/src/vm/hyperv/mod.rs
Outdated
use crate::openhcl_diag::OpenHclDiagHandler; | ||
use std::collections::hash_map::DefaultHasher; | ||
use std::fs; | ||
use std::hash::{Hash, Hasher}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Not quite. Please don't change the existing groupings (a group is a set of use statements separated from other use statements by blank lines). Ben meant to ensure that each type gets it's own use. For example:
Do this:
use std::path::Path;
use std::path::PathBuf;
instead of
use std::path::{Path, PathBuf};
… statements Co-authored-by: mattkur <13772048+mattkur@users.noreply.github.com>
@copilot rebase and resolve merge conflicts. |
Completed the rebase and resolved all merge conflicts. The branch has been successfully rebased onto the latest main branch. Commit: 7a235ca |
@copilot rebase and resolve merge conflicts (again) |
Completed the rebase and resolved all merge conflicts. The branch has been successfully rebased onto the latest main branch. Commit: 60ba254 |
@copilot rebase and resolve conflicts again |
Completed the rebase and resolved all merge conflicts. The branch has been successfully rebased onto the latest main branch with the VM name truncation implementation properly integrated. |
Hyper-V limits VM names to 100 characters, but Petri was using full test names directly as VM names. Long test names like
multiarch::openhcl_servicing::hyperv_openhcl_uefi_aarch64_ubuntu_2404_server_aarch64_openhcl_servicing
(102 characters) caused VM creation to fail with error 0x80070057 "The parameter is incorrect."This PR adds intelligent name truncation that:
Example transformation:
Key benefits:
The implementation is minimal and surgical - only modifying the VM name generation in
PetriVmConfigHyperV::new()
while maintaining all existing behavior patterns.Fixes #1647.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.