-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[UPDATED] Simpler logging refactor #16839
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
Closed
uberbrady
wants to merge
29
commits into
grokability:develop
from
uberbrady:simpler_logging_refactor
Closed
[UPDATED] Simpler logging refactor #16839
uberbrady
wants to merge
29
commits into
grokability:develop
from
uberbrady:simpler_logging_refactor
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First pass at huge Actionlog refactor Yank observers from AppServiceProvider Only 3 tests left to go! All but one test passing All tests now pass. Cleanups, renames, clearing out unneeded changes, unused log messages Cleanup, removing unnecessary log types on restores Added some comments and switched main Loggable interface method
8 tasks
I also like this approach more than #16779. There are still a lot of todos and fixmes so I'm going to hold off on a full review besides just a few comments for anything I see on a quick skim. |
uberbrady
commented
May 12, 2025
Looks like you've got some tests failing in 8.2 |
4 tasks
This is cleaned up heavily in #17463 - I'm closing this one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another version of #16779 - a little bit of a simpler approach. I think I like it.
Updated
This is now getting pretty close. The previously-made updates to tests have definitely helped to catch bugs in this implementation, which I'm pretty happy with.
Right now, we should see that there are still a few failing tests. These all boil down to different choices of implementation. Before this PR we weren't quite too rigid about logging things separately when they were created versus checked out. And we weren't too rigid about making sure that the API worked exactly the same as the GUI in these cases. But, should we be?
My opinion - creating an asset and immediately checking it out via GUI or API should both do the same thing - log a 'created' action_log and then immediately a 'checkout' action_log. I think the extra action_log entries make it clearer and easier to 'replay' the history of an object.
To-Do
saveWithLogAction()
(which I think is a dumb name, I should fix it). I should probably apply that across the code base for consistency.action_log
. While it does try to ensure that some type ofaction_log
happens any time the object-in-question gets modified, or if the various logging methods are called, it's possible that something could have been missed, or there are still subtle bugs around.Loggable
trait got moved into theTraits
sub-directory, which has made later merges much, much harder.Next Steps
->notify()
. if that makes sense. I feel like the Slack/webhook notifications and the email notifications are sufficiently different that I would like to see if it's possible to split them off - but that might only work with the event'ed notifications, and not with the->notify()
based ones.action_log
entries makes it much easier to start to treat "quantities" as first-class fields and not simple repetitions.