Repository navigation
Conversation
klutchell
force-pushed
the
klutchell/optimize-git-fetch
branch
from
September 29, 2026 19:11
83fbdbc to
c4e54d6
Compare
Contributor
|
Website deployed to CF Pages, 👀 preview link https://8a77cf96.flowzone.pages.dev |
The versioned checkout is shallow, so fetching BASE and HEAD without --depth pulled their full history. On environment-production this took ~110s per fetch. Fetch with --depth=1 instead. Git skips on-demand submodule recursion when --depth is set, so fetch the old and new commits of each changed submodule explicitly to keep --submodule=diff working. Git failures in this step now fail the step. Before, a failed fetch or diff silently dropped stacks from the matrix. Change-type: patch Signed-off-by: Kyle Harding <kyle@balena.io>
klutchell
force-pushed
the
klutchell/optimize-git-fetch
branch
from
September 29, 2026 19:45
c4e54d6 to
f415379
Compare
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The flowzone.yml step that diffs CloudFormation templates fetched entire branch histories for BASE and HEAD before diffing. In a shallow clone, fetching a ref without
--depthpulls full history, which is slow and unnecessary since a tree diff only needs the two commits.Fetch BASE and HEAD with
--depth=1 --no-tags --no-recurse-submodules. Since--depthdisables git's automatic submodule recursion, the script now walks the raw diff output itself: for each changed submodule (:160000 160000 <old> <new> M), it recurses into that submodule directory and repeats the shallow two-commit fetch there.Tested here https://github.com/balena-io/environment-playground/actions/runs/36622349287/job/109591049498?pr=4518