-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Add action to bulk categorize logs #590
Conversation
I chose to add this to the It's a bit tricky because the Aside from that, I believe this PR should include an update hook to add the Worth noting that this decision is sorta irrelevant for #588 because we are creating a new module, and when that module is installed, the new action will basically be created on everyone's install, even though it is optional config as well 🤷 My assumption is that we should just enable this by default because most farmOS instances are offered with "managed" hosting and this is the easy option. However, managed hosting providers should also have the ability to add this config themselves if they determine this is best for their users. Overall my brain is mush and I guess mostly just want to acknowledge other hosting situations - requesting review from a few folks that come to mind! 😃 @Farmer-Eds-Shed @symbioquine @SirSundays @pcambra |
c09e724
to
be06985
Compare
be06985
to
2e3b6b2
Compare
I've added an update hook that creates the I also changed the machine name of the action from |
I think that's the right approach. Only question is: will this break if one of the necessary ("optional") module dependencies is not installed? My understanding is that Drupal installs I wonder if there's a Drupal core service/method for this? So we can basically say: "Hey Drupal install optional config for this module if you think we should". Actually looking closer at the changes now... it only depends on |
Hmm. I suppose we could simply just add a dependency on |
This is a great idea! I agree it shouldn't be necessary in this case but something to consider for other updates. |
I see in the UI that |
Drats. I had a feeling there was going to be something like that. :-P |
What if we add it to |
We could but doesn't seem like the best fit... I think the action is more about the I wonder, it would almost be nice if we had a |
I had the same feeling. Although I'm sort of vacillating between thinking of the Not sure I'm arguing for it... just thinking out loud and offering one more potential justification.
This might make some sense, but feels like a bit more of a can of worms to me... we should be making that module less complex IMO - and maybe the long term plan should be to simply dissolve it and move all fields to other modules.
This does make some sense... and feels like a familiar pattern to farmOS 1.x. I think I've been avoiding this up until now in hopes that more granular modules could meet our needs. I recall recently putting some work into simplifying the one we do have ( I think typing all this out actually has me leaning more towards putting it in
But curious what you think about that. Are there other considerations there? And/or... are there other things that could potentially be moved similarly? |
Another way to think of this: if |
Ah yes, I agree! Maybe I misunderstood above. Adding only the categorize action to |
Ha yea looking back I made that conceptual leap without realizing or expressing it! 😄 |
Well, happy to go that route! The only issue I can think of would be test dependencies... if there are any tests that use the |
I know there's one test in |
2e3b6b2
to
ccdd420
Compare
Okay, I moved the I tested by doing a fresh install on 2.x, creating some logs with categories, and then checking out this branch. Immediately after the status report shows "log category field needs to be uninstalled". After rebuilding the cache once the error is removed from the status report. This seems to be okay but I think ideally we would have some kind of an update hook? |
Maybeee related to #583 ? |
If a cache rebuild is the only thing needed I don't think we also need an update hook. The official update instructions say to run So IMO I think we can merge this as-is and call it good. Agreed? |
Cool. Sounds good to me |
ccdd420
to
34ca8d4
Compare
Merged! Thanks again for the help on this one @paul121! |
Originally requested here: Rothamsted-Ecoinformatics/farm_rothamsted#309
It's a pretty simple add that I hope would be quite useful for others as well!