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

Starter code imports slow down sporadically #1591

Closed rkomorn closed 5 years ago

rkomorn commented 6 years ago

Describe the bug Sometimes, after accepting an assignment, the process hangs during import. I've reported this a couple of times already. This time, the repo was https://github.com/hackbrightassessments/skills-flask-Lumicran , around 6:47pm PDT (and still hadn't completed by 7:30pm PDT).

To Reproduce

  1. Accept assignment
  2. Be unlucky
  3. Hang, see screenshot below for a long amount of time (or forever).

Expected behavior It should work (aka: it should import the starter code and finish)

Screenshots image

Additional context I opened a similar issue last week. I understand the issue's somewhere in some hooks stuff in some other team's area. I know technically it's another team's problem, but the classroom product does depend on it, so I do expect it to work.

rkomorn commented 6 years ago

This is a repeat of https://github.com/education/classroom/issues/1460 and https://github.com/education/classroom/issues/1570 .

rkomorn commented 6 years ago

Would having a repository that has no commit history prevent the importer from trying to do anything, and thus not fail?

rkomorn commented 6 years ago

While we're at it: does canceling the import eventually delete the repository? I originally thought it didn't, and provided that as a workaround for our students because the only import is a README of not much importance, but I noticed the repositories of some of our students who canceled vanished. I feel like I haven't seen that behavior before.

BenEmdon commented 6 years ago

Hey @rkomorn, thanks for reporting this. I'll definitely escalate this to the appropriate teams.

Would having a repository that has no commit history prevent the importer from trying to do anything, and thus not fail?

If I remember correctly, trying to import a repository with 0 commits causes the source importer to error. If you want to achieve the same result, choose no starter code repository.

While we're at it: does canceling the import eventually delete the repository?

With the current behavior yes, right now classroom deletes source imports that fail (manually cancelled included). This behavior is going to change in #1567, which should ship soon.

ejgutierrez74 commented 6 years ago

Me too happens this Tuesday at 16:00 ( Spain hour) with my students. Two of them were unlucky. The rest of them ( 12) worked fine.

+1

BenEmdon commented 6 years ago

Hey @ejgutierrez74 and @rkomorn can you confirm if their starter code imports eventually finished?

rkomorn commented 6 years ago

They did not. The resolution came from canceling and having new attempts finish quickly (ie: it stopped being broken).

gchallen commented 6 years ago

This seems to be happening again sporadically. I have one stuck now despite the fact that the process should complete fairly quickly.

BenEmdon commented 6 years ago

@gchallen @rkomorn @ejgutierrez74 my team and I are looking into possible solutions to the sporadic slowness. I'll keep this thread updated.

Sorry for the inconvenience.

ejgutierrez74 commented 6 years ago

They did not. The resolution came from canceling and having new attempts finish quickly (ie: it stopped being broken).

@BenEmdon @rkomorn @gchallen My students told me the process didnt finish.. they go home and process havent finished....as told before the process should be almost instantly because the repos has only two text files with some tests ( not even 10 kb)

Perhaps solution would be to have a timer, and if in 60 seconds the process doesnt finish cancel and began again....or as i have read a cancel button....

Thanks for the effort

gchallen commented 6 years ago

No further reports about this being an issue from our side, so maybe it's resolved? I second @ejgutierrez74's suggestion about making this cancellable.

ejgutierrez74 commented 6 years ago

I could add that my students are stuck in importing an assignment. Its more than a week and if they clic on the assignments link again... it loads a page with imorting code and copying code.... So they cant turn back or start again to import the assignment from scratch... Just if its worth to take a look to devs: this is the assignment link https://classroom.github.com/a/hMFfiPZZ

One of this students, the link to github account was made, but appears as he hasnt accepted the assignement.

The other student its even worse as it says that he hasnt joined the classroom ( still no link with its github account)

imagen

Thats an annoying bug or problem because they are stuck and can not work....

Just remember that this is the first assignment in the classroom and students needed to link their names with their github account....

ejgutierrez74 commented 6 years ago

As an update today seems that hector Jimenez has completed its import repository ( after two weeks). As i received a Github Notification:

imagen

id ask Hector if he can join the classroom as appears as not joined still...

imagen

ejgutierrez74 commented 6 years ago

To get more information about this bug...

Seems that Hector Jimenez has his repository created:

https://github.com/InstitutAlmata/assignment-1-using-github-and-git-hejimenezcr

But cosminlupas doesnt... Its strange because it seems that Classroom didnt get to user Hector Jimenez but to Cosmin Lupas... and the repository created where in reverse order....

Hope this bug can be solved soon...

kevinwortman commented 6 years ago

We are experiencing this issue today, so unfortunately it is not resolved. Unfortunately it happened at the start of a timed midterm exam which is distressing for the affected students.

BenEmdon commented 6 years ago

@kevinwortman thanks for reporting in. Could you provide an assignment link and the GitHub handle of a student that got stuck?

kevinwortman commented 6 years ago

@BenEmdon Thanks for the prompt response. We created additional backup versions of the assignment as an attempted workaround. My co-instructor @llarco writes:

Original assignment link: https://classroom.github.com/a/8aeJx1rX generated https://github.com/CSUF-CPSC-120-LW/midterm-1-jfriese14

First backup link: https://classroom.github.com/a/-RXpbhQT generated https://github.com/CSUF-CPSC-120-LW/midterm-2-jfriese14

Second backup link: https://classroom.github.com/a/4De-CbHJ generated https://github.com/CSUF-CPSC-120-LW/midterm-0-jfriese14

jfriese got stuck on all of them. I opened GitHub manually for all of the three repos that were created and they all showed as "still processing" (on github), so I cancelled the repo for the first backup link, cloned that empty repo on my computer, manually placed the README file, and pushed that change, and then jfriese was able to open and clone the repo.

llarco commented 6 years ago

We are going to run the same exam on Friday with 30 other students. We will create a new assignment link (and have some new back up assignment links), and in case some students get stuck in all of the assignment creations, we will do the manual process that was explained above.

I can provide you with the exam time when this will happen in case you want to monitor the queue that processes these import requests for the assignments.

Out of curiosity, is it just one queue processing it, or are there multiple queues processing the requests?

floe commented 5 years ago

Just wanted to mention that my students also experience this error on a regular basis. It looks like the import completes in the end for all of them, but they are stuck at the progress screen indefinitely until they manually look up their new repo.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

alanyli commented 5 years ago

Is there a fix for this? I am having the same issue. Looking up the repo manually would just redirect me to the page showing "Updating branches and 0 commit authors…".

boyland commented 5 years ago

One of my students had this issue Saturday and my TA (alanyli above) ran into it yesterday. It's definitely a live issue.

pinventado commented 5 years ago

I also had this issue last week. My work around was to:

  1. Find the students' repository from my organization
  2. Cancel the import
  3. Import the code manually (click import on the students' repository page and provide the URL of the skeleton code).

If it still hangs, repeat steps 1 and 2. Manually clone the repo, copy your starter code, then push the code so students get access to it. This is sort of a last resort because it's hard to do this for many students especially when under time pressure.

bsiever commented 5 years ago

Multiple students in my class have experienced this issue in the past week. Importing via the web "Import code" button after a "Cancel" has also been problematic, but pushing from command line seems ok. (Essentially same process described by pinventado)

BenEmdon commented 5 years ago

If you are experiencing this in the last 4 days please see status on #1778. There is an incident with GitHub.com.

oliviercailloux commented 5 years ago

A similar problem is hitting me almost systematically in my organisation. Please see #1796.

Numerous reports are open describing similar problems, as you probably know. Should I comment here, or should I open a new bug report?

vincentsijben commented 5 years ago

These problems still occur to me as well. Some students have their import ready in seconds, others take hours. Any update on this problem?

BenEmdon commented 5 years ago

Slow starter code imports are bottlenecked by the Source Import API's infrastructure. The Classroom team isn't responsible for this infrastructure. The team responsible for the Source Import API is making an ongoing effort to improve their infrastructure.

Unfortunately the source import API is not guaranteed to be instantaneous, so my advice to all teachers on GitHub classroom would be to get their students to accept assignments ahead of time.

If the situation doesn't improve, we will consider alternative approaches to starter code imports.

CC: @oliviercailloux @vincentsijben

vincentsijben commented 5 years ago

Thanks for the update. Assignments ahead of time sometimes arent possible. Hope it gets resolved soon 👍

kevinwortman commented 5 years ago

Yes thanks for the info. Unfortunately having students accept assignments ahead of time is infeasible in our programming lab classes. In order to meet students' learning needs we need to be able to adjust the starter code shortly before class starts. This is a deal-breaker, sadly if this cannot be resolved we will have to stop using GitHub Classroom in these courses.

oliviercailloux commented 5 years ago

My use case is: graded exercise. The specifics of the exercise is not known by students in advance. I therefore do not want to publish the link before starting the session!

In the meantime, at least, please consider:

Personally I found an open issue talking about code import problems and commented there with my case, and realized only after further search that this issue is well known and that there’s not much point in adding my voice there or wasting time searching for a solution.

BenEmdon commented 5 years ago

@oliviercailloux I appreciate your suggestions, and I've renamed this issue and will pin it to the issues board.

I also like your idea of closing the various old issues about code import (with the intent of not wasting peoples time). I'll go ahead and do that 👍

ShreyaPrasad1209 commented 5 years ago

2019-06-05 (2)

Hi can anyone tell me what to do next? It's been like that for past 3 days

ShreyaPrasad1209 commented 5 years ago

2019-06-07 (1)

pinventado commented 5 years ago

@ShreyaPrasad1209 If I might suggest, you can follow the steps I described above (or follow this link)

BenEmdon commented 5 years ago

@ShreyaPrasad1209 common reasons for a starter code import to have an error are:

Please check that neither of these are the source of the issue. If the issue still persists, please open a new issue with more details (since it's technically unrelated to this issue).

ShreyaPrasad1209 commented 5 years ago

@BenEmdon the "creating repository" part in the above screenshot is the source repository? If so, it's not opening.

ShreyaPrasad1209 commented 5 years ago

@pinventado it's not working. The first screenshot above is the result I'm getting whenever I follow your steps.

pinventado commented 5 years ago

@ShreyaPrasad1209 just to clarify, you see the first screenshot after cancelling the import and reimporting it again?

ShreyaPrasad1209 commented 5 years ago

@pinventado yes

BenEmdon commented 5 years ago

@sahilshekhawat are you the professor/teacher of your GitHub classroom? If so, please edit the assignment to see which repository is set in the "Starter code repository field":

The repository set there is the source repository. As I mentioned earlier, I think that the source repository might be the reason for the failed import.

ShreyaPrasad1209 commented 5 years ago

@BenEmdon I'm a student and I want to start my training for GitHub Campus Expert. I'm unable to do that because of above errors.

BenEmdon commented 5 years ago

@ShreyaPrasad1209 please report this to your professor/teacher and give them the context in https://github.com/education/classroom/issues/1591#issuecomment-499980298

BenEmdon commented 5 years ago

Update

A faster and more reliable approach will soon be implemented (it is in our roadmap). The new approach would be to use GitHub's new template repository feature when the API becomes available https://github.blog/2019-06-06-generate-new-repositories-with-repository-templates/

pinventado commented 5 years ago

@benemdon awesome! Will that template functionality be implemented in GitHub classroom? Or will users need to apply it themselves?

kevinwortman commented 5 years ago

@BenEmdon This is great news, thanks for the info.

BenEmdon commented 5 years ago

Will that template functionality be implemented in GitHub classroom?

This will come in an update to GitHub classroom. When the change is shipped all you will need to do is refresh the website 😄

EricPickup commented 5 years ago

Hi everyone! 👋 As an update, we're currently working on the feature mentioned in https://github.com/education/classroom/issues/1591#issuecomment-501070754. We expect to gradually roll out the feature by the beginning of August and have a complete rollout by the end of the summer. This new method of creating repos is expected to increase the repo creation speed dramatically and fix the unexpected issues that occur when creating repositories and importing starter code.

EricPickup commented 5 years ago

Update: The template repos feature is being slowly rolled out starting today. If all goes well I expect to roll out to all classrooms by Friday.

shaunakpp commented 5 years ago

Hi 👋 ! Just a friendly update from the classroom team, we shipped template repositories support for importing starter code a few weeks ago as @EricPickup mentioned. Just letting y'all know that template repositories is the recommended option for importing starter code and is useful in most of the cases, so we're closing this issue. I'm posting links to our help docs for template repositories which discusses this in much detail.

https://classroom.github.com/help/using-template-repos-for-assignments

Also, official blogs about template repositories:

Thank you so much for your patience and suggestions, this wouldn't have been possible without all of you ❤️! And, I wish you all have a good academic session!