Skip to content
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

Add subcommand to "hydrate" a task dump #520

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mkeeter
Copy link
Contributor

@mkeeter mkeeter commented Nov 18, 2024

See oxidecomputer/management-gateway-service#316
and oxidecomputer/hubris#1921 for details

This PR adds a new humility hydrate subcommand, which takes a "dry" task dump and staples it to a Hubris archive, creating a normal Hubris core file.

let Subcommand::Other(subargs) = context.cli.cmd.as_ref().unwrap();
let subargs = Args::try_parse_from(subargs)?;
let f = std::fs::File::open(&subargs.file)?;
let mut z = zip::ZipArchive::new(f)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How well documented/stable is this format and how mad are we going to be if we need to change it in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't expect it to change much, because there's only so many ways to represent a bunch of bytes. Still, I added meta.json containing a version value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants