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

Update supported URLs in remoteBuild.md #4030

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

thatsmydoing
Copy link
Contributor

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 the docs/ 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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 2, 2021
@k8s-ci-robot
Copy link
Contributor

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 /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 k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 2, 2021
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 2, 2021
@@ -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"
Copy link
Contributor Author

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.

Copy link
Contributor

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 :)

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
Copy link
Contributor Author

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.

Copy link
Contributor

@natasha41575 natasha41575 Jul 16, 2021

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 "
?

Copy link
Contributor Author

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.

Copy link
Contributor

@natasha41575 natasha41575 left a 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.
Copy link
Contributor

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:
Copy link
Contributor

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

Copy link
Contributor Author

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"
Copy link
Contributor

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 :)

@k8s-triage-robot
Copy link

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 17, 2021
@thatsmydoing
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 18, 2021
@k8s-triage-robot
Copy link

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 16, 2022
@thatsmydoing
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 17, 2022
@KnVerey
Copy link
Contributor

KnVerey commented Jan 18, 2022

/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.

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 18, 2022
@natasha41575
Copy link
Contributor

@KnVerey no it is not a blocker; I’m okay with this being merged as is.

@natasha41575
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 18, 2022
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 18, 2022
@thatsmydoing
Copy link
Contributor Author

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.

@KnVerey
Copy link
Contributor

KnVerey commented Feb 4, 2022

/lgtm
/retest

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 4, 2022
@thatsmydoing
Copy link
Contributor Author

/retest-required

@k8s-ci-robot
Copy link
Contributor

@thatsmydoing: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest-required

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.

@thatsmydoing
Copy link
Contributor Author

I believe the test failure above is a regression from 4.4 to 4.5.

@thatsmydoing
Copy link
Contributor Author

#4334 breaks handling of remote bases that start with https

@thatsmydoing
Copy link
Contributor Author

I've expanded on why I think the legacy urls should be dropped in #4454

@natasha41575
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 9, 2022
@natasha41575
Copy link
Contributor

Starting a new release right now

@natasha41575
Copy link
Contributor

/retest

@k8s-ci-robot k8s-ci-robot merged commit a7f4db7 into kubernetes-sigs:master Feb 10, 2022
@natasha41575
Copy link
Contributor

Thank you for this PR! Very grateful that it helped to catch a regression.

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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

5 participants