-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
ImportAction cannot be used in combination with an async queue driver #10002
Comments
@maartenpaauw Thanks for creating this bug report, documenting the issue, and highlighting how the issue intersects with redis and horizon. |
Hi @danharrin! Thank you for picking up this issue so quickly. I've upgraded my Filament project and swapped out The imports table is perfectly using a morph when I'm importing a CSV file (the record gets created), but I think the importer itself isn't executed. At the moment I don't know what's going wrong. The changes seems okay. I've updated the reproduction repo / branch with the changes and it's not working either. I think we need to reopen this issue. Changes based on the new documentation: maartenpaauw/filament-demo@5b6b021 |
Donnell Wyche shared this on the Filament Discord:
|
That's incredibly weird... |
Did some further debugging: I noticed the |
Thanks, that would explain why my testing was ok 😁 |
Do you think I should lock the package to 9.11 in the meantime? |
Locked, if you could work out the exact problem with 9.12 and report to league/csv that would be very helpful |
I think we should lock the package in the meantime until someone finds out what the importer broke. Will do some more debugging later on. |
I think I found something, but I'm not entirely sure; v9.11 yields from thephpleague/csv@3e0c482#diff-63e150e70c3f2253f8ab94c5a8fe06190bbfee264c842f2c7fb51f9920dd0f2eL219 |
Adding a quick
|
@danharrin I'm kinda stuck a this point. Maybe you know what needs to be changed to the |
Should we report the change instead of fixing it on our end? |
Never mind, I'm not sure about it because the return type stayed the same; |
I can confirm that using filament 3.1.8 and downloading and requiring
Works for my tests. I am now able to use the ImportAction using Redis queue driver without error. |
Can confirm this is a valid fix for things on my end too. |
I found this issue after noticing league/csv was being prevented from updating by Filament. Following on from discussion in 829e288: Based on @maartenpaauw's research the issue was introduced by this change in league/csv, a quick fix was then applied based on this issue, then later rolled back due to the reasoning in this comment. This suggests that the current behaviour is what is expected and if this is still an issue, Filament's Can I suggest that either this issue be re-opened, or a new issue created to track this until league/csv can be unpinned? Pinning a patch version like this has security implications, if there were an upstream issue detected in league/csv that required an urgent fix, Filament would block it. |
I quickly did the same |
@rossbearman I've opened up a PR #10990 |
@maartenpaauw I've had a report that it's still broken with 9.14 but 9.11 works, can you do another test please? |
I'm releasing a fix to the behaviour in the next version, but I'm annoyed that the breaking change was made on their end in the first place |
I see you've figured it out what was going wrong 💪 Reference: c74af1f |
The whole day I’ve been trying to make filament native importer to work at the end I discovered this 😍 I waiting for the next patch tonight hhhh |
It's released |
Thank you, I’ll figure out how to help in this amazing project ! Really thank you @danharrin and thanks to every contributor <3 |
Package
filament/filament
Package Version
v3.1.0
Laravel Version
10.34.2
Livewire Version
3.2.1
PHP Version
8.2.12
Problem description
When using the new CSV import action in combination with an async queue driver (in the example repository I'm using Laravel Horizon), the import action fails / enters an infinite loop.
The problem is
app(Authenticatable::class)
revolves to NULL using an async driver. Thereby the import user could not be resolved.A workaround for now is to add the following code to a service provider. It would be better if the importer uses the defined authGuard at panel level. I'm not sure if this is possible.
Expected behavior
It should be possible to use the CSV import action with an async queue driver.
Steps to reproduce
Clone example repo (it's based on the demo) and try to import a CSV. See the job failing and entering a infinite loop.
Reproduction repository
https://github.com/maartenpaauw/filament-demo/tree/bug/csv-import-with-horizon-queue
Relevant log output
The text was updated successfully, but these errors were encountered: