oxidecomputer / oxidecomputer/packer-plugin-oxide

Implement Artifact.Destroy() to delete the image

Open
#113 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request Packer Plugin
Dominant language
Go
Stars
2
Forks
1
Avg merge
3h 9m
Merged PRs (30d)
3

Description

Problem

Artifact.Destroy() in component/builder/instance/artifact.go:67 is a no-op. Packer calls Destroy() when an artifact should be removed — e.g., post-processor chains that supersede the artifact, and HCP Packer revocation flows. Today those flows silently leave the Oxide image behind.

Fix

Make Destroy() delete the image via the Oxide API. Note the artifact currently only carries ImageID/ImageName — it will need access to a client (or enough connection config to build one) and the project, so this touches how the artifact is constructed in Builder.Run.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Artifact.Destroy() at component/builder/instance/artifact.go:67, then trace how the artifact is constructed in Builder.Run. Inspect the existing Oxide API client and image operations to determine how Destroy can access the client and project. Done means Destroy removes the artifact image through the Oxide API instead of leaving it behind.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.