New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Storage overlay #1560
feat: Storage overlay #1560
Conversation
Realised whilst raising PR that I need to add documentation - I'll get this done tomorrow morning. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1560 +/- ##
==========================================
+ Coverage 53.34% 53.50% +0.16%
==========================================
Files 128 130 +2
Lines 14452 14605 +153
==========================================
+ Hits 7709 7814 +105
- Misses 6070 6105 +35
- Partials 673 686 +13
|
6d26c57
to
3aabefd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realised that we can simplify this quite a bit. Sorry I didn't think about it earlier.
Essentially, the overlay driver only needs to implement the BinaryStore
interface. If one or both of the wrapped drivers is a SourceStore
, we can easily convert them to BinaryStore
anyway. Therefore, you only need to have two struct fields of type BinaryStore
instead of the four that it has now.
The SourceStore
interface is normally used by the CompileManager
when the engine is initialised but because we provide our special PolicyLoader
, those methods will never be used. Similarly, because we don't support mutable operations, the admin service can work with just the Store
interface which is already embedded in BinaryStore
.
Aaah, I was getting a bit muddled about how updates to the underlying On that, would it not still make sense to implement the
I think we'll still need to maintain the four struct fields (two |
I've addressed most of the smaller review items but I've left the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's reasonable to implement Reloadable
because it allows users to reload the store through the Admin API. I left a comment down below about it.
You're right. The Store
struct needs four fields. I wasn't thinking about the initialisation stage for SourceStores
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏽
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
…rics Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
…circuit breaker calc fn. Update tests Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Co-authored-by: Charith Ellawala <charithe@users.noreply.github.com> Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
…lel. Removed redundant SubscriptionManager Signed-off-by: Samuel Lock <samuellock@Samuels-MacBook-Pro.local>
81e94ad
to
56871e4
Compare
Closes #1106
Introduces the ability to define a second
fallback
storage driver via a configurable circuit breaker pattern:I wasn't sure if this was a
feat
or anenhancement
- can change.