Skip to content

Handle legacy local registry names - #248

Open
Renato L. de F. Cunha (renatolfc) wants to merge 2 commits into
microsoft:mainfrom
renatolfc:fix/issue-166-legacy-registry
Open

Handle legacy local registry names#248
Renato L. de F. Cunha (renatolfc) wants to merge 2 commits into
microsoft:mainfrom
renatolfc:fix/issue-166-legacy-registry

Conversation

@renatolfc

Copy link
Copy Markdown
Contributor

Clusters created during the registry naming transition can still have a farmvibes-ai-registry container, but update cleanup only looks for k3d-farmvibes-ai-registry.localhost. The update then leaves the legacy container behind or aborts.

This PR checks only those two known historical names and removes whichever exists. It does not broaden deletion or change current registry setup. A focused regression covers the legacy-first path.

Closes #166.

Copilot AI 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.

Pull request overview

This PR updates the local-cluster management CLI cleanup path to handle a legacy Docker registry container name left behind by clusters created during the registry naming transition, aligning cleanup behavior with the historical container naming used by older clusters (Issue #166).

Changes:

  • Update destroy_old_registry to check for two historical registry container names and remove whichever exists.
  • Add a focused regression test covering the legacy-container-present cleanup path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vibe_core/vibe_core/cli/local.py Adjusts old-registry cleanup logic to look for two known historical container names.
src/vibe_core/tests/test_local_service_images.py Adds a regression test validating legacy registry container cleanup behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1086 to +1091
for container_name in (
f"{OLD_DEFAULT_CLUSTER_NAME}-registry",
f"k3d-{OLD_DEFAULT_CLUSTER_NAME}-registry.localhost",
):
if docker.get(container_name):
docker.rm(container_name)
Comment on lines +299 to +306
assert local.destroy_old_registry(Mock(spec=OSArtifacts))
assert docker.get.call_args_list == [
call("farmvibes-ai-registry"),
call("k3d-farmvibes-ai-registry.localhost"),
]
docker.rm.assert_called_once_with("farmvibes-ai-registry")


Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to update cluster with new vibe_core code.

2 participants