-
Notifications
You must be signed in to change notification settings - Fork 391
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
Queued Auditing #846
Queued Auditing #846
Conversation
Signed-off-by: Kevin Ullyott <[email protected]>
Signed-off-by: Kevin Ullyott <[email protected]>
Signed-off-by: Kevin Ullyott <[email protected]>
Signed-off-by: Kevin Ullyott <[email protected]>
Signed-off-by: Kevin Ullyott <[email protected]>
Signed-off-by: Kevin Ullyott <[email protected]>
Signed-off-by: Kevin Ullyott <[email protected]>
This reverts commit 6c44a2e.
This reverts commit 22cfbb9.
Signed-off-by: Kevin Ullyott <[email protected]>
Signed-off-by: Kevin Ullyott <[email protected]>
Signed-off-by: Kevin Ullyott <[email protected]>
Pushed a fix that should resolve one of the test errors. Unsure about the PHP 7 failures though. Having trouble getting this package to work in PHP 7 |
Signed-off-by: Kevin Ullyott <[email protected]>
Copied what y'all were doing in the GitHub Workflow setup locally and fixed the PHP 7.4 errors. I believe all tests should pass now if you want to run the test suite again. |
bbe0b11
to
f671328
Compare
@MortenDHansen just wanted to check in to see if there is anything I can do to move this queued auditing concept along in the package. Even if it requires me to change how I implement it here, I am completely open and available to do so. |
may i know , why this pull request is not merged ? i think this feature is needed to be exists in the package |
@MortenDHansen, I just want to ping one last time to see whether or not this PR could go anywhere here. Queue auditing would be an amazing improvement. Could you let me know if there is any feedback on my implementation, I am happy to put time into going a different direction if you feel that it's required. Thank you! |
It seems like it would work. I was worried that it would solve too narrow a case by only augmenting the actual data saving. I will get to try it out and then we could probably merge it. I don't see anything that should break, but i have to try it :) |
This version gave me problems, I will try to locate them and give my feedback |
Please do! I didn't have any issues with it on my applications, but if we have issues that are hard to track down, we should roll an update without the queue system asap. If it breaks for users, then we need to make it opt-in |
everywhere
Yes, I don't know what's happening, maybe it's as if the order of events has changed, or as if the changes to the model are not made in the same instance. I will try to do more tests and find a solution. |
question, is changing contracts a breaking change? |
lgtm |
@Orrison I already isolated my problem
Maybe |
Seems to be. I've just upgraded cause phpstan is failing and now all of my tests where I validate audits were created are failing. Havent had a chance to look closer yet |
Our pipelines are also failing with this change. |
Fixed for me in 13.6.1 thanks everyone |
Heey hey hey, this is a breaking change (interface signature change) and should have been released in 14.x, I mean there is a reason there is It should be reverted on 13.x (ASAP because it will cause yet another breaking change for people who solved the issue in their project but they will be able to upgrade to 14.x to solve it, but solve a lot of headaches for peolpe who have yet to upgrade) and rereleased on 14.x Otherwise anyone implementing this interface will get a fatal error in php |
I believe this also broke Lumen compatibility, with the introduction of |
And now v13.6.2 should fix the contracts issue so that it doesn't break. I haven't tried it on Lumen, so if anyone experiences issues there, let us now! Big thanks to @erikn69 again ❤️ |
The change has produced a lot of logging when using Supervisor to manage process queues and job logging, and Laravel Excel package to import large amount of data to the database.
I understand this may not be related to Laravel-Auditing library, but is there anyway to disable logging for the above audit listener class by default? |
Hi, could you please create an issue for it? 🙂 |
Per discussions such as #562, this sets up auditing to be dispatched on the Queue.
By default, the listener will go onto the
sync
connection. So if no configuration is done, the package will work as it did before, auditing immediately in the current request.Once you configure the
audit.queue.connect
to be something other thansync
, the audits will then be dispatched to be processed asynchronously.Customization of the queue it is put on, as well as the delay, is also possible.
It is set up similarly to the
Auditing/Audited
flow. An Event (DispatchingAudit
) is fired where you can prevent the auditing dispatch from happening by having a listener returnfalse
.