Skip to content
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

fix(manager/git-submodule): use appropriate hostType for auth #17400

Merged
merged 5 commits into from
Apr 21, 2023

Conversation

viceice
Copy link
Member

@viceice viceice commented Aug 25, 2022

Changes

  • detect platform on sub-module manager and fallback to git-refs
  • default branch works with platform host-rule works
  • there are still issues:
    • if platform is detected, fetching updates doesn't work, as we always use git-refs host-type.

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@viceice viceice requested a review from rarkins August 25, 2022 06:28
@viceice
Copy link
Member Author

viceice commented Aug 25, 2022

@rarkins should we propably need to change this

const hostRule = hostRules.find({ url, hostType });

So if hostType=git-ref and we don't find auth, try to detect platform and use platform specific hostrule?
Or just always use git-refs and document on sub-modules manager, that we need a git-refs host-type or no host-type?

@astellingwerf
Copy link
Collaborator

Don't you agree the same fix could apply to the GitRefsDatasource and GitTagsDatasource?

@viceice
Copy link
Member Author

viceice commented Aug 29, 2022

Don't you agree the same fix could apply to the GitRefsDatasource and GitTagsDatasource?

that's not so easy, as they use static http classes, which passes the Host-Type via constructors

@viceice
Copy link
Member Author

viceice commented Dec 30, 2022

@rarkins WDYT?

@rarkins
Copy link
Collaborator

rarkins commented Dec 30, 2022

I really don't know, sorry. Haven't written or used this section of code

@viceice
Copy link
Member Author

viceice commented Dec 30, 2022

@JamieMagee WDYT?

@JamieMagee
Copy link
Contributor

This looks reasonable, though from your description it might just push the issue to when updates are fetched?

JamieMagee
JamieMagee previously approved these changes Jan 2, 2023
@viceice viceice marked this pull request as ready for review January 2, 2023 08:41
@viceice
Copy link
Member Author

viceice commented Jan 2, 2023

This looks reasonable, though from your description it might just push the issue to when updates are fetched?

🤷‍♂️ not sure about a better solution

@ribtoks
Copy link

ribtoks commented Apr 20, 2023

What is preventing this PR from being merged?

@JamieMagee JamieMagee added this pull request to the merge queue Apr 21, 2023
Merged via the queue into main with commit 455de72 Apr 21, 2023
9 checks passed
@JamieMagee JamieMagee deleted the fix/git-submodule-auth branch April 21, 2023 04:38
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 35.55.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Git-submodule checkout om Gitlab stopped working with 32.110.2
7 participants