Skip to content

When creating multiple attachments in parallel, only one is actually created #348

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
maxceem opened this issue Dec 9, 2020 · 5 comments
Closed
Assignees
Milestone

Comments

@maxceem
Copy link

maxceem commented Dec 9, 2020

Follow up from topcoder-platform/work-manager#917 (comment)

In Work Manager, we support uploading multiple attachments at once.

  • we send multiple POST /challenges/:id/attachments requests in parallel and all of them are successful
  • but after I reload the challenge GET /challenge/:id returns only one attachment

See demo video https://monosnap.com/file/mVqe0igPbDIa68bUepKwRujaTU0mQN

Example challenge 29d3d66f-d87f-402f-882f-258235ac7a6f on DEV.

@ThomasKranitsas
Copy link
Contributor

PR #361

@ThomasKranitsas
Copy link
Contributor

Deployed on dev, tested, works.

cc @rootelement

@maxceem
Copy link
Author

maxceem commented Jan 12, 2021

@ThomasKranitsas just to clarify. The initial issue which was described in this issue still persists, if I create attachments one by one, they disappear after https://monosnap.com/file/s3fjU3J3d3d3UeS6pA3aeyT2A5aJED

After creating a demo, I've checked the PR and understood that returning the array is intentional, so I would try updating UI to use one call with an array to overcome this issue.

@ThomasKranitsas
Copy link
Contributor

@maxceem that's the only way to overcome this issue. What you're talking about is the same as making multiple PUT requests at the same time. The latest one will overwrite the rest. With the latest updates, as you correctly understood, you can make one request to create multiple attachments

@vikasrohit
Copy link

@rootelement when we are planning to move this to production? Attachments feature was broken on production in WM, so I am hiding that for now and would enable it again once we have these changes in production.

@lakshmiathreya lakshmiathreya added this to the 1.3 milestone May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants