MetPX / sarracenia

https://MetPX.github.io/sarracenia
GNU General Public License v2.0
45 stars 22 forks source link

Porting plugins from v2 to v3 #433

Closed cleaaum closed 1 year ago

cleaaum commented 2 years ago

When porting a plugin, it should be moved from the /plugin dir to the /flowcb dir. To group them together, thinking of putting all on_message plugins (which become after_accept) into its own file directory called accept.

Documentation written/refined as a result of this issue:

https://metpx.github.io/sarracenia/How2Guides/v2ToSr3.html

So far the following plugins have been ported: Note: some of these still have FIXMEs and TODOs to take care of since I wasn't always sure about the logic of the plugin

Make your branch's PR reference this issue....

Misc --> /flowcb

flowcb/destfn/

do_send --> /flowcb/send

on_heartbeat --> /flowcb/housekeeping

on_message --> /flowcb/accept

on_file --> /flowcb/after_work

do_poll--> /flowcb/poll/

Plugins Deleted So Far

download_ --> /flowcb//

petersilva commented 2 years ago

do_poll -> flowcb/poll/ check in the poll directory as I think most of the examples are already done.

cleaaum commented 2 years ago

Question 1: what is the difference between the action plugins and the filter plugins since they both are after_accept() plugins? Does it make sense to keep them in separate directories? the init .py of filter states "plugins intended for on_message entry_point." Seems like they could all be moved to action.

cleaaum commented 2 years ago

Question 2: some plugins like totalsave.py have on_start() and on_stop() methods. Should they me modified or renamed for v3?

petersilva commented 2 years ago

merged in all current work from the v03_wip_plugins_v2Tov3_msg branch. also updated that branch with v03_wip... to reduce divergence as people work on it, people should pull from v03_wip once in a while...

it passed flows.

tysonkaufmann commented 2 years ago

file/msg/post total plugins are now obsolete and the functionality has been added directly into flowcb/log.py - plugins were deleted and config.py updated to reflect deleted plugins on branch v03_wip_plugins_v2Tov3_msg

Branch v03_wip_plugins_v2Tov3_msg will need to be merged into v03_wip @petersilva

MagikEh commented 2 years ago

Went through the project #6's notes in the PluginsToPort column and merged their comments into this issue's description, as this issue is better for tracking.

MagikEh commented 2 years ago

Moved from project #6 to the Metpx Project.

petersilva commented 2 years ago

summarizing recent work (last day or two):

These are all documented by direct editing of the summary at the top of the issue.

petersilva commented 2 years ago

We have gotten to the point where there functionality is good enough to start deploying to internal clusters. so the focus is on that for now (will be tracked by internal tickets.) May come back to this at some point.

petersilva commented 1 year ago

Internally have identified 234 plugins to port.

petersilva commented 1 year ago

using two phase approach, phase 1: initial port. phase 2: testing/deployment.

in phase 1: 17/232 done (two "plugins" turned out to be shell scripts)

petersilva commented 1 year ago

29/232 done.

petersilva commented 1 year ago

56/236 done. (removed some, found some new ones due to continued audits.)

petersilva commented 1 year ago

83/236 done. All polls completed, a few downloads done. downloads and converters are next target.

petersilva commented 1 year ago

Features brought into sr3 based on analysis of plugins:

update: 154/236 done... 65% !

petersilva commented 1 year ago

Devs want us to strip out the examples from the code.

let documentation take care of it.

petersilva commented 1 year ago

163/236 -> 69% (mile stone: all post_ completed.)

petersilva commented 1 year ago

178/236 -> 75%

andreleblanc11 commented 1 year ago

185/236 , only 6 converts remain

petersilva commented 1 year ago

218/235, all the on_message renames are done.

petersilva commented 1 year ago

228/235... started the config conversion script.

andreleblanc11 commented 1 year ago

235/235. All done! 😄

petersilva commented 1 year ago

removed plugins covered by 2f2878d38d5e1e0ea99554efea030c30f00dff5a last goal is to review the few remaining ones in that directory... to empty sarracenia/plugins/ (where v2 plugins live in sr3)

petersilva commented 1 year ago

completely done!