Skip to content

delete artifacts from store - #473

Merged
zackbradys merged 15 commits into
mainfrom
delete-artifact
Jan 6, 2026
Merged

delete artifacts from store#473
zackbradys merged 15 commits into
mainfrom
delete-artifact

Conversation

@CamrynCarter

@CamrynCarter CamrynCarter commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

Please check below, if the PR fulfills these requirements:

  • Commit(s) and code follow the repositories guidelines.
  • Test(s) have been added or updated to support these change(s).
  • Doc(s) have been added or updated to support these change(s).

Associated Links:

Types of Changes:

  • Feature - delete artifacts from hauler store

Proposed Changes:

  • Simple string match on object reference that loops through store and removes any matching objects.

Verification/Testing of Changes:

  • hauler store add nginx:latest
  • hauler store info
  • hauler store delete-artifact nginx:latest
  • hauler store info

Additional Context:

@CamrynCarter

CamrynCarter commented Oct 28, 2025

Copy link
Copy Markdown
Contributor Author

biggest concern on clean up is properly parsing mediatype as part of the switch within the CleanUp function but this seems to have solved the errors I was seeing where blobs within manifests weren't being marked as referenced

UPDATE: fixed logic here so all layers are processed, should be ok now

@CamrynCarter
CamrynCarter marked this pull request as ready for review October 30, 2025 16:16
@CamrynCarter CamrynCarter changed the title WIP delete artifacts delete artifacts from store Oct 30, 2025
@zackbradys zackbradys added enhancement New feature or request size/L Denotes an issue/PR requiring a relatively large amount of work go Pull requests that update go code labels Oct 30, 2025
@github-project-automation github-project-automation Bot moved this to To Triage in Hauler Oct 30, 2025
@zackbradys zackbradys linked an issue Oct 30, 2025 that may be closed by this pull request
@zackbradys zackbradys moved this from To Triage to Testing in Hauler Oct 30, 2025
@CamrynCarter
CamrynCarter marked this pull request as draft November 3, 2025 16:31
@amartin120

Copy link
Copy Markdown
Contributor

@CamrynCarter this seems to work well. You're awesome! My only current feedback is that it took me a few tries to realize that I wasn't supposed to include the registry as part of the ref. I feel like a common workflow would be to do a hauler store info first so that I could copy the ref for pasting to the delete command and everything shows up there with the origin registry included.

@CamrynCarter
CamrynCarter marked this pull request as ready for review November 24, 2025 23:07
@zackbradys
zackbradys requested a review from a team January 6, 2026 03:41

@amartin120 amartin120 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This still makes me a little nervous but everything looks good. I appreciate this, thanks.

@zackbradys
zackbradys merged commit 3c07368 into main Jan 6, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Testing to Resolved in Hauler Jan 6, 2026
@zackbradys
zackbradys deleted the delete-artifact branch January 6, 2026 16:54
@zackbradys zackbradys mentioned this pull request Jan 8, 2026
3 tasks
atoy3731 pushed a commit to atoy3731/hauler that referenced this pull request Aug 4, 2026
* WIP delete artifacts
* handle multiple matches
* confirm deletion
* --force flag for delete-artifact
* clean up remaining unreferenced blobs
* more robust handling of manifest structure
* fixed loop to process all layers
* tests pt 1
* fix tests
* test order
* updated tests for deleting chart and file
* tool cleanup tests

---------

Signed-off-by: Zack Brady <zackbrady123@gmail.com>
Co-authored-by: Zack Brady <zackbrady123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code size/L Denotes an issue/PR requiring a relatively large amount of work

Projects

Status: Resolved

Development

Successfully merging this pull request may close these issues.

[feature] Allow hauler to delete artifacts from the store

3 participants