feat(kvp): add ProvisioningReport abstraction over KvpPoolStore#310
Merged
Conversation
Add a ProvisioningReport that converts to ordered KVP entries via a new ToKvp trait and persists with write_report. ToKvp is the seam for a future diagnostics report to reuse write_report unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #310 +/- ##
==========================================
+ Coverage 95.32% 95.70% +0.38%
==========================================
Files 21 23 +2
Lines 7076 7705 +629
==========================================
+ Hits 6745 7374 +629
Misses 331 331 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cjp256
reviewed
Jun 18, 2026
…ioning-report # Conflicts: # libazureinit-kvp/Cargo.toml
Branch ProvisioningReport::encode per outcome so success extras trail the standard fields (failure layout unchanged), require a typed ReportPpsType on the constructors, rename error() -> failure(), and mark ReportPpsType non_exhaustive. Adds layout and pps_type wire-string tests.
cadejacobson
approved these changes
Jun 29, 2026
cadejacobson
left a comment
Collaborator
There was a problem hiding this comment.
Looks awesome! Great work
cjp256
reviewed
Jun 30, 2026
cjp256
reviewed
Jun 30, 2026
cjp256
reviewed
Jul 7, 2026
Close the codecov gaps on the new CLI paths and rework --supporting-data so one flag can carry multiple comma-separated pairs, including values that contain literal commas.
cjp256
approved these changes
Jul 8, 2026
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.
Summary
Introduces a
ProvisioningReporttype in thelibazureinit-kvpcrate that models a provisioning health report as structured data and persists it to a KVP pool as ordered key/value entries — replacing ad-hoc string building at the call site.What's included
ProvisioningReport— report withsuccess(agent, vm_id)anderror(agent, vm_id, reason)constructors pluswith_pps_type,with_documentation_url, andwith_extrabuilders. Fields are private; the success⇔no-reason / error⇔reason invariant is enforced through the constructors.ToKvptrait — converts a report into orderedVec<(String, String)>entries. Acts as the shared seam so a future diagnostics report can reusewrite_reportwithout changes here.write_report— persists entries viaKvpPoolStore::insert(upsert / last-write-wins).Testing