apluslms / gitmanager

Git manager service for A+. Separated from the MOOC-Grader.
0 stars 6 forks source link

Course is unstable during the build if 'skip build failsafes' is enabled #27

Open markkuriekkinen opened 2 years ago

markkuriekkinen commented 2 years ago

In the O1 course, when the gitmanager setting "skip build failsafes" is enabled(*), then the course is unstable during the build after git-push. There is a period of some seconds when opening chapter pages in A+ fails because A+ is unable to fetch the built html files from the gitmanager. This is expected when the build runs in the publish directory ("skip build failsafes" enabled), but the errors seem to affect all chapters. Even if a git commit changes only one chapter, loading any chapter in A+ seems to fail during the aforementioned time period.

Is it possible to modify the build so that it would not write chapter html for those chapters that were not even modified? Would that alleviate the errors in A+ during the aforementioned time period?

Is this basically the same as #25?

(*) UPDATE: there is an unstable period at the end of the build even if "skip build failsafes" is disabled. The course can not be accessed in the gitmanager during that time.

oseppala commented 2 years ago

What about building the course in a temp dir and just switching the directories after the build is finished?

markkuriekkinen commented 2 years ago

What about building the course in a temp dir and just switching the directories after the build is finished?

Maybe. If "skip build failsafes" were disabled, it would do that amongst other phases. Just moving/switching directories is limited by the file systems since moving (mv command) requires that the source and destination are on the same file system.

markkuriekkinen commented 2 years ago

Highlighting this comment from the pull request #28: https://github.com/apluslms/gitmanager/pull/28#issuecomment-1310761346

PasiSa, do you think that issue #27 should be linked to this pull request?

I don't think we can fully close the issue with this PR. When skip_build_failsafes is enabled, there is a period of few seconds when gitmanager parses the exercise configurations and then there can be failures on access. Without the skip flag I haven't been able to reproduce failures that occurred with the original code.

So I suggest that we merge this, because it fixes the problem during file removal period in the publish stage. Then, we may choose to continue debugging what happens during these few seconds in the skip mode (or alternatively, just decide to remove the skip mode entirely)