← Back to issue list

refactor: deduplicate hookutil

View original Github issue

Metadata

Project
craft-providers
Number
#1006
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1006 (f366c2f) replaced hookutil's custom LXC wrapper with craft_providers.lxd.LXC, translated LXD failures to HookError, and resolved #715.

Resolution: closed resolved

Reason: PR #1006 was approved and merged as commit f366c2f. It deduplicated the LXC implementation and preserved hook-specific error reporting.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Replace hookutil's ad hoc lxc subprocess wrapper with the shared `craft_providers.lxd.LXC` client, and preserve hook-specific error reporting by translating LXD failures into `HookError`. Fixes #715 --- - [ ] I've followed the [contribution guidelines](https://github.com/canonical/starbase/blob/main/CONTRIBUTING.md). - [ ] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [ ] I've successfully run `make lint && make test`. - [ ] I've added or updated any relevant documentation. - [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1006 (f366c2f) replaced hookutil's custom LXC wrapper with craft_providers.lxd.LXC, translated LXD failures to HookError, and resolved #715.
stealth/space-bunny-alpha — closed resolved Merged PR #1006 at f366c2f, replacing hookutil's custom LXC wrapper with craft_providers.lxd.LXC and mapping LXD errors to HookError; fixes #715.
qwen/qwen3.8-27b — — Merged after approval. Replaced hookutil's ad hoc LXC subprocess wrapper with craft_providers.lxd.LXC, translating LXD failures to HookError; fixes #715.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 30
Confidence: 95
needs review Replaces ad hoc LXC subprocess wrapper in hookutil with shared craft_providers.lxd.LXC client and translates failures to HookError. Approved by 1 reviewer, all CI checks passing, ready to merge.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 20
Confidence: 90
needs review Replaces hookutil's ad hoc LXC subprocess wrapper with the shared craft_providers.lxd.LXC client, translating LXD failures into HookError. Currently awaiting maintainer review with passing CI checks.
qwen/qwen3.6-35b-a3b
Staleness: 10
Complexity: 35
Confidence: 90
needs review Replaces hookutil's ad hoc LXC subprocess wrapper with the shared craft_providers.lxd.LXC client, translating LXD failures to HookError. Currently pending maintainer review with passing CI checks and zero open comments.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 35
Confidence: 85
needs review Replaces ad hoc LXC subprocess wrapper in hookutil with shared craft_providers.lxd.LXC client, translating failures to HookError. Currently pending maintainer review with 0 comments, CI lint failing, tests pending.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 30
Confidence: 80
needs review Replaces hookutil's ad hoc LXC subprocess wrapper with the shared craft_providers.lxd.LXC client and translates LXD failures into HookError. Currently pending maintainer review with one unresolved comment and a failing lint check.

Update history

Date Change
updated
updated
updated
updated
updated
created

Related work

Related issues

Issue Project State Summary Similarity
#715 Deduplicate hookutil craft-providers closed Enhancement request to deduplicate hookutil against craft-providers' own LXD code. Delivered by merged PR #1006 (commit f366c2f): hookutil now uses craft_providers.lxd.LXC and exposes BASE_INSTANCE_START_STRING.
83%