From 0db523003084305b74ab5d05554cf8d8cc876709 Mon Sep 17 00:00:00 2001 From: Daniel Higuero Date: Fri, 4 Aug 2023 11:04:16 +0200 Subject: [PATCH 1/2] Docs: Update contribution documentation (#1270) * Docs: Update contribution documentation * Use curl instead of wget as it is found by default on macos * Add troubleshooting section Signed-off-by: Daniel Higuero * Docs: update 1.9 doc Signed-off-by: Daniel Higuero --------- Signed-off-by: Daniel Higuero Signed-off-by: Riya Bisht --- docs/contributor/code-contribute.md | 28 +++++++++++++++++-- .../contributor/code-contribute.md | 26 +++++++++++++++-- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/docs/contributor/code-contribute.md b/docs/contributor/code-contribute.md index 11fb9cfebf5..de3bf2c28e9 100644 --- a/docs/contributor/code-contribute.md +++ b/docs/contributor/code-contribute.md @@ -9,6 +9,7 @@ You will learn the following things in the code contribution guide: - [How to Create a pull request](#create-a-pull-request) - [Code Review Guide](#code-review) - [Formatting guidelines of pull request](#formatting-guidelines) +- [Troubleshooting](#troubleshooting) ## Run KubeVela Locally @@ -105,7 +106,7 @@ sudo mv kubebuilder/bin/* /usr/local/kubebuilder/bin macOS: ``` -wget https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-1.21.2-darwin-amd64.tar.gz +curl -O https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-1.21.2-darwin-amd64.tar.gz tar -zxvf kubebuilder-tools-1.21.2-darwin-amd64.tar.gz mkdir -p /usr/local/kubebuilder/bin sudo mv kubebuilder/bin/* /usr/local/kubebuilder/bin @@ -263,7 +264,7 @@ Before start, please make sure you have already started the vela controller envi make run-apiserver ``` -By default, the apiserver will serving at "0.0.0.0:8000". +By default, the apiserver will be serving at "0.0.0.0:8000". Get the VelaUX code by: @@ -471,4 +472,25 @@ Learn how to write the docs by the following guide: * [kubevela.io Developer Guide](https://github.com/kubevela/kubevela.io/blob/main/README.md) * [Update KubeVela.io CLI Reference Doc](./cli-ref-doc.md) -Great, you have complete the lifecycle of code contribution, try to [join the community as a member](https://github.com/kubevela/community/blob/main/community-membership.md) if you're interested. \ No newline at end of file +Great, you have complete the lifecycle of code contribution, try to [join the community as a member](https://github.com/kubevela/community/blob/main/community-membership.md) if you're interested. + +## Troubleshooting + +* Errors executing `make core-run` + +The `core-run` target uses the `fmt` target to check the format of the files. This step also make use of goimports which +may not have the same version as the base golang installation. For older versions of goimports, you may see the following +error: + +````bash +$ make core-run +go fmt ./... +//go/bin/goimports -local github.com/oam-dev/kubevela -w $(go list -f {{.Dir}} ./...) +//kubevela/pkg/cache/informer.go:46:25: expected ']', found any +```` + +To solve this issue, execute: + +```bash +go install golang.org/x/tools/cmd/goimports@latest +``` \ No newline at end of file diff --git a/versioned_docs/version-v1.9/contributor/code-contribute.md b/versioned_docs/version-v1.9/contributor/code-contribute.md index 11fb9cfebf5..33098060d0b 100644 --- a/versioned_docs/version-v1.9/contributor/code-contribute.md +++ b/versioned_docs/version-v1.9/contributor/code-contribute.md @@ -9,6 +9,7 @@ You will learn the following things in the code contribution guide: - [How to Create a pull request](#create-a-pull-request) - [Code Review Guide](#code-review) - [Formatting guidelines of pull request](#formatting-guidelines) +- [Troubleshooting](#troubleshooting) ## Run KubeVela Locally @@ -105,7 +106,7 @@ sudo mv kubebuilder/bin/* /usr/local/kubebuilder/bin macOS: ``` -wget https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-1.21.2-darwin-amd64.tar.gz +curl -O https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-1.21.2-darwin-amd64.tar.gz tar -zxvf kubebuilder-tools-1.21.2-darwin-amd64.tar.gz mkdir -p /usr/local/kubebuilder/bin sudo mv kubebuilder/bin/* /usr/local/kubebuilder/bin @@ -471,4 +472,25 @@ Learn how to write the docs by the following guide: * [kubevela.io Developer Guide](https://github.com/kubevela/kubevela.io/blob/main/README.md) * [Update KubeVela.io CLI Reference Doc](./cli-ref-doc.md) -Great, you have complete the lifecycle of code contribution, try to [join the community as a member](https://github.com/kubevela/community/blob/main/community-membership.md) if you're interested. \ No newline at end of file +Great, you have complete the lifecycle of code contribution, try to [join the community as a member](https://github.com/kubevela/community/blob/main/community-membership.md) if you're interested. + +## Troubleshooting + +* Errors executing `make core-run` + +The `core-run` target uses the `fmt` target to check the format of the files. This step also make use of goimports which +may not have the same version as the base golang installation. For older versions of goimports, you may see the following +error: + +````bash +$ make core-run +go fmt ./... +//go/bin/goimports -local github.com/oam-dev/kubevela -w $(go list -f {{.Dir}} ./...) +//kubevela/pkg/cache/informer.go:46:25: expected ']', found any +```` + +To solve this issue, execute: + +```bash +go install golang.org/x/tools/cmd/goimports@latest +``` \ No newline at end of file From c82b1255b9b86a5f57ff01301988ec4a7b28d82c Mon Sep 17 00:00:00 2001 From: Riya Bisht <79960426+chococandy63@users.noreply.github.com> Date: Tue, 15 Aug 2023 15:47:57 +0530 Subject: [PATCH 2/2] Doc: update standalone.mdx Fixed the typo `uesd` to `used` under the "Verify Installation" step Signed-off-by: Riya Bisht --- docs/installation/standalone.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/standalone.mdx b/docs/installation/standalone.mdx index b168817c47d..1fb21c39f85 100644 --- a/docs/installation/standalone.mdx +++ b/docs/installation/standalone.mdx @@ -156,7 +156,7 @@ Export kubeconfig and list all built-in ComponentDefinition: :::tip - When executing `velad install`, vela CLI (`vela`) is already installed and add to `PATH` automatically. So you can use it directly. -- A file uesd to configure access to clusters is called *kubeconfig file* +- A file used to configure access to clusters is called *kubeconfig file* :::