-
Notifications
You must be signed in to change notification settings - Fork 48
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
Allow all plugins to access a drop folder from the log loader #399
Conversation
Codecov Report
@@ Coverage Diff @@
## main #399 +/- ##
==========================================
- Coverage 73.28% 73.27% -0.01%
==========================================
Files 245 245
Lines 19544 19547 +3
==========================================
+ Hits 14322 14324 +2
- Misses 5222 5223 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Can you explain what this does or adds? |
You can now easily make a file-based variant of a plugin by checking the drop location. |
b77ccf2
to
f30810a
Compare
And then you'd temporarily edit that plugin to look at that directory? I'm not sure I agree with this approach for this problem. I was trying to look for a ticket, but it seems like I hadn't written it down yet. An idea I had was to make the plugin system have some kind of generic concept of An internal conflict I have with this idea is that I don't want the plugin system to become too "FizzBuzzEnterpriseEdition", so it'd have to be lean. It should be incredibly easy to list and add paths to a plugin in regular plugin development, as well as specify a custom path when needed. I'll copy and paste this into a ticket tomorrow. What are your thoughts on it for now? |
My idea was to gradually add a fallback mechanism using this path to plugins permanently, not temporary. Just swapping paths may not work, some plugins also need registry keys, users and perform other logic. This proposal however allows plugins to detect a possible shortcut and just parse the given file(s). I tested this hypothesis with appdb and it seems to work. It is also a very simple mechanism to wrap your head around. Doing magic stuff with paths requires very straight-forward logic in the plugins, unfortunately I believe that is not the case. An additional benefit of this proposal is that is relatively risk-free. It doesn't touch any other code, it only adds a fallback location for the LogLoader. It offers a very straight-forward path function, just for convenience that can be used by plugins. Advantages:
Drawbacks:
|
Doesn't this approach make the line between "fake" paths and "real" paths very thin? There would need to be a very clear distinction between the "fake" paths and the "real" paths. The currently chosen directory could also conflict with a real directory, so ideally any method for this completely bypasses the real filesystems. In my opinion you quickly move towards something like my proposal. Plugins that require stuff like registry/config file parsing could of course be supported. For example, I imagine a plugin that requires such a thing would simply do that parsing in a Underwater, plugins could use something like Again, I'm not sure if my proposal is in fact the best approach, but I very much do not want to mix "fake" paths and files in with real ones. Having to edit every plugin to include a fake path, vs a system where the plugin only lists real paths itself, and "fake paths" are inserted someplace else, seems cleaner to me. |
No description provided.