Logo Icons too big fix (Issue: 1290)
A brief description of the purpose of the changes contained in this PR.
Logos on public challenge page are taking too long to load. In this fix I propose we change:
- comp upload to make an icon_logo file upon saving original logo
- logo upload to do the same however the difference is a new logo gets a new folder in minio and the icon_logo for this file is dropped in the same folder
- Question: Delete old logo? We weren't before.
- Attached is a file for performing this one challenge at a time to practice
Issues this PR resolves
A checklist for hand testing
-
Upload competitions with large logos (or small) -
If you have enough you can see the lag (Ex: https://www.codabench.org/competitions/public/?page=1) -
Run code in "add_icon_sized_logo.md" specifically:
# ...code to get comps_no_icon_logo
for comp in comps_no_icon_logo:
pdb.set_trace(); # use 'c' to cycle through 1 at a time; comment to do all;
comp.make_logo_icon()
comp.save()
Any relevant files for testing
the public competitions link wouldn't update and the only way I found to fix it was to clear cookies for this url:
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