Implement config search for the MetaDB#644
Draft
amrc-benmorrow wants to merge 6 commits into
Draft
Conversation
Note that this endpoint is not implemented by either ConfigDB or MetaDB yet. Maintain compatibility within the `resolve` method, which is the only current use of the search interface. The compatibility is not exact but is good enough to cover existing use cases where jsonpath is not used and exact matches are what we want.
So far we have only implemented config entry endpoints. The app-level endpoints such as listing objects are not implemented yet.
This does a simpleminded search over the current app state. This will be significantly less efficient than a dedicated query for a single use, but may be more efficient in situations where only a few Apps are being queried, especially if those Apps are also the subjects of notify sequences. The simpleminded approach also avoids issues of JSON canonicalisation.
In order for the MetaDB to recognise that objects of these may have Sparkplug addresses it is necessary for them to be subclasses of SparkplugEntity.
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.
This PR makes changes which are currently incompatible with the ConfigDB.
Do not merge until this is resolved.
v2/app/{app}/findendpoint on the MetaDB to search for an object with a specific config. Unlike the v1 search endpoint this does an exact match with no fuzzy lookup.v2/app/{app}/class/{class}/findto search within a class.