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

Add e2e for ssh:// URLs #869

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Add e2e for ssh:// URLs #869

merged 1 commit into from
Apr 4, 2024

Conversation

thockin
Copy link
Member

@thockin thockin commented Apr 4, 2024

Followup to #868 from @yyvess

The test failed before #868 and passes now

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 4, 2024
@k8s-ci-robot k8s-ci-robot requested review from nan-yu and stp-ip April 4, 2024 16:21
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 4, 2024
if u.User != nil && u.Scheme != "ssh" {
// Note that `ssh://user@host/path` URLs need to retain the user
// field. Out of caution, we only handle HTTP(S) URLs here.
if u.User != nil && (u.Scheme == "http" || u.Scheme == "https") {
Copy link
Contributor

@yyvess yyvess Apr 4, 2024

Choose a reason for hiding this comment

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

Why not keep test on schema ssh here ?
Note that for url with the format [email protected]:kubernetes/git-sync method url.Parse return an err then it's good
err = parse "[email protected]:kubernetes/git-sync": first path segment in URL cannot contain colon

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know what OTHER schemes might have the problem that ssh://... has, but I do know that this logic was only intended for HTTP and HTTPS. I'd rather fall back on not changing the URL than changing it wrong (as I did with SSH)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: thockin, yyvess

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

The pull request process is described 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

@thockin thockin merged commit f521da5 into kubernetes:master Apr 4, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants