Rollout Adapter for importing rollout data into Flipper #319
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.
Addresses #308
Adds an adapter to import Rollout data into Flipper
Rollout supports the equivalent to Flipper's
Rollout does not support
Importing only requires
features
,get
to be implemented.Questions/Notes:
for the methods the adapter doesn't implement I'm thinking of raising an error similar to the read only adapter to make it clear that this adapter is only for importing since rollout doesn't have feature parity
I'm testing ["can have one feature imported"
](https://github.com/jnunemaker/flipper/compare/rollout-adapter?expand=1#diff-ce5ff96d129103e0d6d194b6be39790dR59) type stuff where its not really testing the rollout adapter its really testing adapter.import, but I think it does give some assurance that things are being imported correctly. Alternatively we could just assume import works given that
get,
features` work which are also unit tested, but I do like the more thorough test.this will only work with rollout ~> 2.0 because the Rollout public api changed from 1 -> 2 and this is reflected in the gemspec dependency.
Rollout 2.3 introduced casting percentages
to_f
before saving. For flipper users using Flipper < 0.11 (before Flipper supported decimal percentages) the values between Rollout (decimal) and Flipper(integer) would be different, although I don't think this is a big deal?users importing Rollout data would need to reregister their groups since those are an evaluated block in memory