topcoder-platform / community-app

React webapp for serving Topcoder Community
125 stars 216 forks source link

After uploading submissions to a challenge, the submissions API is being called repeatedly #6898

Closed jmgasper closed 11 months ago

jmgasper commented 12 months ago

REF: https://topcoder.atlassian.net/browse/PROD-4316

Steps

Go to a Dev challenge (ex- https://www.topcoder-dev.com/challenges/ab125502-0fd4-49ff-baea-a51cbf02104b )

Register and upload a submission

Now go to My submissions page and open the network tab and monitor

After uploading submissions to a challenge, the submissions API is being loaded repeatedly, the download button does not appear to download the submission

https://github.com/topcoder-platform/community-app/assets/21790/780bf5d6-1cb2-468d-96a9-996e90612a21

suppermancool commented 12 months ago

@jmgasper there is a requirement to fetch submissions after every 2s in https://github.com/topcoder-platform/community-app/issues/6614

The reason the submission page keeps fetching submissions API is that the AV scan is not completed

For fixing this I only need to remove the loading indicator when fetching submission right?

jmgasper commented 12 months ago

@suppermancool - We need to only retry the fetch once, after 4 seconds. It shouldn't continually retry.

suppermancool commented 12 months ago

@jmgasper one more issue: we will hide the download button if the AV scan is not done. in that test challenge https://www.topcoder-dev.com/challenges/ab125502-0fd4-49ff-baea-a51cbf02104b the AV scan is always not done

Should I remove that check and show the download button?

jmgasper commented 12 months ago

@suppermancool - No, we will keep the functionality as-is. We don't want to show the download button until the AV scan is done. I'll try to figure out why it's failing in dev.