From d9154421280a82745fcd08c5c5f0e9d075e69b4a Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Thu, 1 Dec 2022 20:30:46 +0530 Subject: [PATCH] fix: go-git error empty git-upload-pack given. Fixes #9613 (#9982) Signed-off-by: Rohan Kumar --- go.mod | 2 +- go.sum | 4 ++-- test/e2e/artifacts_test.go | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1d610647945d..bfac3e4df32a 100644 --- a/go.mod +++ b/go.mod @@ -227,4 +227,4 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect ) -replace github.com/go-git/go-git/v5 => github.com/argoproj-labs/go-git/v5 v5.4.4 +replace github.com/go-git/go-git/v5 => github.com/argoproj-labs/go-git/v5 v5.4.5 diff --git a/go.sum b/go.sum index 6965d7e7b310..3f634de6d295 100644 --- a/go.sum +++ b/go.sum @@ -181,8 +181,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/antonmedv/expr v1.9.0 h1:j4HI3NHEdgDnN9p6oI6Ndr0G5QryMY0FNxT4ONrFDGU= github.com/antonmedv/expr v1.9.0/go.mod h1:5qsM3oLGDND7sDmQGDXHkYfkjYMUX14qsgqmHhwGEk8= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/argoproj-labs/go-git/v5 v5.4.4 h1:xXa015ZCEElgNMxaevPsK68oAsbjpmNGo9W+os1oeBU= -github.com/argoproj-labs/go-git/v5 v5.4.4/go.mod h1:Lv1K45bcCda9jDMEZCGCVuXSGdBaSGAXUvptnVtaEsA= +github.com/argoproj-labs/go-git/v5 v5.4.5 h1:0npa09sswRtlCW5RZD+OVSp3bmf03XcebepeTo1orgA= +github.com/argoproj-labs/go-git/v5 v5.4.5/go.mod h1:Lv1K45bcCda9jDMEZCGCVuXSGdBaSGAXUvptnVtaEsA= github.com/argoproj/argo-events v1.7.3 h1:XiGnKCzRRQCI7sFCKw3RoeFUOR6IupfAJI9uUK7pnG8= github.com/argoproj/argo-events v1.7.3/go.mod h1:YxDOXrveW52SDAeeTI93Wagkr4jt5DK0dA0juIdWDRw= github.com/argoproj/pkg v0.13.6 h1:36WPD9MNYECHcO1/R1pj6teYspiK7uMQLCgLGft2abM= diff --git a/test/e2e/artifacts_test.go b/test/e2e/artifacts_test.go index 6f9ad26d19bb..947d45aa778e 100644 --- a/test/e2e/artifacts_test.go +++ b/test/e2e/artifacts_test.go @@ -408,6 +408,35 @@ spec: }) } +func (s *ArtifactsSuite) TestGitArtifactDepthClone() { + s.Given(). + Workflow(`apiVersion: argoproj.io/v1alpha1 +kind: Workflow +metadata: + generateName: git-depth- +spec: + entrypoint: git-depth + templates: + - name: git-depth + inputs: + artifacts: + - name: git-repo + path: /tmp/git + git: + repo: https://github.com/argoproj-labs/go-git.git + revision: master + depth: 1 + container: + image: argoproj/argosay:v2 + command: [sh, -c] + args: ["ls -l"] + workingDir: /tmp/git +`). + When(). + SubmitWorkflow(). + WaitForWorkflow(fixtures.ToBeSucceeded) +} + func TestArtifactsSuite(t *testing.T) { suite.Run(t, new(ArtifactsSuite)) }