Repository navigation
EPMDEDP-17426: fix: Cap git pack memory, push atomically, pin apk minors - #328
Merged
Merged
Conversation
- Cap the delta search window at 100 MiB and stream blobs over 64 MiB, so a push of large files stays under the memory limit - Push with --atomic, so a rejected ref leaves the remote unchanged; a remote without atomic push gets a plain push - Pin git and openssh-client by minor and upgrade the base packages, so the next Alpine package update does not break the build - Take the CA bundle from the base image instead of a pinned ca-certificates package
Collaborator
Pipeline
|
| Status | Task | Duration |
|---|---|---|
| ✓ Passed | github-set-pending-status | 7s |
| ✓ Passed | fetch-repository | 13s |
| ✓ Passed | init-values | 5s |
| ✓ Passed | get-cache | 1m56s |
| ✓ Passed | commit-validate | 5s |
| ✓ Passed | dockerfile-lint | 7s |
| ✓ Passed | helm-lint | 6s |
| ✓ Passed | helm-docs | 40s |
| ✓ Passed | build | 47s |
| ✓ Passed | sonar | 17s |
| ✓ Passed | save-cache | 8s |
| ✓ Passed | buildkit-build | 20s |
| ✓ Passed | github-report-pipeline-status | 7s |
Pushing new commits re-runs this pipeline automatically.
To re-run it without new commits, comment/recheck.
SergK
approved these changes
Nov 2, 2026
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.
Description
Follow-up to #327 (791a2b2), which moved clone, push, checkout and commit to the git binary. Three gaps remain:
pack.windowMemoryis unset. Ten commits of a 90 MB file, pushed with the git settings of 791a2b2 at a 1 GiB limit, are OOM-killed and push nothing.--atomiccan update some refs while the remote rejects others. On the next reconcileadoptPushedProjectfinds the default branch on the remote and adopts the push, so the rejected branches and tags never reach the remote.ca-certificates=20241121-r1broke every build on 2026-10-20.This change:
pack.windowMemory=100mandcore.bigFileThreshold=64mto the git config of every call: the delta search holds at most 100 MiB of objects, and blobs over 64 MiB skip it and are streamed.--atomic, so a rejected ref leaves every ref unchanged and the next reconcile pushes again. A remote that does not offer atomic push (the receiving end does not support --atomic push) gets a plain push.git~=2.49andopenssh-client~=10.0, the minors alpine 3.22 ships, afterapk upgrade, and takes the CA bundle from the base image'sca-certificates-bundleinstead of the pinnedca-certificatespackage. Nothing in the image or the chart runsupdate-ca-certificates; custom CAs still come throughSSL_CERT_DIR.Jira: EPMDEDP-17426
Type of change
How Has This Been Tested?
Unit and lint checks in
golang:1.26(git 2.47.3), on a copy of the change:go test ./pkg/git/TestCLIGitProvider_Push_Atomic(a rejecteddevholds backmain, git reportsatomic push failed) andTestCLIGitProvider_Push_RemoteWithoutAtomic(receive.advertiseAtomic=false; branches and a tag pushed, as onboarding does)--atomic:Push_Atomicfails; no fallback:Push_RemoteWithoutAtomicfails; no byte caps:TestBaseEnv_Configfailsmake build(amd64, arm64),make testpkg/gitcovers 90.7% of statementsmake linthelm lint,helm template,make helm-docsA push of 10 commits of a 90 MB random file (859 MB) to a bare repository, in
alpine:3.22.7withgit 2.49.1-r0, at--memory=1g:gc.auto=0,maintenance.auto=false,pack.threads=1pack.windowMemory=100m,core.bigFileThreshold=64mThe amd64 image of this commit: git 2.49.1, OpenSSH 10.0p2,
ca-certificates-bundle-20261020-r0(118 certificates), no package left to upgrade;git ls-remoteof a GitHub repository over HTTPS succeeds with that bundle, and the entrypoint still gives a random UID in group 0 its passwd entry. In the v3.22 aarch64 indexgit 2.49.1-r0andopenssh-client 10.0_p1-r10(provided byopenssh-client-default) match the pins.On a kind cluster running KubeRocketCI from
mainwith GitLab, the operator image was swapped for an image of this commit and back:created; GitLab has all 45 branches and 98 tags; the push was atomic, no fallbackcreated; GitLab hasmainand the new branch2.37.0-SNAPSHOT.1Checklist:
Additional context
LC_ALL=C.PutDeployConfigsandPutGitLabCIConfigpush every local branch. When the remote rejects one, their commit to the default branch is now held back with it; before, it landed while the step still failed.core.bigFileThresholdalso makes git treat files over 64 MiB as binary, so it applies no end-of-line conversion to them.~=pins follow the minors of theFROMtag: bump them together.