Repository navigation
EPMDEDP-17426: feat: Use git CLI for clone, push, checkout and commit - #327
Merged
Merged
Conversation
go-git holds packfiles in operator memory. Large repositories exceed the memory limit. - Run Clone, Push, Commit, Checkout, CheckoutRemoteBranch and CreateChildBranch through the git binary; keep go-git for ref operations, init, remote link and ls-remote - Auth: token through scoped GIT_CONFIG_* headers, SSH key in /dev/shm, mandatory host key checks against SSH_KNOWN_HOSTS, Go CA roots, GIT_ALLOW_PROTOCOL=http:https:ssh - Bound hangs: HTTP and SSH timeouts, process-group kill on cancel, stale .lock removal, capped output - Clone creates local branches; a failed clone removes the destination - Bump base image to alpine:3.22.7 with pinned git, openssh-client and ca-certificates; copy templates and configs as 0755 Signed-off-by: Sergiy Kulanov <sergiy_kulanov@epam.com>
Collaborator
Pipeline
|
| Status | Task | Duration |
|---|---|---|
| ✓ Passed | github-set-pending-status | 43s |
| ✓ Passed | fetch-repository | 14s |
| ✓ Passed | init-values | 6s |
| ✓ Passed | get-cache | 2m21s |
| ✓ Passed | commit-validate | 5s |
| ✓ Passed | dockerfile-lint | 7s |
| ✓ Passed | helm-lint | 7s |
| ✓ Passed | helm-docs | 18s |
| ✓ Passed | build | 2m40s |
| ✓ Passed | sonar | 31s |
| ✓ Passed | save-cache | 1m24s |
| ✓ Passed | buildkit-build | 25s |
| ✓ Passed | github-report-pipeline-status | 20s |
Pushing new commits re-runs this pipeline automatically.
To re-run it without new commits, comment/recheck.
This was referenced 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.
Summary
go-git holds packfiles in operator memory. Clone, push, checkout and commit now run the
gitbinary. go-git keeps ref operations, init, remote link and ls-remote.Evidence
Before: not measured. The old go-git image 2.36.0 was not run against the large repository.
After: testbed (kind, 1 Gi operator limit, GitLab over SSH), upstream
kubernetes/kubernetes(62 branches, 1256 tags, 1.7 GB), four runs:One run had a network failure on the first attempt. The operator cleaned up and the retry passed.
Unit tests run the real
gitbinary:Merge Danger
Door: two-way. Revert the commit and roll back the image.
Blast Radius: operator-wide. Every Codebase clone, push, checkout and commit goes through the git binary.
git://andfile://remote URLs are rejected.gitandsshbinaries.