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

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

Merged
merged 6 commits into from
Apr 5, 2023

Conversation

mlycore
Copy link
Contributor

@mlycore mlycore commented Apr 5, 2023

No description provided.

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

Signed-off-by: mlycore <maxwell92@126.com>
@mlycore mlycore added type: refactor github-action github action file operator solutions of operator labels Apr 5, 2023
@mlycore mlycore added this to the 0.3.0 milestone Apr 5, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #294 (dbb6ff5) into main (46be6a7) will decrease coverage by 13.20%.
The diff coverage is 49.16%.

@@             Coverage Diff             @@
##             main     #294       +/-   ##
===========================================
- Coverage   62.36%   49.16%   -13.20%     
===========================================
  Files           2        8        +6     
  Lines         279      840      +561     
===========================================
+ Hits          174      413      +239     
- Misses        103      359      +256     
- Partials        2       68       +66     
Impacted Files Coverage Δ
pitr/cli/internal/pkg/shardingsphere-proxy.go 0.00% <0.00%> (ø)
pitr/cli/internal/pkg/local-storage.go 42.24% <42.24%> (ø)
pitr/cli/internal/cmd/restore.go 44.58% <44.58%> (ø)
pitr/cli/internal/cmd/show.go 56.09% <56.09%> (ø)
pitr/cli/internal/cmd/backup.go 58.87% <58.87%> (ø)
pitr/cli/internal/pkg/agent-server.go 72.27% <72.27%> (ø)
pitr/cli/pkg/gsutil/conn.go 76.47% <76.47%> (ø)
pitr/cli/pkg/stringutil/rand_string.go 88.88% <88.88%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: mlycore <maxwell92@126.com>
@sandynz sandynz merged commit c02a11e into apache:main Apr 5, 2023
@mlycore mlycore deleted the golangci-liint branch April 5, 2023 15:16
moomman pushed a commit to moomman/shardingsphere-on-cloud that referenced this pull request Apr 6, 2023
…ache#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
mlycore added a commit that referenced this pull request Apr 7, 2023
…Reconcile function (#286)

* 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>

* init ssChaos,add pod and network chaos convert to chaos-mesh crd

* add convert logic in reconcile function

* add job interface in pkg/kubernetes

* add job interface in pkg/kubernetes

* Refactor code style and add chaos sqec test for ShardingSphereChaos

* Refactor reconcile logic coe

* Refactor chaos crd and reconcile logic

* change reconcile function name

* refactor sschaos test

* refactor sschaos test

* refactor sschaos test and fix bug in reconcile

* refactor test in chaos,wait fix schema bug

* refactor test in chaos,wait fix schema bug

* delete suite test code

* fix bug , update by comment , modify FeatureGates to default start ssChaos

* delete no-used tests

* refactor chaos interface and reconcile logic

* remove ownerrefence in create pod chaos

* refactor update chaos reconile code in chaos-mesh implement

* add docs

* add annotation note to ssChaos types

* add crd docs

* add update status logic

* add reconcile status(chaos) logic

* add annoation convertion logic

* fix pointer nil  in reconcile status

* refactor convert annoations

* update doc

---------

Signed-off-by: mlycore <maxwell92@126.com>
Co-authored-by: Xu-Wentao <cutenear1993@yahoo.com>
Co-authored-by: liyao <maxwell92@126.com>
Co-authored-by: Zhengqiang Duan <duanzhengqiang@apache.org>
Co-authored-by: moonman <agoiyanzsa@163.com>
mlycore added a commit that referenced this pull request Apr 13, 2023
* 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>
Xu-Wentao added a commit to Xu-Wentao/shardingsphere-on-cloud that referenced this pull request May 5, 2023
* bugfix(pitr): fix storage nodes info struct error, add endtime to backup file, and fix backup mode ptrack did not work. (apache#288)

* chore(ci): add golangci-lint and refactor according to the result (apache#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 (apache#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 (apache#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 (apache#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 (apache#297)

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

* style: lint code

* feat: Implements EncryptionRule DistSQL Parser Visitor with AST (apache#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 (apache#304)

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

* Common builder (apache#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 (apache#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-action github action file operator solutions of operator type: refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants