kargo icon indicating copy to clipboard operation
kargo copied to clipboard

fix(controller): make git repo retain url suitable for use by external callers of URL() method

Open krancour opened this issue 2 months ago • 2 comments

Fixes #5344

Internally, implementations of git.Repo hang on to URLs that often contain @username, but callers of the URL() method rightfully expect it to return the original URL that was provided to the git.Clone() or git.CloneBare() function.

krancour avatar Nov 05 '25 16:11 krancour

Deploy Preview for docs-kargo-io canceled.

Name Link
Latest commit bdb6abcd6d799acf73cb410f79e8343c7c4467c7
Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/692610fdc982c7000750e8e2

netlify[bot] avatar Nov 05 '25 16:11 netlify[bot]

Codecov Report

:x: Patch coverage is 50.00000% with 44 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 55.06%. Comparing base (5ca84ef) to head (bdb6abc). :warning: Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/git/work_tree.go 3.22% 29 Missing and 1 partial :warning:
pkg/controller/git/base_repo.go 77.77% 4 Missing and 2 partials :warning:
pkg/controller/git/bare_repo.go 80.00% 2 Missing and 2 partials :warning:
pkg/controller/git/repo.go 60.00% 2 Missing and 2 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5350      +/-   ##
==========================================
- Coverage   55.09%   55.06%   -0.04%     
==========================================
  Files         426      426              
  Lines       31442    31485      +43     
==========================================
+ Hits        17324    17338      +14     
- Misses      13121    13146      +25     
- Partials      997     1001       +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 05 '25 16:11 codecov[bot]

Question: I was helping a user where the argocd-update step was passing this as repoURL:

  • https://github.com/my-org/my-repo.git

but Argo's Application was configured without the .git:

  • https://github.com/my-org/my-repo

And so the argocd-update step was not updating the app properly. Would this fix have helped?

jessesuen avatar Nov 18 '25 19:11 jessesuen

@jessesuen I don't believe so. That sounds like a bug, but likely unrelated to this.

krancour avatar Nov 19 '25 01:11 krancour

Successfully created backport PR for release-1.8:

  • #5430

akuitybot avatar Nov 25 '25 21:11 akuitybot