Skip to content

Conversation

@rdimitrov
Copy link
Member

@rdimitrov rdimitrov commented Sep 8, 2025

The following PR:

  • Updates the dependency on the upstream to version v1.0.0
  • Fixes the conflicts and the changed properties
  • Fixes the path to the schema reference
  • Relaxes the schema validation (temporary as the upstream schema enforces some requirements on the values that we are not complying with, i.e. an sse/streamable-http server type don't have URLs on our side but is expected on the upstream side)
  • Fixes the schema sync script (this script is used to sync the go mod dependency bump with the schema reference so they both point to the same commit hash)

@rdimitrov rdimitrov marked this pull request as draft September 8, 2025 12:43
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
@rdimitrov rdimitrov marked this pull request as ready for review September 11, 2025 14:11
@rdimitrov rdimitrov changed the title Draft: Reflect the property renames on server.json Reflect the property renames on server.json Sep 11, 2025
@rdimitrov rdimitrov changed the title Reflect the property renames on server.json Bump the registry dependency to v1.0.0 and fix the conflicts Sep 12, 2025
// Validate the complete registry against schema (warnings only for now)
if err := or.validateRegistry(registry); err != nil {
return fmt.Errorf("registry validation failed: %w", err)
fmt.Printf("⚠️ Schema validation warnings: %v\n", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

why only warnings?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's temporary as the upstream schema enforces some requirements on values that we are not complying with, i.e. an sse/streamable-http server type don't have URLs on our side but is expected on the upstream side. It's actually an issue on our side because we made the assumption the MCP endpoints are on the root level of the server endpoint which may not always be the case

// convertNameToReverseDNS converts simple server names to reverse-DNS format required by v1.0.0 schema
func (*OfficialRegistry) convertNameToReverseDNS(name string) string {
// If already in reverse-DNS format (contains '/'), return as-is
if strings.Contains(name, "/") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this enough to enforce that it's a reverse DNS? Looking at the current thv registry all the names are simple strings with just a-z just wondering if you meant to include the full io.stacklok.toolhive/ string in the check

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I wasn't particularly sure about this but for the time being it's not a problem. To be honest I don't think any FE client will like seeing those names so I'll be doing a follow up change where we have a display name as part of the publisher-provider extensions (that is what we have now as name on our side) and leave this to be the DNS one just so we are compliant.

Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

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

I just added some questions for my own education since it's the first PR I am looking at in this project. But looks good and matches the upstream format.

@rdimitrov rdimitrov merged commit 11d5561 into main Sep 12, 2025
4 checks passed
@rdimitrov rdimitrov deleted the properties-bump branch September 12, 2025 10:05
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.

3 participants