Skip to content
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

[WIP] Big breaking change...and replication logic #18

Closed
wants to merge 32 commits into from

Conversation

beardedeagle
Copy link
Owner

@beardedeagle beardedeagle commented Mar 30, 2019

Fixes/Addresses

#9 - Replication logic...with a lot more tacked on.

Change proposed in this pull request

Staging this pr. Work in progress. Whole lot of scope creep going on in here. The reason being is that this change would introduce breaking changes anyway. Might as well try to roll as many breaking changes into one well tested, and documented, change.

  • Adding replication logic to schema and stores, by type. This will allow users more flexibility when defining their Mnesia architectural layout.
  • Adding ability to blacklist nodes, per store.
  • Adding structs for configuration and stores for more explicit library api.
  • Adding typespecs for more explicit library api.
  • Adding stubbed out overridable callback for init_migration/1 and rollback_migration/1 to Mnesiac.Store to allow users to implement custom migration logic.
  • Adding stubbed out overridable callback for refresh_cluster/1 for custom logic pertaining to refreshing Mnesia Cluster.
  • Adding stubbed out overridable callback for backup/1 for custom logic pertaining to backing up Mnesia stores.
  • Adding ability to pass in custom config, along with override fun that would convert said config to custom struct. This would then be what is passed to Mnesiac.Store instead of the default library implementation.
  • Adding Mnesiac.validate_config/2, which can also be used to look at output from override fun for validation.
  • Updating resolve_conflict/1 to resolve_conflict/2, now accepts configuration.
  • Updating terminology across library for standardization purposes.
  • Updating docs.
  • Updating dependencies and language versions.
  • Removing the Mnesiac.StoreManager module.
  • Removing the config directory. Configuration is now to be passed in directly. See here for the reasoning.
  • Removing quite a bit of the surface api from Mnesiac. Expect a smaller public facing api.

Branch is currently broken as I shuffle things around.

Check list

  • All new code is formatted.
  • All new code is documented.
  • All new code passed static analysis/linter checks.
  • Added tests to ensure coverage of new code.
  • All tests passed.

Additional info

Cleaned up the GitHub templates. Made them less "fire and brimstoney"

- Stagging branch
- Cleaned up README to give users a better heads up of the changes coming
@codecov
Copy link

codecov bot commented Mar 30, 2019

Codecov Report

Merging #18 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #18   +/-   ##
=======================================
  Coverage   87.67%   87.67%           
=======================================
  Files           3        3           
  Lines          73       73           
=======================================
  Hits           64       64           
  Misses          9        9

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edc41ab...7ea5372. Read the comment docs.

- hopefully the last readme cleanup
- standardizing verbaige accross library
- added docs for 2 new `Mnesiac.Store` optional callbacks
[skip travis]
- THIS IS GOING TO BREAK THE BRANCH
- more documentation updates around breaking changes in library to come.
@beardedeagle beardedeagle changed the title [WIP] replication factor [WIP] Big breaking change...and replication logic Apr 1, 2019
[skip travis]
- STILL BROKEN
- Solidified api for migrations
[skip travis]
- STILL BROKEN
- README correction about migration config api
[skip travis]
- STILL BROKEN
- mentioing another change. basically making it possible for library users to define their own config structure. Users can now pass in a fun that will convert the custom config to their own struct and pass it to `Mnesiac.Store` for user. This means they would also need to ensure they overide the store macros or at least provide the doc'd struct fields for `%Mnesiac.Store{}`.
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- dep updates
- minor type fix in changelog
- committing supervisor code
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- more doc cleanup
- more verbaige standardization
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- added typespecs to define expected config structure for default library usage
- removed config from formatter
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- Added `refresh_cluster/1` callback
- Added `backup/1` callback
- small fixes
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- committing cursory mnesiac module changes
- fixing type in `Mnesiac.Supervisor`
- making readme example legal sytax
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- Moving `build_struct/2` down in logic for proper flow
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- Fixing override type to include the proper returns expected
- updated `built_struct/2` to capture and pass on error tuples for overrides
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- Adding `Mnesiac.validate_config/2`
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- calling `init_schema/1` now
- general cleanup
[skip travis]
- STILL VERY VERY BROKEN. DO NOT USE
- moving types out of supervisor module and into correct modules. will leave an explicit doc callout in supervisor for what is explicitly expected to be passed.
- committing store macro with 0.3.3 functionaltiy in tact, but with all added overridables for sanity.
@beardedeagle beardedeagle self-assigned this Apr 10, 2019
@beardedeagle
Copy link
Owner Author

Closing in favor of more cleaned up pr

@beardedeagle beardedeagle deleted the replication_factor branch August 8, 2019 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant