Skip to content

Conversation

rdimitrov
Copy link
Member

The following PR completes the move of the thv-registry-api server to stacklok/toolhive-registry-server.

@rdimitrov rdimitrov force-pushed the remove-registry-api branch from 0456d0b to aa5a05d Compare October 17, 2025 12:57
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.35%. Comparing base (3453db0) to head (147b546).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2244      +/-   ##
==========================================
- Coverage   53.43%   53.35%   -0.09%     
==========================================
  Files         230      220      -10     
  Lines       29385    28470     -915     
==========================================
- Hits        15703    15190     -513     
+ Misses      12552    12174     -378     
+ Partials     1130     1106      -24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rdimitrov rdimitrov requested a review from Copilot October 17, 2025 13:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Completes relocation of the thv-registry-api code out of this repository.

  • Removes all source, tests, docs, and build tasks for cmd/thv-registry-api
  • Updates image references from ghcr.io/stacklok/toolhive/thv-registry-api to ghcr.io/stacklok/thv-registry-api
  • Leaves Helm chart registryAPI values and README entries in place despite removal of all corresponding templates and code

Reviewed Changes

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

Show a summary per file
File Description
deploy/charts/operator/values.yaml Updated registry API image reference (old path to new path). RegistryAPI config still present.
deploy/charts/operator/templates/registry-api-serviceaccount.yaml Removed service account template for registry API.
deploy/charts/operator/templates/registry-api-clusterrolebinding.yaml Removed ClusterRoleBinding for registry API.
deploy/charts/operator/templates/registry-api-clusterrole.yaml Removed ClusterRole for registry API.
deploy/charts/operator/README.md Bumped chart version and updated documented image path; still documents registryAPI values.
deploy/charts/operator/Chart.yaml Chart version bumped from 0.2.23 to 0.2.24.
cmd/thv-operator/pkg/registryapi/deployment.go Updated default image path.
cmd/thv-operator/pkg/registryapi/deployment_test.go Adjusted tests to expect new image path.
cmd/thv-operator/Taskfile.yml Removed local build/load steps for registry API image; updated description.
cmd/help/verify.sh Removed exclude flag now that registry API code is gone.
Taskfile.yml Removed inclusion of registry-api Taskfile and exclude flag in docs generation.
(multiple cmd/thv-registry-api/* files) Entire registry API implementation, tests, docs, and build tasks removed from repo.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +95 to 99
| registryAPI | object | `{"image":"ghcr.io/stacklok/thv-registry-api:latest","serviceAccount":{"annotations":{},"automountServiceAccountToken":true,"labels":{},"name":"toolhive-registry-api"}}` | All values for the registry API deployment and associated resources |
| registryAPI.image | string | `"ghcr.io/stacklok/thv-registry-api:latest"` | Container image for the registry API |
| registryAPI.serviceAccount | object | `{"annotations":{},"automountServiceAccountToken":true,"labels":{},"name":"toolhive-registry-api"}` | Service account configuration for the registry API |
| registryAPI.serviceAccount.annotations | object | `{}` | Annotations to add to the registry API service account |
| registryAPI.serviceAccount.automountServiceAccountToken | bool | `true` | Automatically mount a ServiceAccount's API credentials |
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Documentation still advertises registryAPI values after all registry API templates and code have been removed. This is now misleading; remove these rows or add a deprecation note to avoid user confusion.

Copilot uses AI. Check for mistakes.

Copy link
Member Author

Choose a reason for hiding this comment

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

My reasoning is the registryAPI configuration values are still used by the operator so it makes sense to leave this. But perhaps someone else knowing the operator code better can assess this better.

Comment on lines 184 to 190
# -- All values for the registry API deployment and associated resources
registryAPI:
# -- Container image for the registry API
image: "ghcr.io/stacklok/toolhive/thv-registry-api:latest"
image: "ghcr.io/stacklok/thv-registry-api:latest"
# -- Service account configuration for the registry API
serviceAccount:
# -- Automatically mount a ServiceAccount's API credentials
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

registryAPI configuration block remains but corresponding deployment/role/serviceaccount templates were removed, making these values unused. Consider removing the entire registryAPI section (and related serviceAccount subkeys) or clearly marking them deprecated to prevent stale configuration.

Copilot uses AI. Check for mistakes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Same for this one?

Copy link
Collaborator

@dmartinol dmartinol left a comment

Choose a reason for hiding this comment

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

The operator must ensure the registry RBAC resources are there, we can't remove them.
Also, the image must be in kind to ensure the tests run propertly (even if I believe we're not testing with kind any registry use case)

sh: KO_DOCKER_REPO=kind.local ko build --local -B ./cmd/thv-operator | tail -n 1
TOOLHIVE_IMAGE:
sh: KO_DOCKER_REPO=kind.local ko build --local -B ./cmd/thv-proxyrunner | tail -n 1
REGISTRY_API_IMAGE:
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we don't have to build it here, but for sure to load it in kind (and ensure renovate is changing it to the latest version, or just use the latest tag)

--set operator.image={{.OPERATOR_IMAGE}} \
--set operator.toolhiveRunnerImage={{.TOOLHIVE_IMAGE}} \
--set operator.features.experimental={{.ENABLE_EXPERIMENTAL_FEATURES}} \
--set registryAPI.image={{.REGISTRY_API_IMAGE}} \
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's also needed to configure the image in the operator

Copy link
Collaborator

Choose a reason for hiding this comment

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

these 3 files are also needed, we want them to be deployed together with the operator

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.

2 participants