-
Notifications
You must be signed in to change notification settings - Fork 132
Complete the move of cmd/thv-registry-api outside of toolhive #2244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Radoslav Dimitrov <[email protected]>
0456d0b
to
aa5a05d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Signed-off-by: Radoslav Dimitrov <[email protected]>
There was a problem hiding this 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.
| 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 | |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
# -- 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 |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this one?
There was a problem hiding this 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: |
There was a problem hiding this comment.
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}} \ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
The following PR completes the move of the thv-registry-api server to stacklok/toolhive-registry-server.