Repository navigation
feat: schema versioning - #12
Merged
Merged
Conversation
Schemas now track a content version separate from ocpp_version, incrementing on real content changes and recording a queryable changelog (schema_versions). Upsert only bumps the version when the new content actually differs from what's stored; Add starts new schemas at version 1 with an initial changelog entry. Exposed via a new ListSchemaVersions gRPC RPC and a list_schema_versions MCP tool, plus an optional version arg on get_schema to fetch a specific historical version instead of the latest. Also fixes mockery's output directory so generated mocks are actually importable from _test.go files (the previous gen/mocks/internal/schema path was blocked by Go's internal-import rule) and adds unit test coverage for the new service/handler/tool logic.
The insert-vs-insert race on a brand-new logical key is rare and already surfaces a clear duplicate-key error; retrying added complexity for a benefit not worth the cost.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Allows to search and version OCPP schemas - in case of patches, we can now inspect each individual version.
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any ofthem, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
merging your code.
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you
did and what alternatives you considered, etc...