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

Avoid unnecessarily sending course updates to the A+ front in the course build when, e.g., only RST chapter content changed #24

Open
Tracked by #7
markkuriekkinen opened this issue Sep 9, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@markkuriekkinen
Copy link
Contributor

When the "update automatically" setting is enabled in a course, the course build notifies the A+ front in the end so that it imports the aplus-json configuration automatically. This operation is not always needed and skipping it would speed up the build. Particularly, when the course update in the git repo changes only the study materials in the RST chapter files (but does not modify any assignment directive in the chapter), then there are no changes that should be imported to the A+ front.

The Git manager platform already runs git operations on the cloned course git repo, thus, it should be possible to inspect the git commit history and check which files have been changed and what kind of changes there are.
Note that there could be multiple new git commits since the previous version.

Challenges that may make this unfeasible:

  • if only RST files are changed in a course git commit, we still have to check that no assignment directives have been changed in the chapter.
  • the course build may change files even though the specific file was not changed in the git commit. E.g., build.sh script in the course could modify any files.
  • A+ front stores the old version of the chapter contents in its content cache. It might be necessary to flush the content cache. When A+ imports aplus-json, it also flushes the cache. Now, only the flush might be needed without the aplus-json import.
@markkuriekkinen markkuriekkinen added the enhancement New feature or request label Sep 9, 2022
@lainets
Copy link
Contributor

lainets commented Feb 28, 2023

Couple notes:

  • Rsync tells what files have changed, so it could be very useful for this if we end up using it to copy the built files
  • Optimize course configuring a-plus#1161 should make the automatic update take only a few seconds at most whenever only rst files have changed, so this change may not be needed after that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants