threefoldtecharchive / 0-core

Multi Node OS which requires no install.
Apache License 2.0
3 stars 2 forks source link

Development hot update #107

Closed muhamadazmy closed 5 years ago

muhamadazmy commented 5 years ago

First stage of hot update certain parts of the API (without reboot)

We converted all built-in functionality of core0 into modules that are loaded dynamically (on boot)

Later we will add functionality to load new modules (or replace) parts of the API on the fly.

We need to merge this as soon as possible because any fixes or changes on development branch causes a merge conflict.

muhamadazmy commented 5 years ago

I already noticed some parts where more refactoring is needed (commented out code that was never adapted)

maxux commented 5 years ago

This pull request is impossible to review, it's way too huge. Can't we split it to keep a better view ? This is going to break at some point for sure.

muhamadazmy commented 5 years ago

@maxux unfortunately we can't split it up. Because we can't maintain 2 separate ways to build and provide an API. it's either built in code that builds statically, or dynamic modules. Most of the change is moving around code anyway.

All the built in modules that implements part of the API has been moved to separate plugins. I also built the basic plugin manager the loads module on boot, and intialize them in correct order, etc...

Each plugin has to provide a Plugin symbol which defines the entry points and actions it provides, other than that all the actual action logic was not touched.

I won't merge this pull request until i verify with QA that at least the basic tests are passing. I already noticed some parts of the code that need to get integrated (commented out). So still some bit of work to do here.

codecov-io commented 5 years ago

Codecov Report

Merging #107 into development will decrease coverage by 3.45%. The diff coverage is 17.5%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #107      +/-   ##
===============================================
- Coverage        25.55%   22.09%   -3.46%     
===============================================
  Files               54       45       -9     
  Lines             5393     3874    -1519     
===============================================
- Hits              1378      856     -522     
+ Misses            3886     2940     -946     
+ Partials           129       78      -51
Impacted Files Coverage Δ
base/stream/buffer.go 88.23% <ø> (ø)
base/pm/command.go 57.14% <ø> (-14.29%) :arrow_down:
base/pm/result.go 0% <ø> (-84.62%) :arrow_down:
apps/plugins/aggregator/plugin/stats.go 79.41% <ø> (ø)
base/stream/input.go 96.11% <ø> (ø)
apps/plugins/web/plugin/plugin.go 0% <0%> (ø)
apps/plugins/containers/plugin/zerotier.go 0% <0%> (ø)
apps/plugins/aggregator/plugin/plugin.go 0% <0%> (ø)
apps/plugins/disk/plugin/plugin.go 0% <0%> (ø)
apps/plugins/btrfs/plugin/plugin.go 0% <0%> (ø)
... and 43 more

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 cb16a2b...583a947. Read the comment docs.