Repository navigation
Feature/plugin interface fixes - #154
Open
stephen-dixon wants to merge 9 commits into
Open
stephen-dixon wants to merge 9 commits into
stephen-dixon wants to merge 9 commits into
Conversation
…s uses a plugin-interface version bump to allow explicit plugin->server communication for errors and logging
…ptionally be added where it is explicitly used for getting data
This branch has not been deployed
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.
There are a number of issues with the server->plugins interface and how the linking currently works at build time.
currently plugins link both a copy of the static server library and the client library to make some basic functionality available.
One frustration this causes is there are multiple instances of any global state, such as the error stack, and hard-to-trace bugs appear where reading from global state (such as errors) in one part of the codebase references a different instance from where data was actually written. e.g. errors written to one "global" error stack instance but nothing is communicated to client because the server is reading from a different, empty, "global" error stack.
This change aims to break the requirement for plugins to link the entire client and server code for basic common utilities like data subsetting, and diagnostic reporting like logging and errors.
the proposal is:
a new uda-common compilation object in the build system which is included in both the uda_server and uda_plugin libs.
errors are communicated back to the server from plugins through the slots on the interface structure and do not write directly to the global stack, with some additional handling over nested plugin cases.
a new callback block in the plugin interface structure so plugin logging calls have an interface to the server-owned logging routines, respecting current LOG_LEVEL etc.