Skip to content

docs(declarative/repo-ssh): url needs git suffix #13894

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

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

IzioDev
Copy link
Contributor

@IzioDev IzioDev commented Jun 3, 2023

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Please see Contribution FAQs if you have questions about your pull-request.

Sorry, something went wrong.

Signed-off-by: Romain Billot <romainbillot3009@gmail.com>
@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (e48c9e1) 49.76% compared to head (ce040ef) 49.77%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13894   +/-   ##
=======================================
  Coverage   49.76%   49.77%           
=======================================
  Files         261      261           
  Lines       44667    44667           
=======================================
+ Hits        22230    22233    +3     
+ Misses      20251    20249    -2     
+ Partials     2186     2185    -1     

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@morey-tech
Copy link
Contributor

I'm not sure that the URL needs the .git extension. Based on this test, the repo-server should normalize the URL to include it.

@IzioDev
Copy link
Contributor Author

IzioDev commented Jun 6, 2023

interesting @morey-tech, do you know for which argocd version this test was run against?

without the .git it didn't work on my end, but I might have a specific configuration or version that didn't do it?

EDIT: I will try to give my current configuration this evening, on the relevant part, as well as the version I'm using if it helps investigate.

Shall we close this PR and move to an issue if I can reproduce it?

@morey-tech
Copy link
Contributor

interesting @morey-tech, do you know for which argocd version this test was run against?

I referenced the latest, so v2.7 would definitely have it, but it looks like the normalization of the URLs has been a part of Argo CD since v0.

without the .git it didn't work on my end, but I might have a specific configuration or version that didn't do it?

I see now that some Git providers require that the .git extension be used. What's your provider?

Some Git hosters - notably GitLab and possibly on-premise GitLab instances as well - require you to

Shall we close this PR and move to an issue if I can reproduce it?

This might not be an issue, more of a nuance of how some Git providers work. But creating an issue would make this more discoverable for anyone who runs into it in the future.

@morey-tech
Copy link
Contributor

This may be related to #7714. It seems that the normalized repo URL is only used in some cases. The git client is still initialized with the raw repo URL.

normalizedGitURL := NormalizeGitURL(rawRepoURL)

return NewClientExt(rawRepoURL, root, creds, insecure, enableLfs, proxy, opts...)

@IzioDev
Copy link
Contributor Author

IzioDev commented Jun 6, 2023

What's your provider?

It's Github, private repository, repo isn't at an organization level but as a user repository

@IzioDev
Copy link
Contributor Author

IzioDev commented Jun 6, 2023

Here is my configuration:

apiVersion: v1
kind: Secret
metadata:
    name: private-repo
    namespace: argocd
    labels:
        argocd.argoproj.io/secret-type: repository
stringData:
    type: git
    url: git@github.com:IzioDev/test-argocd.git
    sshPrivateKey: |-

Copy link
Contributor

@morey-tech morey-tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to add the suffix if even GitHub requires it.

@IzioDev
Copy link
Contributor Author

IzioDev commented Jun 7, 2023

@morey-tech Do you know if other repository reference are impacted too by this change? Shall we change it for all mentioning of reference or only the SSH secret part is enough?

Copy link
Member

@pasha-codefresh pasha-codefresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pasha-codefresh pasha-codefresh merged commit 52e05a1 into argoproj:master Jun 29, 2023
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
Signed-off-by: Romain Billot <romainbillot3009@gmail.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
@suzaku suzaku mentioned this pull request Aug 15, 2023
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
Signed-off-by: Romain Billot <romainbillot3009@gmail.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants