Skip to content

cleanup some container images during local dev#10289

Merged
CarmenPopoviciu merged 4 commits intomainfrom
workers-sdk-delete-image-tags
Aug 14, 2025
Merged

cleanup some container images during local dev#10289
CarmenPopoviciu merged 4 commits intomainfrom
workers-sdk-delete-image-tags

Conversation

@emily-shen
Copy link
Copy Markdown
Contributor

@emily-shen emily-shen commented Aug 8, 2025

  1. deletes old image tags if the image content and config hasn't changed
  2. deletes the old image tag when the rebuild hotkey is pressed

in a followup we should remove the uuid tag entirely and change it to a label. but that will require workerd changes so let's just do this for now


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: fix
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: new

@emily-shen emily-shen requested review from a team as code owners August 8, 2025 19:48
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 8, 2025

🦋 Changeset detected

Latest commit: b5b45a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@cloudflare/containers-shared Patch
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 8, 2025

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main workers-sdk-delete-image-tags might be a good starting point.

Notes:

  • your PR branch should be named v3-backport-10289
  • add the skip-v3-pr label to the current PR to stop this workflow from failing

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Aug 8, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@10289

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@10289

miniflare

npm i https://pkg.pr.new/miniflare@10289

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@10289

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@10289

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@10289

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10289

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@10289

wrangler

npm i https://pkg.pr.new/wrangler@10289

commit: b5b45a0

@emily-shen emily-shen force-pushed the workers-sdk-delete-image-tags branch from ecf0807 to 5f0202c Compare August 8, 2025 19:51
/**
* Get all repository tags for a given image
*/
export function getImageRepoTags(
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.

nit

Suggested change
export function getImageRepoTags(
export function getRepoTagsForImage(

* Checks if the given image has any duplicate tags from previous dev sessions,
* and remove them if so.
*/
export function cleanupDuplicateImageTags(
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.

nit

Suggested change
export function cleanupDuplicateImageTags(
export function removeDuplicateImageTags(

@emily-shen emily-shen force-pushed the workers-sdk-delete-image-tags branch from 36d48b9 to 4f3ea67 Compare August 14, 2025 11:37
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Aug 14, 2025
@emily-shen emily-shen force-pushed the workers-sdk-delete-image-tags branch from 4f3ea67 to b5b45a0 Compare August 14, 2025 12:37
@CarmenPopoviciu CarmenPopoviciu merged commit a5a1426 into main Aug 14, 2025
38 of 39 checks passed
@CarmenPopoviciu CarmenPopoviciu deleted the workers-sdk-delete-image-tags branch August 14, 2025 13:10
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants