No more full depth clones for deployment #4758
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We made full-depth clones only to have correct modification times in our tutorial/json-ld metadata, and later correct publication times. If we were to separate out that metadata, we could do a much shallower (and faster) clone of the training materials which would mean faster deploys.
Thus we need to have that commit log data available somewhere. This PR chooses to put it in
metadata/git-{mod,pub}-<commit>.txt
(even though it's not used by jekyll). It could also be gzipped to save space, at the cost of uglier diffs. I think .txt might be more space efficient in the long run.I've checked and the average number of commits between two mondays is like, 50. 250 on the outside. So I've set it to clone 400 commits to be on the safe side. Now with the new commit cache, it'll have access to the full breadth of modification and publication times, without needing a full clone of the GTN which is pretty neat.
That said there are still things to check: