-
Notifications
You must be signed in to change notification settings - Fork 31
Enhancement: Make tables import asynchronous #1801
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
base: main
Are you sure you want to change the base?
Conversation
5cbf833 to
3c2422c
Compare
|
Please keep in mind, existing API shall remain stable, but may be flagged deprecated. |
9b0c3bd to
1dbdfe8
Compare
|
@blizzz What exactly do you mean? Do not change already existent endpoint (keep it synchronous) but introduce v2/v3 for async tasks (even if this endpoints will be not in use on FE side)? |
Yes, exactly. The old ones can get the |
blizzz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replied to questions
1c49d2c to
599fecd
Compare
|
@blizzz I've reverted all changes to old endpoints. So they are completely untouched. Now we have also Also it is possible to import uploaded files (app data used under the hood) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is shaping up nicely! It looks like a file was not committed. Did not test yet.
|
I will rebase current PR and fix conflicts once #1824 got merged. Because both of those 2 PRs changes import a lot. Let's go step by step |
599fecd to
cdd78c0
Compare
|
@enjeck yeah, I was about to rebase this PR My plan:
I will try to do as much as I can by myself and ask for your help in case of struggling |
f47a2ca to
e20bab6
Compare
|
@enjeck more or less done At least we have green pipeline with adjusted old tests. I'm thinking how to extend tests with a new functionality. Meanwhile you can do another round of code review |
Thanks for working on this! I don't think we'll need any new tests here, since the current tests are already extensive? |
|
@enjeck in general yes, I've already actualized existent cypress tests |
Sorry, I had this on my to-review list. I was mostly thinking about if multiple simultaneous imports could overload the server and if we want to rate limit on job creation. We recently added rate limits to import previews e.g https://github.com/nextcloud/tables/blob/main/lib/Controller/ImportController.php#L60 since there was the possibilility to DoS the server without these limits. Wondering what @blizzz thinks |
The factor for the DoS is that you could fire multiple requests at the same time and Tables would be busy parsing everything. The rate limiting makes it less likely by allowing only so much at the same time. Now with that asynchronous approach, there is the upload, but otherwise the file is not being touched. So the risk that processing the input files leads to the DoS is negligible, as it might run sequentially or with just a few runners. It could congest the job queue though, therefore it would make sense to apply the rate limit values here just as well. |
Signed-off-by: Kostiantyn Miakshyn <[email protected]>
e20bab6 to
b81caed
Compare
but how? can we add this in upcoming iterations? |
Right now module not ready to import large tables. This PR improves import flow by moving it into asynchronous job.
🗒️ TODO:
🔍 Preview
Notification once import scheduled

Activity item with import stats

🎥 Demo
https://github.com/user-attachments/assets/6be864ef-fb26-40a3-9e4c-c98e1d55419d