Skip to content

Commit

Permalink
Chore: Rebase main (#309)
Browse files Browse the repository at this point in the history
* bugfix(pitr): fix storage nodes info struct error, add endtime to backup file, and fix backup mode ptrack did not work. (#288)

* chore(ci): add golangci-lint and refactor according to the result (#294)

* chore: add golangci-lint check config and update Makefile for check

* fix: fix according to golangci-lint

* fix: rename Api to API

* fix: fix sharedVolumeAndMountBuild SetVolumeMountSize non-zero slice

* fix: remove overlapped Build method from shardingSphereProxyContainerBuilder

* chore: add license header

* chore(ci): add golangci-lint (#295)

* chore(ci): add golangci-lint to github action

Signed-off-by: mlycore <maxwell92@126.com>

* chore(ci): seperate unit tests

Signed-off-by: mlycore <maxwell92@126.com>

* chore(ci): add golangci-lint for pitr

Signed-off-by: mlycore <maxwell92@126.com>

* chore(ci): fix license header

Signed-off-by: mlycore <maxwell92@126.com>

---------

Signed-off-by: mlycore <maxwell92@126.com>

* refactor(operator): refactor according to golangci-lint (#296)

* chore: seperate golangci-lint to base and advanced lints

Signed-off-by: mlycore <maxwell92@126.com>

* fix: introduce CondSucceed to Proxy and ComputeNode status

Signed-off-by: mlycore <maxwell92@126.com>

* chore: fix according to golangci-lint

Signed-off-by: mlycore <maxwell92@126.com>

* chore: refactor according to golangci-lint

Signed-off-by: mlycore <maxwell92@126.com>

* chore: update golangci-lint

Signed-off-by: mlycore <maxwell92@126.com>

* chore: remove loggercheck

Signed-off-by: mlycore <maxwell92@126.com>

* fix: fix unit test

Signed-off-by: mlycore <maxwell92@126.com>

* chore(ci): seperate golint to operator and pitr

Signed-off-by: mlycore <maxwell92@126.com>

* chore: add lint for commit message

Signed-off-by: mlycore <maxwell92@126.com>

---------

Signed-off-by: mlycore <maxwell92@126.com>

* fix: fix proxy controller according to golangci-lint (#299)

* chore: update golangci-lint

Signed-off-by: mlycore <maxwell92@126.com>

* chore: fix according to golangci-lint

Signed-off-by: mlycore <maxwell92@126.com>

* refactor: refactor update service with computenode

Signed-off-by: mlycore <maxwell92@126.com>

* fix: update service

Signed-off-by: mlycore <maxwell92@126.com>

* refactor: refactor proxy controller reconcile hpa, deployment and configmap according to golangci-lint

Signed-off-by: mlycore <maxwell92@126.com>

* chore: update commit-msg action

Signed-off-by: mlycore <maxwell92@126.com>

---------

Signed-off-by: mlycore <maxwell92@126.com>

* chore: update varnamelen default to 1

Signed-off-by: mlycore <maxwell92@126.com>

* fix: fix updateSSProxyContainer

Signed-off-by: mlycore <maxwell92@126.com>

* refactor: refactor getReadyProxyInstances

Signed-off-by: mlycore <maxwell92@126.com>

* refactor: refactor getReadyNodes

Signed-off-by: mlycore <maxwell92@126.com>

* fix: fix NewDeployment and set agent

Signed-off-by: mlycore <maxwell92@126.com>

* chore: update golangci-lint

Signed-off-by: mlycore <maxwell92@126.com>

* bugfix(pitr): fix test case show no record (#297)

* test(pitr): fix test case show no record

* style: lint code

* feat: Implements EncryptionRule DistSQL Parser Visitor with AST (#301)

* feat: implements encrypt rule distsql visitor interface with ast

Signed-off-by: wangbo <wangbo@sphere-ex.com>

* feat: add TODO

Signed-off-by: wangbo <wangbo@sphere-ex.com>

* chore: fix import package error

Signed-off-by: wangbo <wangbo@sphere-ex.com>

* chore: fix ci error

Signed-off-by: wangbo <wangbo@sphere-ex.com>

* chore: fix lint

Signed-off-by: wangbo <wangbo@sphere-ex.com>

* feat: add encrypt distsql ast

Signed-off-by: wangbo <wangbo@sphere-ex.com>

---------

Signed-off-by: wangbo <wangbo@sphere-ex.com>
Co-authored-by: wangbo <wangbo@sphere-ex.com>

* chore: add ifExists to ast (#304)

Signed-off-by: wangbo <wangbo@sphere-ex.com>
Co-authored-by: wangbo <wangbo@sphere-ex.com>

* Common builder (#305)

* refactor container builder to pkg/common

* fix golang-lint check

* add lincense check

---------

Co-authored-by: moonman <agoiyanzsa@163.com>

* refactor configmap to common pkg (#306)

Co-authored-by: moonman <agoiyanzsa@163.com>

---------

Signed-off-by: mlycore <maxwell92@126.com>
Signed-off-by: wangbo <wangbo@sphere-ex.com>
Co-authored-by: liyao <maxwell92@126.com>
Co-authored-by: Zhengqiang Duan <duanzhengqiang@apache.org>
Co-authored-by: Jack <875818649@qq.com>
Co-authored-by: wangbo <wangbo@sphere-ex.com>
Co-authored-by: moomman <85389467+moomman@users.noreply.github.com>
Co-authored-by: moonman <agoiyanzsa@163.com>
  • Loading branch information
7 people authored Apr 13, 2023
1 parent 8ac7dbc commit fc8a053
Show file tree
Hide file tree
Showing 95 changed files with 9,272 additions and 821 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/commit-msg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# 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.
#


name: lint-commit-message
on: [pull_request]

jobs:
commit-msg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache lint-commit-message
id: cache-lint-commit-message
uses: actions/cache@v3
with:
path: lint-commit-message
key: ${{ runner.os }}-lint-commit-message
- name: Lint commit message
run: |
git log --oneline ${{ github.event.pull_request.base.sha }}... \
| grep -vP '^\w{8} Merge ' \
| grep -vP '^\w{8} (feat|fix|build|chore|docs|style|refactor|perf|test|ci)(\(\w+(-\w+)?\))?:(\s*).*'
54 changes: 54 additions & 0 deletions .github/workflows/operator-golint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# 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.
#
name: golangci-lint

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'shardingsphere-operator/**'
- '.github/workflows/operator-golint.yml'
- 'shardingsphere-operator/.golangci-lint.yml'

jobs:
changes:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
golangci-lint:
name: lint
needs: changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go Env
uses: actions/setup-go@v3
with:
go-version: '1.19'
- name: Download golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
- name: Lint ShardingSphere-Operator
run: |
cd shardingsphere-operator/
$(go env GOPATH)/bin/golangci-lint run -v --timeout 300s ./...
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ on:
branches: [ main ]
paths:
- 'shardingsphere-operator/**'
- 'pitr/**'
- '.github/workflows/unit-test.yml'
- '.github/workflows/operator-unit-test.yml'
jobs:
operator:
runs-on: ubuntu-latest
Expand All @@ -42,20 +41,3 @@ jobs:
uses: codecov/codecov-action@v3
with:
files: ./shardingsphere-operator/coverage.txt
pitr-cli:
runs-on: ubuntu-latest
steps:
- name: "checkout codes"
uses: actions/checkout@v3
- name: "setup go"
uses: actions/setup-go@v4
with:
go-version: '^1.18.1'
- name: "unit test"
run: |
cd pitr/cli
make test
- name: "Code coverage"
uses: codecov/codecov-action@v3
with:
files: ./pitr/cli/cover.out
59 changes: 59 additions & 0 deletions .github/workflows/pitr-golint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#
# 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.
#
name: golangci-lint

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'pitr/**'
- '.github/workflows/pitr-golint.yml'
- 'pitr/agent/.golangci-lint.yml'
- 'pitr/cli/.golangci-lint.yml'

jobs:
changes:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
golangci-lint:
name: lint
needs: changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go Env
uses: actions/setup-go@v3
with:
go-version: '1.19'
- name: Download golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
- name: Lint Pitr Cli
run: |
cd pitr/cli
$(go env GOPATH)/bin/golangci-lint run -v --timeout 300s ./...
- name: Lint Pitr Agent
run: |
cd pitr/agent
$(go env GOPATH)/bin/golangci-lint run -v --timeout 300s ./...
43 changes: 43 additions & 0 deletions .github/workflows/pitr-unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# 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.
#

name: Unit Test

on:
pull_request:
branches: [ main ]
paths:
- 'pitr/**'
- '.github/workflows/unit-test.yml'
jobs:
pitr-cli:
runs-on: ubuntu-latest
steps:
- name: "checkout codes"
uses: actions/checkout@v3
- name: "setup go"
uses: actions/setup-go@v4
with:
go-version: '^1.18.1'
- name: "unit test"
run: |
cd pitr/cli
make test
- name: "Code coverage"
uses: codecov/codecov-action@v3
with:
files: ./pitr/cli/cover.out
Loading

0 comments on commit fc8a053

Please sign in to comment.