-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Update supported URLs in remoteBuild.md #4030
Conversation
Hi @thatsmydoing. 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 Once the patch is verified, the new status will be reflected by the 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. |
@@ -9,7 +9,7 @@ | |||
<!-- @remoteOverlayBuild @test --> | |||
|
|||
```bash | |||
target="github.com/kubernetes-sigs/kustomize/examples/multibases/dev/?ref=v1.0.6" | |||
target="https://github.com/kubernetes-sigs/kustomize//examples/multibases/dev/?ref=v1.0.6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is technically also outdated but I can't write Chinese so I just updated the URLs to conform to the "supported" format. Someone will have to translate it if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't help with that but maybe someone will come along to fix it later :)
examples/remoteBuild.md
Outdated
A [lite version of go-getter module](https://github.com/yujunz/go-getter) is | ||
leveraged to get remote content, then running `kustomize build` against the | ||
desired directory in the local copy. | ||
The URL format is any valid `git clone` URL with an optional directory and some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also precludes simple github.com/owner/repo
style URLs but I think overall it's much clearer to say git clone
URL instead. It's much easier for users too, since if it works with git clone
then it surely works for kustomize.
The same can't be said for all the other "go-getter" style URLs. You could use the go-getter
CLI to test but not everyone has that available and our format isn't even 100% compatible with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about adding a quick comment to this paragraph:
"Kustomize also supports github.com/owner/repo
style URLs such as github.com/kubernetes-sigs/kustomize/examples/multibases/dev/?ref=v1.0.6
"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those types of urls fall under the "legacy formats". I believe we should no longer officially support said URLs as they're confusing.
Points of confusion,
- Bare github.com works but not for any new hosts like git.sr.ht
- Does github.com mean https or ssh?
- The special github handling supports using
/
instead of//
to indicate the directory
I could be convinced to keep them but I think it just adds unnecessary complexity for both users and the code that handles urls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question, but overall this is a good improvement.
For example, | ||
`https://github.com/kubernetes-sigs/kustomize//examples/multibases/dev/?ref=v1.0.6` | ||
will essentially clone the git repo via HTTPS , checkout `v1.0.6` and run | ||
`kustomize build` inside the `examples/multibases/dev` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I like these details.
Note the kustomize root path inside archive must be appended after `//`. | ||
|
||
A base can be a URL: | ||
A remote kustomization directory resource can also be a URL: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason you prefer remote kustomization directory resource
over remote base
? The latter feels more concise and clear to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought base
was deprecated, but I guess it's only the bases
field but not the concept itself.
@@ -9,7 +9,7 @@ | |||
<!-- @remoteOverlayBuild @test --> | |||
|
|||
```bash | |||
target="github.com/kubernetes-sigs/kustomize/examples/multibases/dev/?ref=v1.0.6" | |||
target="https://github.com/kubernetes-sigs/kustomize//examples/multibases/dev/?ref=v1.0.6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't help with that but maybe someone will come along to fix it later :)
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
/approve @natasha41575 is the legacy thing a blocker for you? I'd rather not call it legacy if we have no actual intent to ever remove it, but I'd rather merge this improvement than not. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KnVerey, thatsmydoing 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 |
@KnVerey no it is not a blocker; I’m okay with this being merged as is. |
/lgtm |
1071dd2
to
54ae9ba
Compare
I've rebased as a test was failing. I also made some minor changes to state that only https and ssh urls are supported, and file clones are not. |
/lgtm |
/retest-required |
@thatsmydoing: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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. |
I believe the test failure above is a regression from 4.4 to 4.5. |
#4334 breaks handling of remote bases that start with |
I've expanded on why I think the legacy urls should be dropped in #4454 |
/ok-to-test |
Starting a new release right now |
/retest |
Thank you for this PR! Very grateful that it helped to catch a regression. |
Since kustomize no longer bundles
go-getter
, I've updated the documentation to reflect that. I also took the liberty of more narrowly defining what the supported URL format is. The goal is to minimize confusion for users and to have a potential avenue to remove the "go-getter" format.I only updated the file in the
examples/
directory as I presume thedocs/
directory is deprecated in favor of https://github.com/kubernetes-sigs/cli-experimental if this looks good I can submit a PR for updating those docs too.