Skip to content
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

WIP Downloading submissions v1 #1548

Merged
merged 3 commits into from
Jul 24, 2024
Merged

WIP Downloading submissions v1 #1548

merged 3 commits into from
Jul 24, 2024

Conversation

Didayolo
Copy link
Collaborator

@Didayolo Didayolo commented Jul 23, 2024

Original PR

@ mention of reviewers

@Didayolo

Issue resolved

Description

The aim of this PR is to add the feature of downloading all or several submissions at once.
This bulk downloading is only accessible for a challenge administrator and is accessible through the submissions manager.

image

image

The user interface view could be improved by placing the drop down menu and apply button on the far right.

This implementation can(/should?) be improved by moving the zip_generator task computation from the django thread to a site-worker by un-commenting # in_memory_zip = stream_batch_download.apply_async((pks,)).get() and commenting in_memory_zip = stream_batch_download(pks) in the file submissions.py line 327.

However, generating zip in a stream by a site-worker is not functional because Celery back end is not configured to return something. This is a part where I would need help if this implementation is mandatory.
Also, is there a good way to benchmark the cost of this feature on the Django thread? It should not block the responsiveness of Codabench.

The global implementation follows this path :
bulk_download_codabench drawio

A checklist for hand testing

  • Download all / selected submissions
  • Delete selected submissions
  • Re-run selected submissions

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@Didayolo Didayolo self-assigned this Jul 23, 2024
@Didayolo Didayolo linked an issue Jul 23, 2024 that may be closed by this pull request
@Didayolo
Copy link
Collaborator Author

Didayolo commented Jul 24, 2024

@nicomy

Tested and it works fine. The only problem is that, when downloading several submissions with the same filenames, they got all zip together and then we can't know which one is which. Maybe we should rename them or add some folder structures.

I merge this PR and keep track of this issue in #1551.

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

Successfully merging this pull request may close these issues.

Download all submissions (on leaderboard) button
1 participant