-
Notifications
You must be signed in to change notification settings - Fork 713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using GitArtifact as a k8s trigger source fails when using ref #2705
Comments
@PanagiotisS - do you have a proposal? For example, if |
According to the linked issues we need to either downgrade go-git to v5.3.0 (what metal-robot did) or upgrade to the unreleased v5.8.0 (what fluxcd did). Since I am not familiar with the code (or golang) and I do not know what the impact of downgrading would be, I followed what fluxcd did and upgraded go-git (the first part of the patch I posted above). This change affects the whole code. With this change I was able to fetch and move on from lines 172-174 of argo-events/sensors/artifacts/git.go Lines 172 to 174 in 46e2d01
Unfortunately, I was stuck afterwards when the code was trying to pull (lines 191-193) argo-events/sensors/artifacts/git.go Lines 191 to 193 in 46e2d01
However, as the comment in line 180 mentions, it works without this code-block as we fetch a specific refs so we already have what we want. Since, I am not familiar with go, I simple removed it and it worked. This change affects the code only when using Also, when not using Applying the above git patch fixed the problems in my (still testing) environment. I hope this answers your question. So my proposal is the above (git) patch I suppose. Or did you mean something different with proposal? |
This issue has been automatically marked as stale because it has not had |
Describe the bug
Using GitArtifact as a k8s trigger source fails when using ref
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected to work. For example if instead of
ref: refs/heads/feature/argo-workflow
I use
branch: feature/argo-workflow
it works. It clones the git repo, and submits the workflow without issues.Environment (please complete the following information):
Additional context
Related issues:
go-git: empty git-upload-pack given errors since v5.4.0 #328
related issue:
go-git: Pull: error: empty git-upload-pack given
fluxcd solution: upgrade to unreleased v5.8.0
5242551eae/go.mod (L7)
metal-robot solution: Downgrade to v5.3.0
metal-stack/metal-robot#55
Attempted Solution
Upgrading to the same un-rleased v5.8.0 as fluxcd, fixes the issue with the fetch command.
However, afterwards it tries to pull but it fails with error
argo-events/sensors/artifacts/git.go
Lines 180 to 194 in 46e2d01
The comment, correctly notes that is not necessary to pull.
Removing this block, we can successfully clone a repo when using
ref: refs/heads/feature/argo-workflow
or when usingbranch: feature/argo-workflow
.Steps to successfully fix:
git checkout v1.8.0
go mod tidy
(this step updates a bunch of other go dependencies as well
Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered: