EPMDEDP-17251: fix: Replace clone-based CodebaseBranch git operations with packless transport - #305
Merged
Conversation
… with packless transport Branch reconciliation cloned the entire repository per CodebaseBranch only to validate a reference and push a branch pointer. The two-step clone was not atomic: a transient network failure between clone and fetch left a half-initialized workdir cache that later reconciles trusted forever, permanently failing the CR until manual intervention. go-git clone is also documented to exhaust memory on large repositories. - resolve references through the upload-pack advertisement (ls-remote equivalent): branch, tag with peeled hash, HEAD, or full commit hash, bounded by ref count instead of repository size - create remote branches with a receive-pack reference update carrying an empty packfile, the mechanism the git pack protocol mandates when the server already owns the target object - resolve fromRef via upload-pack because receive-pack advertisements omit peeled tag hashes and a branch must point at the peeled commit, not the tag object - fall back to the codebase default branch for an empty fromCommit, since receive-pack advertises no HEAD symref - drop workdir management from the branch chain and remove the superseded clone-based methods Each reconcile attempt is now self-contained: nothing to poison between retries, branches pushed after CR creation are found on the next attempt, and per-branch disk usage is zero. Signed-off-by: Sergiy Kulanov <sergiy_kulanov@epam.com>
SergK
force-pushed
the
feature/EPMDEDP-17251-packless-codebasebranch
branch
from
August 3, 2026 19:19
a27b2c9 to
cbf7e66
Compare
Collaborator
Pipeline
|
| Status | Task | Duration |
|---|---|---|
| ✅ | github-set-pending-status | 7s |
| ✅ | fetch-repository | 11s |
| ✅ | init-values | 5s |
| ✅ | get-cache | 2m3s |
| ✅ | commit-validate | 5s |
| ✅ | dockerfile-lint | 8s |
| ✅ | helm-lint | 6s |
| ✅ | helm-docs | 10s |
| ✅ | build | 47s |
| ✅ | sonar | 16s |
| ✅ | save-cache | 7s |
| ✅ | buildkit-build | 29s |
| ✅ | github-report-pipeline-status | 6s |
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.
Branch reconciliation cloned the entire repository per CodebaseBranch only to validate a reference and push a branch pointer. The two-step clone was not atomic: a transient network failure between clone and fetch left a half-initialized workdir cache that later reconciles trusted forever, permanently failing the CR until manual intervention. go-git clone is also documented to exhaust memory on large repositories.
Each reconcile attempt is now self-contained: nothing to poison between retries, branches pushed after CR creation are found on the next attempt, and per-branch disk usage is zero.