kustomize icon indicating copy to clipboard operation
kustomize copied to clipboard

repospec: support ssh urls with ssh certificates

Open mightyguava opened this issue 3 years ago • 17 comments
trafficstars

Organizations that use a custom SSH Certificate Authority with GitHub Enterprise Cloud will have a host that starts with org-12345@ instead of git@. This removes the hard-coded git@ in the repo spec parsing for a regexp match on a valid username instead.

E.g. now it will be able to parse specs like [email protected]:someOrg/someRepo/README.md?ref=someBranch.

Docs here

mightyguava avatar Aug 01 '22 20:08 mightyguava

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: mightyguava / name: Yunchi Luo (03d7aecf078e78a38a681f3869ec4b873d8cabb9)

Welcome @mightyguava!

It looks like this is your first PR to kubernetes-sigs/kustomize 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kustomize has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Aug 01 '22 20:08 k8s-ci-robot

Hi @mightyguava. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Aug 01 '22 20:08 k8s-ci-robot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mightyguava Once this PR has been reviewed and has the lgtm label, please assign natasha41575 for approval by writing /assign @natasha41575 in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Aug 01 '22 20:08 k8s-ci-robot

/ok-to-test

natasha41575 avatar Aug 03 '22 21:08 natasha41575

/test all

mightyguava avatar Aug 03 '22 22:08 mightyguava

I can't figure out how to trigger tests... 😞

mightyguava avatar Aug 04 '22 17:08 mightyguava

Thanks @natasha41575 for triggering the tests. I've fixed the lint error. I did actually try to lint locally before but it turns out that I had an old version of the linter.

mightyguava avatar Aug 04 '22 18:08 mightyguava

Hmm the new lint failure is at api/krusty/openapitests/openapicustomschema_test.go:10:2, bears no relation to this code.

mightyguava avatar Aug 10 '22 21:08 mightyguava

Ok looks like that's getting fixed in https://github.com/kubernetes-sigs/kustomize/pull/4754 and is unrelated.

mightyguava avatar Aug 11 '22 14:08 mightyguava

/hold This PR is affected by https://github.com/kubernetes-sigs/kustomize/issues/4756, and https://github.com/kubernetes-sigs/kustomize/issues/4620 in particular. We will not be able to accept it until those are resolved. If you are available to help with those efforts, it would be very much appreciated.

KnVerey avatar Aug 12 '22 16:08 KnVerey

@KnVerey can the hold on this be lifted now?

mightyguava avatar Sep 21 '22 13:09 mightyguava

@mightyguava: This PR has multiple commits, and the default merge method is: merge. You can request commits to be squashed using the label: tide/merge-method-squash

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Sep 26 '22 14:09 k8s-ci-robot

@KnVerey bump!

mightyguava avatar Sep 30 '22 00:09 mightyguava

After reading @KnVerey comment , I feel like I might misevaluate the complexity of this PR.

I was assuming @mightyguava has a very specific use case he wants to support ( the [email protected]:someOrg/someRepo/README.md?ref=someBranch example). But from reading the comments, it looks like there are more conditions and cases.

@mightyguava shall we update the description to cover all of those? (PR description is super helpful to record the original intent and specific use cases we want to support. It helps deciding the future maintenance effort as well)

yuwenma avatar Oct 07 '22 20:10 yuwenma

I was assuming @mightyguava has a very specific use case he wants to support ( the [email protected]:someOrg/someRepo/README.md?ref=someBranch example). But from reading the comments, it looks like there are more conditions and cases.

I think that your impression is correct--that is the goal of this PR. The additional cases come from the complexity of the existing code, which makes it extremely difficult to add this feature without affecting how other input URLs get parsed. It is important that anything that successfully built in the past will continue to build successfully. Ideally we would also not make anything new possible besides the intended case, but the ways to do that may have trade-offs in terms of increasing the complexity of the already complex code here. Related to that, I think most of us who have interacted with this PR agree that RepoSpec as it stands on master today needs a significant refactor, and that some of the things it supports today are unintentional / don't make sense. Given the risk of breaking changes there, the maintainers team agreed at our last meeting that this would be a good thing to do as part of the next major release, potentially with a pre-release period soliciting feedback on any formats we may have unintentionally removed support for.

KnVerey avatar Oct 11 '22 16:10 KnVerey

Thank you all for the reviews, @KnVerey @yuwenma @natasha41575. I really appreciate your time and attention. I wanted to give a heads up that unfortunately this PR has significantly exceeded the time I allotted myself to push it to completion, particularly with time spent on #4640.

I'm going to have to put this on the backburner and focus more on my day job for a while. I'd still really like to get this change in though, so I plan to circle back after around a month.

mightyguava avatar Oct 14 '22 13:10 mightyguava

@mightyguava: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 15 '22 18:11 k8s-ci-robot

Closing in favour of #4986

KnVerey avatar Jan 20 '23 18:01 KnVerey