This introduces the concept of schema backends, allowing us to define different backends which we can swap in.
There are several main benefits of this:
The TestHelpers module does a lot of inconvenient stubbing which makes it very hard to debug. Decoupling this from testing allows us to write a separate "test backend" which doesn't involve RSpec stubbing.
Currently, it is difficult to run Deimos in development mode without a schema registry running. Separating "local encoding" to a different backend allows us to use this backend in development and skip the registry entirely.
Feedback from the initial release of Deimos questioned why it was being tied to Avro as a standard. This allows any schema definition to be used and is no longer Avro-specific.
Note that as part of this change, to keep consistency with the new SchemaBackends::Base class, I renamed PublishBackend to Backends::Base.
This also fixes #33, #10, part of #16, and part of #13.
Type of change
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update
How Has This Been Tested?
Unit tests, as well as ran locally both with and without schema registry. Still needs to be tested on a live system.
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules
This introduces the concept of schema backends, allowing us to define different backends which we can swap in.
There are several main benefits of this:
TestHelpers
module does a lot of inconvenient stubbing which makes it very hard to debug. Decoupling this from testing allows us to write a separate "test backend" which doesn't involve RSpec stubbing.Note that as part of this change, to keep consistency with the new
SchemaBackends::Base
class, I renamedPublishBackend
toBackends::Base
.This also fixes #33, #10, part of #16, and part of #13.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Unit tests, as well as ran locally both with and without schema registry. Still needs to be tested on a live system.
Checklist: