You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/02/11 05:03:35 UTC

[skywalking-satellite] branch doc/polish updated (0b97873 -> 8968693)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch doc/polish
in repository https://gitbox.apache.org/repos/asf/skywalking-satellite.git.


 discard 0b97873  Polish the doc and compact the GHA configs
     new 8968693  Polish the doc and compact the GHA configs

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0b97873)
            \
             N -- N -- N   refs/heads/doc/polish (8968693)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 tools/install_protoc.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)


[skywalking-satellite] 01/01: Polish the doc and compact the GHA configs

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch doc/polish
in repository https://gitbox.apache.org/repos/asf/skywalking-satellite.git

commit 8968693970861ac9ecea46f80330a1e369071d7b
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Feb 11 11:10:15 2021 +0800

    Polish the doc and compact the GHA configs
---
 .github/workflows/build-and-test.yaml              | 62 +++++-----------------
 .licenserc.yaml                                    | 36 +++++++++++++
 Makefile                                           |  8 +--
 README.md                                          |  2 +-
 docs/en/concepts-and-designs/project-goals.md      |  8 +--
 docs/en/guides/contribuation/plugin.md             |  2 +-
 docs/en/setup/README.md                            |  4 +-
 docs/en/setup/configuration/common.md              |  6 +--
 .../en/setup/plugins/fallbacker_none-fallbacker.md |  2 +-
 plugins/fallbacker/none/none_fallbacker.go         |  2 +-
 .../{queue_opreation.go => queue_operation.go}     |  0
 tools/install_protoc.sh                            | 25 ++++++---
 tools/protocol_gen.sh                              |  2 +-
 13 files changed, 81 insertions(+), 78 deletions(-)

diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml
index 7eb20c1..90a2200 100644
--- a/.github/workflows/build-and-test.yaml
+++ b/.github/workflows/build-and-test.yaml
@@ -21,59 +21,16 @@ on:
   push:
     branches:
       - main
+      - doc/polish
 
 jobs:
-  CI-Windows:
-    runs-on: windows-latest
-    timeout-minutes: 90
-    strategy:
-      matrix:
-        go-version: [ 1.14, 1.15 ]
-      fail-fast: true
-    steps:
-      - name: Set up Go ${{ matrix.go-version }}
-        uses: actions/setup-go@v2
-        with:
-          go-version: ${{ matrix.go-version }}
-      - name: Check out code into the Go module directory
-        uses: actions/checkout@v2
-        with:
-          submodules: true
-      - name: Get dependencies
-        run: make deps
-      - name: Test
-        run: make test
-      - name: Build
-        run: make build
-
-  CI-MacOS:
-    runs-on: macos-latest
-    timeout-minutes: 90
-    strategy:
-      matrix:
-        go-version: [ 1.14, 1.15 ]
-      fail-fast: true
-    steps:
-      - name: Set up Go ${{ matrix.go-version }}
-        uses: actions/setup-go@v2
-        with:
-          go-version: ${{ matrix.go-version }}
-      - name: Check out code into the Go module directory
-        uses: actions/checkout@v2
-        with:
-          submodules: true
-      - name: Get dependencies
-        run: make deps
-      - name: Test
-        run: make test
-      - name: Build
-        run: make build
   CI:
-    runs-on: ubuntu-latest
-    timeout-minutes: 90
+    runs-on: ${{ matrix.runner }}-latest
+    timeout-minutes: 30
     strategy:
       matrix:
         go-version: [ 1.14, 1.15 ]
+        runner: [ ubuntu, macos, windows ]
       fail-fast: true
     steps:
       - name: Set up Go ${{ matrix.go-version }}
@@ -85,22 +42,27 @@ jobs:
         with:
           submodules: true
       - name: Check License
-        run: make license
+        if: matrix.runner == 'ubuntu'
+        uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
       - name: Get dependencies
         run: make deps
       - name: Check generate
         run: make gen && make build
       - name: Check CI Consistency
-        if: matrix.go-version == '1.15'
+        if: matrix.go-version == '1.15' && matrix.runner == 'ubuntu'
         run: make check
       - name: Lint
         run: make lint
       - name: Test
         run: make test
+      - name: Build
+        run: make build
 
   result:
     runs-on: ubuntu-latest
-    timeout-minutes: 90
+    timeout-minutes: 30
     needs: [ CI ]
     steps:
       - name: Build Result
diff --git a/.licenserc.yaml b/.licenserc.yaml
new file mode 100644
index 0000000..45dc67c
--- /dev/null
+++ b/.licenserc.yaml
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+header:
+  license:
+    spdx-id: Apache-2.0
+    copyright-owner: Apache Software Foundation
+
+  paths-ignore:
+    - '**/gen-codes/**'
+    - '**/*.md'
+    - .gitignore
+    - .gitmodules
+    - LICENSE
+    - NOTICE
+    - go.mod
+    - go.sum
+    - plugins/queue/mmap/queue_operation.go
+
+  comment: on-failure
diff --git a/Makefile b/Makefile
index a1251cd..0230b7a 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,6 @@ GO_BUILD = $(GO) build
 GO_GET = $(GO) get
 GO_TEST = $(GO) test
 GO_LINT = $(GO_PATH)/bin/golangci-lint
-GO_LICENSER = $(GO_PATH)/bin/go-licenser
 GO_BUILD_FLAGS = -v
 GO_BUILD_LDFLAGS = -X main.version=$(VERSION)
 GQL_GEN = $(GO_PATH)/bin/gqlgen
@@ -49,7 +48,6 @@ all: deps verify build check
 .PHONY: tools
 tools:
 	$(GO_LINT) version || curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_PATH)/bin v1.33.0
-	$(GO_LICENSER) -version || GO111MODULE=off $(GO_GET) -u github.com/elastic/go-licenser
 
 deps: tools
 	$(GO_GET) -v -t -d ./...
@@ -67,12 +65,8 @@ lint: tools
 test: clean
 	$(GO_TEST) ./... -coverprofile=coverage.txt -covermode=atomic
 
-.PHONY: license
-license: clean tools
-	$(GO_LICENSER) -d -exclude=plugins/queue/mmap/queue_opreation.go -exclude=protocol/gen-codes -licensor='Apache Software Foundation (ASF)' ./
-
 .PHONY: verify
-verify: clean license lint test
+verify: clean lint test
 
 .PHONY: clean
 clean: tools
diff --git a/README.md b/README.md
index 67d2417..f46a0d9 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ Apache SkyWalking Satellite
 NOTICE, SkyWalking Satellite uses [v3 protocols](https://github.com/apache/skywalking/blob/master/docs/en/protocols/README.md). They are incompatible with previous SkyWalking releases before SkyWalking 8.0.
 
 # Download
-Go to the [download page](https://skywalking.apache.org/downloads/) to download all available binaries, including MacOS, Linux and Windows. Due to system compatibility problems, some plugins of SkyWalking Satellite cannot be used in Windows system. Check [the corresponding documentation](./docs/en/guides/compile/compile.md) to see whether the plugin is available on Windows.
+Go to the [download page](https://skywalking.apache.org/downloads/) to download all available binaries, including MacOS, Linux and Windows. Due to system compatibility problems, some plugins of SkyWalking Satellite cannot be used in Windows system. Check [the corresponding documentation](./docs/en/setup/plugins) to see whether the plugin is available on Windows.
 
 # Compile
 As SkyWalking Satellite is using `Makefile`, compiling the project is as easy as executing a command in the root directory of the project.
diff --git a/docs/en/concepts-and-designs/project-goals.md b/docs/en/concepts-and-designs/project-goals.md
index c620f4c..c8795b2 100644
--- a/docs/en/concepts-and-designs/project-goals.md
+++ b/docs/en/concepts-and-designs/project-goals.md
@@ -3,13 +3,13 @@ The document outlines the core design goals for SkyWalking Satellite project.
 
 - **Light Weight**. SkyWalking Satellite has a limited cost for resources and high-performance because of the requirements of the sidecar deployment model.
 
-- **Pluggable**. SkyWalking Satellite core team provides many default implementations, but definitely it is not enough,
+- **Pluggability**. SkyWalking Satellite core team provides many default implementations, but definitely it is not enough,
 and also don't fit every scenario. So, we provide a lot of features for being pluggable. 
 
 - **Portability**. SkyWalking Satellite can run in multiple environments, including: 
-    - Use traditional deployment as a demon process to collect data.
-    - Use cloud services as a sidecar, such as in the kubernetes platform.
+    - Use traditional deployment as a daemon process to collect data.
+    - Use cloud services as a sidecar, such as in the Kubernetes platform.
 
-- **Interop**.  Observability is a big landscape, SkyWalking is impossible to support all, even by its community. So SkyWalking Satellite is compatible with many protocols, including: 
+- **Interoperability**. Observability is a big landscape, SkyWalking is impossible to support all, even by its community. So SkyWalking Satellite is compatible with many protocols, including: 
     - SkyWalking protocol
     - (WIP) Prometheus protocol.
diff --git a/docs/en/guides/contribuation/plugin.md b/docs/en/guides/contribuation/plugin.md
index ffbd624..b2f4a61 100644
--- a/docs/en/guides/contribuation/plugin.md
+++ b/docs/en/guides/contribuation/plugin.md
@@ -2,7 +2,7 @@
 If you want to add a custom plugin in SkyWalking Satellite, the following contents would guide you.
 Let's use memory-queue as an example of how to write a plugin.
 
-1. Choose the plugin category. According to the memory-queue is a queue, the plugin should be write in the **skywalking-satellite/plugins/queue** directory. So we create a new directory called memory as the plugin codes space.  
+1. Choose the plugin category. As the memory-queue is a queue, the plugin should be written in the **skywalking-satellite/plugins/queue** directory. So we create a new directory called memory as the plugin codes space.  
 
 2. Implement the interface in the **skywalking-satellite/plugins/queue/api**. Each plugin has 3 common methods, which are Name(), Description(), DefaultConfig().
     - Name() returns the unique name in the plugin category.
diff --git a/docs/en/setup/README.md b/docs/en/setup/README.md
index 77a2d2c..3c5ab09 100644
--- a/docs/en/setup/README.md
+++ b/docs/en/setup/README.md
@@ -1,5 +1,5 @@
 # Setup
-First and most important thing is, SkyWalking Satellite startup behaviours are driven by configs/satellite_config.yaml. Understood the setting file will help you to read this document.
+First and most important thing is, SkyWalking Satellite startup behaviours are driven by configs/satellite_config.yaml. Understanding the setting file will help you to read this document.
 
 ## Startup script
 The startup script is /bin/skywalking-satellite-{version}-{plateform}-amd64. 
@@ -16,4 +16,4 @@ So, in satellite_config.yaml, there are three parts.
 3. [The pipe plugin configurations](./configuration/pipe-plugins.md).
 
 ## Advanced feature document link list
-1. [Overriding settings](./configuration/override-settings.md) in satellite_config.yaml is supported
\ No newline at end of file
+1. [Overriding settings](./configuration/override-settings.md) in satellite_config.yaml is supported
diff --git a/docs/en/setup/configuration/common.md b/docs/en/setup/configuration/common.md
index e4581e2..4990d01 100644
--- a/docs/en/setup/configuration/common.md
+++ b/docs/en/setup/configuration/common.md
@@ -12,7 +12,7 @@ configuration and the telemetry configuration.
 ## Self Telemetry
 |  Config   |Default| Description  |
 |  ----  | ----  | ----  |
-| cluster  | default-cluster | The space concept for the deployment, such as the namespace concept in the kubernetes.|
-| service  | default-service | The group concept for the deployment, such as the service resource concept in the kubernetes.|
-| instance  | default-instance |The minimum running unit, such as the pod concept in the kubernetes.|
+| cluster  | default-cluster | The space concept for the deployment, such as the namespace concept in the Kubernetes.|
+| service  | default-service | The group concept for the deployment, such as the service resource concept in the Kubernetes.|
+| instance  | default-instance |The minimum running unit, such as the pod concept in the Kubernetes.|
 
diff --git a/docs/en/setup/plugins/fallbacker_none-fallbacker.md b/docs/en/setup/plugins/fallbacker_none-fallbacker.md
index 4b8fa4d..b425422 100755
--- a/docs/en/setup/plugins/fallbacker_none-fallbacker.md
+++ b/docs/en/setup/plugins/fallbacker_none-fallbacker.md
@@ -1,5 +1,5 @@
 # Fallbacker/none-fallbacker
 ## Description
-The fallbacker would nothing to do when facing failure data.
+The fallbacker would do nothing when facing failure data.
 ## DefaultConfig
 ```yaml```
diff --git a/plugins/fallbacker/none/none_fallbacker.go b/plugins/fallbacker/none/none_fallbacker.go
index ffb4822..f61cff1 100644
--- a/plugins/fallbacker/none/none_fallbacker.go
+++ b/plugins/fallbacker/none/none_fallbacker.go
@@ -34,7 +34,7 @@ func (f *Fallbacker) Name() string {
 }
 
 func (f *Fallbacker) Description() string {
-	return "The fallbacker would nothing to do when facing failure data."
+	return "The fallbacker would do nothing when facing failure data."
 }
 
 func (f *Fallbacker) DefaultConfig() string {
diff --git a/plugins/queue/mmap/queue_opreation.go b/plugins/queue/mmap/queue_operation.go
similarity index 100%
rename from plugins/queue/mmap/queue_opreation.go
rename to plugins/queue/mmap/queue_operation.go
diff --git a/tools/install_protoc.sh b/tools/install_protoc.sh
index 5cecfda..60d79de 100755
--- a/tools/install_protoc.sh
+++ b/tools/install_protoc.sh
@@ -16,17 +16,28 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+set -ex
 
+PROTOC_VERSION=3.14.0
 
-if [[ "$(uname)"=="Darwin" || "$(expr substr $(uname -s) 1 10)"=="MINGW32_NT" ]];then
+if uname -s | grep MINGW64_NT || uname -s | grep CYGWIN_NT-6.1; then
+  PROTOC_ZIP=protoc-"$PROTOC_VERSION"-win64.zip
+elif uname -s | grep Darwin; then
+  PROTOC_ZIP=protoc-"$PROTOC_VERSION"-osx-x86_64.zip
+elif uname -s | grep Linux; then
+  PROTOC_ZIP=protoc-"$PROTOC_VERSION"-linux-x86_64.zip
+else
   echo "sorry, please install protoc by yourself."
-  exit 1
 fi
 
-PROTOC_ZIP=protoc-3.14.0-linux-x86_64.zip
-curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/$PROTOC_ZIP
-sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
-sudo chmod 755  /usr/local/bin/protoc
+curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v"$PROTOC_VERSION"/$PROTOC_ZIP
+mkdir -p $HOME/usr/local
+unzip -o $PROTOC_ZIP -d $HOME/usr/local bin/protoc > /dev/null 2>&1 || true
+unzip -o $PROTOC_ZIP -d $HOME/usr/local bin/protoc.exe > /dev/null 2>&1 || true
+mv $HOME/usr/local/bin/protoc.exe $HOME/usr/local/bin/protoc > /dev/null 2>&1 || true
+chmod 755  $HOME/usr/local/bin/protoc
 rm -f $PROTOC_ZIP
 
-echo `protoc --version`
+export PATH=$PATH:$HOME/usr/local/bin
+
+protoc --version
diff --git a/tools/protocol_gen.sh b/tools/protocol_gen.sh
index b2bb131..6fba9e4 100755
--- a/tools/protocol_gen.sh
+++ b/tools/protocol_gen.sh
@@ -20,7 +20,7 @@
 # ----------------------------------------------------------------------------
 
 
-
+export PATH=$PATH:~/usr/local/bin
 export PROTO_HOME=protocol/all_protocol
 export COLLECT_PROTOCOL_HOME=protocol/skywalking-data-collect-protocol
 export SATELLITE_PROTOCOL_HOME=protocol/satellite-protocol