github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.35k stars 569 forks source link

Templated Assignment Corrupts Some Files #2053

Open brghena opened 5 years ago

brghena commented 5 years ago

Describe the bug I created a github classroom assignment using the new templating feature based off of a starter repo: https://github.com/61c-teach/su19-proj3-2-starter

When students created their private repos, however, some files in the starter code were zero byte files in their newly created repos. These were the two .jar files logisim-evolution.jar and venus-cs61c-su19.jar. Both are larger files (10.7 MB and 2.36 MB respectively), but were zero bytes in the student repos and when cloned. I did not check if other files may also have been corrupted, but I suspect the large size of these files was at fault.

Note that the files were listed as zero bytes in the newly created repo. When cloned, the files were zero bytes (and indeed had no contents) and git status showed a clean repo.

My solution to this problem was to delete the assignment and create a new one that uses the old non-template repo creation mechanism. Thank goodness it was Friday night and only a few students were affected. I have not tried replicating it myself. The current, now-working classroom assignment can be found here: https://classroom.github.com/classrooms/42046610-cs-61c-summer-2019/assignments/cs61c-proj3-2-starter

To Reproduce Steps to reproduce the behavior:

  1. Create a new "individual" github classroom assignment
  2. Select Private repos, do not give admin, enable invitation URL
  3. Select 61c-teach/su19-proj3-2-starter as the starter source
  4. Select Import starter code using a template repository (recommended)
  5. Create a repo by following the assignment link

Expected behavior The files in the repo should not have been modified by the assignment repo creation process. If large files are unacceptable for some reason, a warning should have been given instead of deleting their contents.

EricPickup commented 5 years ago

Hi @brghena, thanks for reporting this. I was able to reproduce the issue you reported and will pass this on to the team that's in charge of template repositories.

brghena commented 5 years ago

Thanks for the response and reproducing the issue. Does this look like an issue with github classroom problem or a github-at-large one? Is there a public tracking issue for the problem?

The root of the questions is that right now I don't trust templates at all. How do I know when I should be willing to try them again?

d12 commented 5 years ago

Hey @brghena ,thanks for the report!

This is an upstream issue with GitHub template repositories. We're working with the feature team who owns the feature to get this resolved.

GitHub doesn't do public tracking issues, but I will do my best to keep you updated on progress in this issue. Me or @EricPickup will notify you when this is resolved.

jeffrafter commented 5 years ago

Hi @brghena, thanks for the report. We're working on this problem internally but I wanted to give an update: