-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
deleteProject
handler doesn't wait for S3 deletion to complete
#3023
Comments
I think for that we need to ensure that the s3 deletion process completes before sending the api response we can achieve it by modifying the delete project function to wait for the asynchronous deleteFilesFroms3 function to finish executing , for that we can use promises or asynchronous/await @lindapaiste what are your views on this , if this approach is correct , I would like to work on this issue |
Can anyone please check where I am making a mistake in the AWS setup? |
@lindapaiste what is your say on this ?? |
##Problem ##Action to fix To fix the warning "Promise returned from deleteObjectsFromS3 is ignored," you can take the following actions: 1.Handle the Promise: Ensure that the Promise returned by deleteObjectsFromS3 is properly handled to avoid potential issues with asynchronous operations. We can use async/await or .then() to handle the Promise resolution and execution flow. @lindapaiste I would love to fix this issue, please assign this to me. |
@lindapaiste @raclim I think on the latest |
Increasing Access
It seems like we could end up with files left behind on S3, which use up resources.
Feature enhancement details
The
deleteProject
handler fires off an asynchronous functiondeleteObjectsFromS3
(viadeleteFilesFromS3
) but it does not wait for the S3 deletion to continue before sending an API response.I'm not sure what actually happens here -- do those files continue to get deleted in the background or not? I'm concerned that we could wind up with "leftover" files on S3 that are no longer linked to any project.
There is no waiting here:
p5.js-web-editor/server/controllers/project.controller/deleteProject.js
Lines 61 to 72 in 6cac275
I noticed this thanks to a warning in my IDE
The text was updated successfully, but these errors were encountered: